From 651f7cf27777da940aab33cbe80d029b812b0542 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 24 Sep 2007 15:39:29 +0000 Subject: [PATCH] MDL-10833 course theme in live logs fixed --- course/report/log/live.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/report/log/live.php b/course/report/log/live.php index a1c89b76be..9fd1961535 100644 --- a/course/report/log/live.php +++ b/course/report/log/live.php @@ -7,12 +7,12 @@ $id = required_param('id', PARAM_INT); $page = optional_param('page', 0, PARAM_INT); // which page to show - require_login(); - if (! $course = get_record("course", "id", $id) ) { error("That's an invalid course id"); } + require_login($course); + $context = get_context_instance(CONTEXT_COURSE, $course->id); if (!has_capability('moodle/site:viewreports', $context)) { error('You need do not have the required permission to view this report'); -- 2.39.5