Skip to content
Browse files

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)
  • Loading branch information...
1 parent f973558 commit 350e44bf212d6818232a316b67cd2088be0a4301 stronk7 committed
Showing with 11 additions and 3 deletions.
  1. +1 −1 mod/glossary/formats/6.php
  2. +10 −2 mod/glossary/lib.php
View
2 mod/glossary/formats/6.php
@@ -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> ';
View
12 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);
}
}

0 comments on commit 350e44b

Please sign in to comment.
Something went wrong with that request. Please try again.