MDL-10833 some more course theme fixes

This commit is contained in:
skodak
2007-09-24 15:49:14 +00:00
parent 04bb266b3f
commit 961ffe486f
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -50,6 +50,7 @@
}
if (!empty($id)) {
require_login($id);
if (!has_capability('moodle/site:restore', get_context_instance(CONTEXT_COURSE, $id))) {
if (empty($to)) {
error("You need to be a teacher or admin user to use this page.", "$CFG->wwwroot/login/index.php");
+2
View File
@@ -37,6 +37,7 @@
if (!$course = get_record('course', 'id', $id) ) {
error('That\'s an invalid course id'.$id);
}
require_login($course);
$context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/site:viewreports', $context);
add_to_log($course->id, "course", "report log", "report/log/index.php?id=$course->id", $course->id);
@@ -45,6 +46,7 @@
$course->id = $id;
$course->shortname = $course_stub->coursename;
$course->fullname = $course_stub->coursename;
require_login($course);
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
require_capability('moodle/site:viewreports', $context);
add_to_log(0, "mnet course", "report log", "report/log/index.php?chooselog=1&host_course=".urlencode($host_course), $course->fullname);