echo "\n<tr>";
echo "<td width=100% bgcolor=\"$colour\">";
if ($entry) {
- echo "<b><a href=\"view.php?id=$cm->id&mode=entry&hook=$entry->id\">";
+ echo "<b><a href=\"showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=5\" target=\"_blank\" onClick=\"return openpopup('/mod/glossary/showentry.php?courseid=$course->id\&eid=$entry->id\&displayformat=5', 'entry', 'menubar=0,location=0,scrollbars,resizable,width=600,height=450', 0);\">";
glossary_print_entry_concept($entry);
echo '</a></b> ';
if (!$cm = get_coursemodule_from_instance("glossary", $entry->glossaryid, $glossary->course) ) {
error("Glossary is misconfigured - don't know what course module it is ");
}
- $dp = $displayformat;
+
+ //If displayformat is present, override glossary->displayformat
+ if ($displayformat == -1) {
+ $dp = $glossary->displayformat;
+ } else {
+ $dp = $displayformat;
+ }
+
// Hard-coded until the Display formats manager is done.
- if ( $dprecord = get_record("glossary_displayformats","fid", $glossary->displayformat) ) {
+ if ( $dprecord = get_record("glossary_displayformats","fid", $dp) ) {
if ( $dprecord->relatedview >= 0 ) {
$dp = $dprecord->relatedview;
}
}
+
glossary_print_entry($course, $cm, $glossary, $entry, "","",0,$dp);
}
}