]> git.mjollnir.org Git - moodle.git/commitdiff
Only editing teachers can edit activities
authormoodler <moodler>
Sat, 16 Aug 2003 06:40:35 +0000 (06:40 +0000)
committermoodler <moodler>
Sat, 16 Aug 2003 06:40:35 +0000 (06:40 +0000)
course/mod.php

index 4753f353f1cd48119f86e4aba459f4650035dbfa..7a2f0eec6addc838c5cd4feb7bc51dc86fc0ae83 100644 (file)
@@ -27,7 +27,7 @@
 
     if (isset($_POST["course"])) {    // add or update form submitted
 
-        if (!isteacher($mod->course)) {
+        if (!isteacheredit($mod->course)) {
             error("You can't modify this course!");
         }
 
             error("This course module doesn't exist");
         }
 
-        if (!isteacher($cm->course)) {
+        if (!isteacheredit($cm->course)) {
             error("You can't modify this course!");
         }
     
             }
         }
 
-        if (!isteacher($section->course)) {
+        if (!isteacheredit($section->course)) {
             error("You can't modify this course!");
         }
 
             error("This course module doesn't exist");
         }
 
-        if (!isteacher($cm->course)) {
+        if (!isteacheredit($cm->course)) {
             error("You can't modify this course!");
         }
    
             error("This course module doesn't exist");
         }
 
-        if (!isteacher($cm->course)) {
+        if (!isteacheredit($cm->course)) {
             error("You can't modify this course!");
         }
 
             error("This course module doesn't exist");
         }
 
-        if (!isteacher($cm->course)) {
+        if (!isteacheredit($cm->course)) {
             error("You can't modify this course!");
         }
 
             error("This course doesn't exist");
         }
 
-        if (!isteacher($course->id)) {
+        if (!isteacheredit($course->id)) {
             error("You can't modify this course!");
         }
 
             error("This course doesn't exist");
         }
 
-        if (!isteacher($course->id)) {
+        if (!isteacheredit($course->id)) {
             error("You can't modify this course!");
         }
 
         error("No action was specfied");
     }
 
-    if (!isteacher($course->id)) {
+    if (!isteacheredit($course->id)) {
         error("You can't modify this course!");
     }