From 1f63b7c6aa6134bc7267c2ffcc711074edc71244 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Mon, 12 Jul 2004 17:11:13 +0000 Subject: [PATCH] Now, for glossaries using the 'Entry List' format, their entry->description is viewable with the standard popup window. Bug 1636 (http://moodle.org/bugs/bug.php?op=show&bugid=1636) Merged from MOODLE_13_STABLE --- mod/glossary/formats/6.php | 2 +- mod/glossary/lib.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mod/glossary/formats/6.php b/mod/glossary/formats/6.php index 76e15e7a93..aacec2fc05 100644 --- a/mod/glossary/formats/6.php +++ b/mod/glossary/formats/6.php @@ -11,7 +11,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode=" echo "\n"; echo ""; if ($entry) { - echo "id&mode=entry&hook=$entry->id\">"; + echo "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 ' '; diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 48d25963af..a9e9f29972 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -1529,13 +1529,21 @@ function glossary_print_dynaentry($courseid, $entries, $displayformat = -1) { 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); } } -- 2.39.5