]> git.mjollnir.org Git - moodle.git/commitdiff
Added security and consistent CSS
authormoodler <moodler>
Thu, 9 Mar 2006 16:34:24 +0000 (16:34 +0000)
committermoodler <moodler>
Thu, 9 Mar 2006 16:34:24 +0000 (16:34 +0000)
course/import.php
course/report.php

index 97c8779d7e38aaefdc27459cddec63a2d1e0ecd6..2da08ad9863fe6f801e5215800cd68627f717858 100644 (file)
@@ -9,6 +9,10 @@
         error("That's an invalid course id");
     }
 
+    if (!isteacher($course->id)) {
+        error("You are not allowed to look at this page");
+    }
+
     $strimport = get_string('import');
 
     print_header($course->fullname.': '.$strimport, $course->fullname.': '.$strimport, 
index 66e726a8630c1db5dbab4477aa1977d231f7eff1..b281c66b448929459de4f7cca96d86664fd4a177 100644 (file)
@@ -9,6 +9,10 @@
         error("That's an invalid course id");
     }
 
+    if (!isteacher($course->id)) {
+        error("You are not allowed to look at this page");
+    }
+
     $strreports = get_string('reports');
 
     print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, 
@@ -17,7 +21,7 @@
     $directories = get_list_of_plugins('course/report');
 
     foreach ($directories as $directory) {
-        echo '<div class="plugin">';
+        echo '<div class="plugin '.$directory.'">';
         include_once($CFG->dirroot.'/course/report/'.$directory.'/mod.php');  // Fragment for listing
         echo '</div>';
     }