From 9788367bb9dae253d7761c7eb892ab955f47e95d Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 28 Oct 2003 14:44:39 +0000 Subject: [PATCH] Sometimes you really want to know if they are a teacher --- lib/moodlelib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index fd37fb402d..ad6abe38a4 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -400,11 +400,11 @@ function isadmin($userid=0) { } } -function isteacher($courseid, $userid=0) { +function isteacher($courseid, $userid=0, $includeadmin=true) { /// Is the user a teacher or admin? global $USER; - if (isadmin($userid)) { // admins can do anything the teacher can + if ($includeadmin and isadmin($userid)) { // admins can do anything the teacher can return true; } -- 2.39.5