Permalink
Browse files

Sometimes you really want to know if they are a teacher

  • Loading branch information...
moodler
moodler committed Oct 28, 2003
1 parent 57ef348 commit 9788367bb9dae253d7761c7eb892ab955f47e95d
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moodlelib.php
View
@@ -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;
}

0 comments on commit 9788367

Please sign in to comment.