echo "<table class=\"generalbox\" width=\"70%\" align=\"center\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">";
echo "<tr bgcolor=$THEME->cellheading2><td align=center>";
echo "<table border=0 width=100%><tr><td width=33%></td><td width=33% align=center>";
- echo get_string("commentson","glossary") . " <b>$entry->concept</b></td>";
+ echo get_string("commentson","glossary") . ' <b>' . glossary_print_entry_concept($entry) . '</b></td>';
echo "<td width=33% align=right>";
if ( $glossary->allowcomments ) {
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> ";
echo "</td></tr></table>";
}
echo "<b>$entry->concept</b>: ";
- echo format_text($entry->definition, $entry->format);
+ glossary_print_entry_definition($entry);
echo "</td>";
echo "</TR></table>";
function glossary_print_entry_definition($entry) {
$definition = str_ireplace($entry->concept,"<nolink>$entry->concept</nolink>",$entry->definition);
+/* if ( $aliases = get_records("glossary_alias","entryid",$entry->id) ) {
+ foreach ($aliases as $alias) {
+ echo "<small><font color=red>$alias->alias: ";
+ $definition = str_ireplace($alias->alias,"<nolink>$alias->alias</nolink>",$definition);
+ echo "<b>" . format_text($definition,2) . "</b>";
+ echo "</font></small><br>";
+ }
+ }
+*/
echo format_text($definition, $entry->format);
}
if (!$cm = get_coursemodule_from_instance("glossary", $entry->glossaryid, $glossary->course) ) {
error("Glossary is misconfigured - don't know what course module it is ");
}
- glossary_print_entry($course, $cm, $glossary, $entry, "","",0,$displayformat);
+ $dp = $displayformat;
+ // Hard-coded until the Display formats manager is done.
+ if ( $dp == -1 and $glossary->displayformat == 6 ) {
+ $dp = 2;
+ }
+ glossary_print_entry($course, $cm, $glossary, $entry, "","",0,$dp);
}
}
echo "</td>";