Permalink
Browse files

MDL-40353 fixed wrong redirection on course group page

  • Loading branch information...
1 parent e978b66 commit 00b4836197b62a998e738e901c594cf4eb195b6d @marinaglancy marinaglancy committed Jun 27, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 group/index.php
View
8 group/index.php
@@ -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) {

0 comments on commit 00b4836

Please sign in to comment.