MDL-40353 fixed wrong redirection on course group page
This commit is contained in:
+3
-5
@@ -56,12 +56,10 @@ $PAGE->set_url($url);
|
||||
// Make sure that the user has permissions to manage groups.
|
||||
require_login($course);
|
||||
|
||||
$PAGE->requires->js('/group/clientlib.js');
|
||||
|
||||
$context = context_course::instance($course->id);
|
||||
if (!has_capability('moodle/course:managegroups', $context)) {
|
||||
redirect('/course/view.php', array('id'=>$course->id)); // Not allowed to manage all groups
|
||||
}
|
||||
require_capability('moodle/course:managegroups', $context);
|
||||
|
||||
$PAGE->requires->js('/group/clientlib.js');
|
||||
|
||||
// Check for multiple/no group errors
|
||||
if (!$singlegroup) {
|
||||
|
||||
Reference in New Issue
Block a user