Skip to content

Commit

Permalink
Merge branch 'wip-MDL-40353-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
Damyon Wiese committed Jul 2, 2013
2 parents 6e4de30 + 69e33fa commit 1fd351c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions group/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@
// 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) {
Expand Down

0 comments on commit 1fd351c

Please sign in to comment.