mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-48274-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
dca771127a
@ -77,7 +77,7 @@ if (isset($cm->groupmode) && empty($course->groupmodeforce)) {
|
||||
$issubscribed = \mod_forum\subscriptions::is_subscribed($user->id, $forum, $discussionid, $cm);
|
||||
|
||||
// For a user to subscribe when a groupmode is set, they must have access to at least one group.
|
||||
if ($groupmode && !$issubscribed && !has_capability('moodle/site:accessallgroups')) {
|
||||
if ($groupmode && !$issubscribed && !has_capability('moodle/site:accessallgroups', $context)) {
|
||||
if (!groups_get_all_groups($course->id, $USER->id)) {
|
||||
print_error('cannotsubscribe', 'forum');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user