MDL-9124 Added a visual notification when group membership doesn't allow adding discussions.

This commit is contained in:
nicolasconnault 2007-04-04 06:27:50 +00:00
parent 008bc40114
commit 468f5d6896
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ $string['blockperioddisabled'] = 'Don\'t block';
$string['blockperiod'] = 'Time period for blocking';
$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.';
$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.';
$string['configenablerssfeeds'] = 'This switch will enable the possibility of RSS feeds for all forums. You will still need to turn feeds on manually in the settings for each forum.';

View File

@ -3298,6 +3298,8 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=5, $dis
echo '</div>';
echo '</form>';
echo "</div>\n";
} elseif(!ismember($currentgroup)) {
notify(get_string('cannotadddiscussion', 'forum'));
}