From: moodler Date: Wed, 26 Feb 2003 05:58:44 +0000 (+0000) Subject: Use caching if necessary, so that teachers can't lock themselves out X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ff20ee79f6de387094fee964ac74e2e0dcf63f6f;p=moodle.git Use caching if necessary, so that teachers can't lock themselves out accidentally during the current session. --- diff --git a/course/teacher.php b/course/teacher.php index 7fe180fe8a..938d6e4218 100644 --- a/course/teacher.php +++ b/course/teacher.php @@ -76,7 +76,7 @@ /// Add a teacher if one is specified if (!empty($add)) { - if (!isteacher($course->id, $USER->id)){ + if (!isteacher($course->id)){ error("You must be an administrator or teacher to modify this course."); } @@ -110,7 +110,7 @@ if (!empty($remove)) { - if (!isteacher($course->id, $USER->id)){ + if (!isteacher($course->id)){ error("You must be an administrator or teacher to modify this course."); } if (! $user = get_record("user", "id", $remove)) {