]> git.mjollnir.org Git - moodle.git/commitdiff
Now, for glossaries using the 'Entry List' format, their
authorstronk7 <stronk7>
Mon, 12 Jul 2004 17:11:13 +0000 (17:11 +0000)
committerstronk7 <stronk7>
Mon, 12 Jul 2004 17:11:13 +0000 (17:11 +0000)
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
mod/glossary/lib.php

index 76e15e7a930c4e04fd2ae1ed74fcf790eec1b18d..aacec2fc0516dff7515d4180f4329bf892cebe16 100644 (file)
@@ -11,7 +11,7 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $mode="
     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> ';
index 48d25963afcc72457c12c0cb56beca8135b4f046..a9e9f2997222958f4411f7b990bc3746716f6560 100644 (file)
@@ -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);
         }
     }