From 17f829a765e308260310a126db84844aa95c899a Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 9 Mar 2006 16:34:24 +0000 Subject: [PATCH] Added security and consistent CSS --- course/import.php | 4 ++++ course/report.php | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/course/import.php b/course/import.php index 97c8779d7e..2da08ad986 100644 --- a/course/import.php +++ b/course/import.php @@ -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, diff --git a/course/report.php b/course/report.php index 66e726a863..b281c66b44 100644 --- a/course/report.php +++ b/course/report.php @@ -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 '
'; + echo '
'; include_once($CFG->dirroot.'/course/report/'.$directory.'/mod.php'); // Fragment for listing echo '
'; } -- 2.39.5