Permalink
Browse files

MDLSITE-1025 prevent group info access only in separate mode

  • Loading branch information...
1 parent e7521e4 commit 01ebadfbb6e3b72a519cde07a822a7e3b21438f6 @skodak skodak committed Oct 6, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 pluginfile.php
View
@@ -529,7 +529,8 @@
$groupid = (int)array_shift($args);
$group = $DB->get_record('groups', array('id'=>$groupid, 'courseid'=>$course->id), '*', MUST_EXIST);
- if (!has_capability('moodle/site:accessallgroups', $context) && !groups_is_member($group->id, $USER->id)) {
+ if (($course->groupmodeforce and $course->groupmode == SEPARATEGROUPS) and !has_capability('moodle/site:accessallgroups', $context) and !groups_is_member($group->id, $USER->id)) {
+ // do not allow access to separate group info if not member or teacher
send_file_not_found();
}

0 comments on commit 01ebadf

Please sign in to comment.