Permalink
Browse files

Merge branch 'wip-MDL-40353-m23' of git://github.com/marinaglancy/moo…

…dle into MOODLE_23_STABLE
  • Loading branch information...
2 parents a5a4a5e + 1d5932b commit a251526d72d4a898e25aae3a5c81949aac6f8f01 @damyon damyon committed Jul 2, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 group/index.php
View
@@ -56,14 +56,12 @@
// Make sure that the user has permissions to manage groups.
require_login($course);
+$context = get_context_instance(CONTEXT_COURSE, $course->id);
+require_capability('moodle/course:managegroups', $context);
+
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->js('/group/clientlib.js');
-$context = get_context_instance(CONTEXT_COURSE, $course->id);
-if (!has_capability('moodle/course:managegroups', $context)) {
- redirect('/course/view.php', array('id'=>$course->id)); // Not allowed to manage all groups
-}
-
// Check for multiple/no group errors
if (!$singlegroup) {
switch($action) {

0 comments on commit a251526

Please sign in to comment.