mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Secure group viewing when in separate mode
This commit is contained in:
parent
d04d87e3bd
commit
e9089eb471
1 changed files with 7 additions and 4 deletions
|
@ -16,10 +16,13 @@
|
|||
|
||||
require_login($course->id);
|
||||
|
||||
|
||||
if ($group and (isteacheredit($course->id) or $course->groupmode == VISIBLEGROUPS)) {
|
||||
if (! $group = get_record("groups", "id", $group)) {
|
||||
error('Specified group could not be found!', "groups.php?id=$course->id");
|
||||
if ($group) {
|
||||
if (isteacheredit($course->id) or $course->groupmode == VISIBLEGROUPS) {
|
||||
if (! $group = get_record("groups", "id", $group)) {
|
||||
error('Specified group could not be found!', "groups.php?id=$course->id");
|
||||
}
|
||||
} else {
|
||||
error('Sorry, you don\'t have access to view this group', "view.php?id=$course->id");
|
||||
}
|
||||
} else if (! $group = get_current_group($course->id, 'full')) {
|
||||
error('You are not currently in a group!', "view.php?id=$course->id");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue