]> git.mjollnir.org Git - moodle.git/commitdiff
Made comments link smaller, and also prints "1 comment" and "2 comments"
authormoodler <moodler>
Fri, 17 Oct 2003 08:55:16 +0000 (08:55 +0000)
committermoodler <moodler>
Fri, 17 Oct 2003 08:55:16 +0000 (08:55 +0000)
mod/glossary/lib.php

index a94748634377eae48e50644bc09a2b54bc9b3b16..70a1fc64e68c501c6e3a6874a3779854736c1d1c 100644 (file)
@@ -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 "<table width=100% border=0>";    
     echo "<tr><td>";
     $count = count_records("glossary_comments","entryid",$entry->id);
-    if ( $count ) {
-        echo "<a href=\"comments.php?id=$cm->id&eid=$entry->id\">$count " . get_string("comments","glossary") . "</a>";
+    if ($count) {
+        echo "<font size=1><a href=\"comments.php?id=$cm->id&eid=$entry->id\">$count ";
+        if ($count == 1) {
+            print_string("comment", "glossary");
+        } else {
+            print_string("comments", "glossary");
+        }
+        echo "</a></font>";
     }
     echo "</td><td align=\"right\">";