Skip to content

Commit

Permalink
MDL-58138 completion: Fix capability required for setting defaults
Browse files Browse the repository at this point in the history
As per core_completion\manager::get_available_completion_tabs() the
required capability for this feature is moodle/course:manageactivities,
not moodle/course:update.
  • Loading branch information
mudrd8mz committed Apr 21, 2017
1 parent 7942016 commit 4088416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion course/editdefaultcompletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
$PAGE->set_heading($course->fullname);
$PAGE->set_pagelayout('admin');

require_capability('moodle/course:update', context_course::instance($course->id));
require_capability('moodle/course:manageactivities', context_course::instance($course->id));

// Prepare list of selected modules.
$manager = new \core_completion\manager($course->id);
Expand Down

0 comments on commit 4088416

Please sign in to comment.