$isteacher = isteacher($course->id);
$ismainglossary = $glossary->mainglossary;
- echo "<table width=100% border=0><tr><td>";
+ echo "<table width=100% border=0><tr>";
- $count = count_records("glossary_comments","entryid",$entry->id);
- echo "<a href=\"comments.php?id=$cm->id&eid=$entry->id\">$count " . get_string("comments","glossary") . "</a>";
- echo "</td><td align=\"right\">";
if ( $glossary->allowcomments ) {
+ echo "<td>";
+ $count = count_records("glossary_comments","entryid",$entry->id);
+ echo "<a href=\"comments.php?id=$cm->id&eid=$entry->id\">$count " . get_string("comments","glossary") . "</a>";
+ echo "</td><td align=\"right\">";
echo "<a href=\"comment.php?id=$cm->id&eid=$entry->id\"><img alt=\"" . get_string("addcomment","glossary") . "\" src=\"comment.gif\" height=16 width=16 border=0></a> ";
+ } else {
+ echo "<td align=\"right\">";
}
if ($isteacher or $glossary->studentcanpost and $entry->userid == $USER->id) {