From 9ee67e60b4949e7a390af4a8cf1aa10745db7fcf Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 2 Jul 2009 07:49:12 +0000 Subject: [PATCH] Removed redundant require_capability and require_login, causing havoc on new module page. --- course/modedit.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/course/modedit.php b/course/modedit.php index 771c72fab5d13..f1a2d9b274a65 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -242,14 +242,12 @@ $fromform->coursemodule = $cm->id; } - require_login($course); // needed to setup proper $COURSE if (!empty($fromform->coursemodule)) { $context = get_context_instance(CONTEXT_MODULE, $fromform->coursemodule); } else { $context = get_context_instance(CONTEXT_COURSE, $course->id); } - require_capability('moodle/course:manageactivities', $context); $fromform->course = $course->id; $fromform->modulename = clean_param($fromform->modulename, PARAM_SAFEDIR); // For safety