]> git.mjollnir.org Git - moodle.git/commitdiff
Use caching if necessary, so that teachers can't lock themselves out
authormoodler <moodler>
Wed, 26 Feb 2003 05:58:44 +0000 (05:58 +0000)
committermoodler <moodler>
Wed, 26 Feb 2003 05:58:44 +0000 (05:58 +0000)
accidentally during the current session.

course/teacher.php

index 7fe180fe8ae5dfeb13fb32c1bbc8f04358b36d15..938d6e4218b4062ce41c531c0b81f878879e884b 100644 (file)
@@ -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.");
         }
 
 
     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)) {