From 2fdcf5e36065841e8c3b885cfcf3c199315f6dd4 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 1 Oct 2006 09:31:49 +0000 Subject: [PATCH] FIx the header too by requiring login to the course --- course/editsection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/editsection.php b/course/editsection.php index 06689c84494..9fc50e4b759 100644 --- a/course/editsection.php +++ b/course/editsection.php @@ -6,8 +6,6 @@ $id = required_param('id',PARAM_INT); // Week ID - require_login(); - if (! $section = get_record("course_sections", "id", $id)) { error("Course section is incorrect"); } @@ -16,6 +14,8 @@ error("Could not find the course!"); } + require_login($course->id); + require_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id)); /// If data submitted, then process and store. -- 2.43.0