From c1e97fe5916d874564a5d9d6c9744e9510a5567b Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 17 Oct 2003 08:55:16 +0000 Subject: [PATCH] Made comments link smaller, and also prints "1 comment" and "2 comments" --- mod/glossary/lib.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index a947486343..70a1fc64e6 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -182,7 +182,7 @@ function glossary_get_entries($glossaryid, $entrylist) { AND id IN ($entrylist)"); } -function glossary_print_entry($course, $cm, $glossary, $entry,$currentview="",$cat="") { +function glossary_print_entry($course, $cm, $glossary, $entry, $currentview="",$cat="") { global $THEME, $USER, $CFG; $permissiongranted = 0; @@ -238,8 +238,14 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview echo ""; echo "
"; $count = count_records("glossary_comments","entryid",$entry->id); - if ( $count ) { - echo "id&eid=$entry->id\">$count " . get_string("comments","glossary") . ""; + if ($count) { + echo "id&eid=$entry->id\">$count "; + if ($count == 1) { + print_string("comment", "glossary"); + } else { + print_string("comments", "glossary"); + } + echo ""; } echo ""; -- 2.39.5