MDL-13936 indicate that user needs group membership to add new discussion, but only if having the capability to add new discussion - previously the message was incorrectly shown even when not having the cap in separate mode, visible mode needs this message too after previous commit; new lang string added in case user selects all participants in group selector and does not have accessallgroups - the existing group membership string could not be reused; merged from MOODLE_19_STABLE
This commit is contained in:
@@ -28,7 +28,7 @@ $string['blockperioddisabled'] = 'Don\'t block';
|
||||
$string['bynameondate'] = 'by $a->name - $a->date';
|
||||
$string['cannotviewpostyet'] = 'You cannot read other students questions in this discussion yet because you haven\'t posted';
|
||||
$string['cannotadddiscussion'] = 'Adding discussions to this forum requires group membership.';
|
||||
$stirng['cannotdeleteforummudule'] = 'You can not delete the forum module!!';
|
||||
$string['cannotadddiscussionall'] = 'Can not add discussions for all participants to this forum.';
|
||||
$string['cleanreadtime'] = 'Mark old posts as read hour';
|
||||
$string['configcleanreadtime'] = 'The hour of the day to clean old posts from the \'read\' table.';
|
||||
$string['configdisplaymode'] = 'The default display mode for discussions if one isn\'t set.';
|
||||
|
||||
+11
-2
@@ -4519,8 +4519,17 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=-1, $di
|
||||
echo '</div>';
|
||||
echo '</form>';
|
||||
echo "</div>\n";
|
||||
} else if (!isguestuser() and isloggedin() and $forum->type != 'news' and $groupmode == SEPARATEGROUPS and !groups_is_member($currentgroup)) {
|
||||
notify(get_string('cannotadddiscussion', 'forum'));
|
||||
|
||||
} else if (isguestuser() or !isloggedin() or $forum->type == 'news') {
|
||||
// no button and no info
|
||||
|
||||
} else if ($groupmode and has_capability('mod/forum:startdiscussion', $context)) {
|
||||
// inform users why they can not post new discussion
|
||||
if ($currentgroup) {
|
||||
notify(get_string('cannotadddiscussion', 'forum'));
|
||||
} else {
|
||||
notify(get_string('cannotadddiscussionall', 'forum'));
|
||||
}
|
||||
}
|
||||
|
||||
// Get all the recent discussions we're allowed to see
|
||||
|
||||
Reference in New Issue
Block a user