Skip to content

Commit

Permalink
Removed redundant require_capability and require_login, causing havoc…
Browse files Browse the repository at this point in the history
… on new module page.
  • Loading branch information
nicolasconnault committed Jul 2, 2009
1 parent 5fdb159 commit 9ee67e6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions course/modedit.php
Expand Up @@ -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
Expand Down

0 comments on commit 9ee67e6

Please sign in to comment.