Skip to content

Commit

Permalink
MDLSITE-1025 prevent group info access only in separate mode
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 6, 2010
1 parent e7521e4 commit 01ebadf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pluginfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 01ebadf

Please sign in to comment.