From: moodler Date: Sat, 29 Jan 2005 09:56:42 +0000 (+0000) Subject: FIxed the wording of the unread post notices on the course page X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=546699899aa9174ff6813d23b453487b8559774f;p=moodle.git FIxed the wording of the unread post notices on the course page --- diff --git a/course/lib.php b/course/lib.php index 0b56e2e373..c3a4f35212 100644 --- a/course/lib.php +++ b/course/lib.php @@ -957,6 +957,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, static $ismoving; static $strmovehere; static $strmovefull; + static $strunreadpostsone; + static $strunreadpostsnumber; $labelformatoptions = New stdClass; @@ -970,6 +972,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, $strmovehere = get_string("movehere"); $strmovefull = strip_tags(get_string("movefull", "", "'$USER->activitycopyname'")); } + $strunreadpostsone = get_string('unreadpostsone', 'forum'); + $strunreadpostsnumber = get_string('unreadpostsnumber', 'forum'); } $labelformatoptions->noclean = true; @@ -1042,8 +1046,11 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, get_current_group($course->id) : false; $unread = forum_tp_count_forum_posts($mod->instance, $groupid) - forum_tp_count_forum_read_records($USER->id, $mod->instance, $groupid); - $cssclass = ($unread > 0) ? 'unread' : 'read'; - echo ' '.get_string('unreadpostsnumber', 'forum', $unread).'.'; + if ($unread == 1) { + echo ' '.$strunreadpostsone.' '; + } else if ($unread) { + echo ' '.$strunreadpostsnumber.' '; + } } if ($isediting) { diff --git a/lang/en/forum.php b/lang/en/forum.php index 115b635ff6..f2d25438c9 100644 --- a/lang/en/forum.php +++ b/lang/en/forum.php @@ -156,7 +156,8 @@ $string['subscription'] = 'Subscription'; $string['subscriptions'] = 'Subscriptions'; $string['unread'] = 'Unread'; $string['unreadposts'] = 'Unread posts'; -$string['unreadpostsnumber'] = '$a posts unread'; +$string['unreadpostsnumber'] = '$a unread posts'; +$string['unreadpostsone'] = '1 unread post'; $string['unsubscribe'] = 'Unsubscribe from this forum'; $string['unsubscribed'] = 'Unsubscribed'; $string['unsubscribeshort'] = 'Unsubscribe';