Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…dle into MOODLE_23_STABLE
  • Loading branch information...
commit a251526d72d4a898e25aae3a5c81949aac6f8f01 2 parents a5a4a5e + 1d5932b
@damyon damyon authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 group/index.php
View
8 group/index.php
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.