mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-47930 mod_forum: Display all forum statuses correctly
It is possible for users with the mod/forum:managesubscriptions to subscribe to forums with subscription disabled. This is handled by forum_get_subscribe_link() already and should have been handled here all along.
This commit is contained in:
parent
7545e84661
commit
0d7cb0f805
@ -268,13 +268,9 @@ if ($generalforums) {
|
||||
}
|
||||
|
||||
if ($can_subscribe) {
|
||||
if (!\mod_forum\subscriptions::subscription_disabled($forum)) {
|
||||
$row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
|
||||
'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
|
||||
'cantsubscribe' => '-'), false, false, true);
|
||||
} else {
|
||||
$row[] = '-';
|
||||
}
|
||||
$row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
|
||||
'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
|
||||
'cantsubscribe' => '-'), false, false, true);
|
||||
|
||||
$digestoptions_selector->url->param('id', $forum->id);
|
||||
if ($forum->maildigest === null) {
|
||||
@ -418,13 +414,9 @@ if ($course->id != SITEID) { // Only real courses have learning forums
|
||||
}
|
||||
|
||||
if ($can_subscribe) {
|
||||
if (!\mod_forum\subscriptions::subscription_disabled($forum)) {
|
||||
$row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
|
||||
'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
|
||||
'cantsubscribe' => '-'), false, false, true);
|
||||
} else {
|
||||
$row[] = '-';
|
||||
}
|
||||
$row[] = forum_get_subscribe_link($forum, $context, array('subscribed' => $stryes,
|
||||
'unsubscribed' => $strno, 'forcesubscribed' => $stryes,
|
||||
'cantsubscribe' => '-'), false, false, true);
|
||||
|
||||
$digestoptions_selector->url->param('id', $forum->id);
|
||||
if ($forum->maildigest === null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user