]> git.mjollnir.org Git - moodle.git/commitdiff
Sometimes you really want to know if they are a teacher
authormoodler <moodler>
Tue, 28 Oct 2003 14:44:39 +0000 (14:44 +0000)
committermoodler <moodler>
Tue, 28 Oct 2003 14:44:39 +0000 (14:44 +0000)
lib/moodlelib.php

index fd37fb402da1546b2204596d9fc613abbf8b92c7..ad6abe38a48bb86fb877e6e9a6ba1e497753a9e4 100644 (file)
@@ -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;
     }