Skip to content

Commit

Permalink
Now, for glossaries using the 'Entry List' format, their
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stronk7 committed Jul 12, 2004
1 parent 6e66130 commit 1f63b7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mod/glossary/formats/6.php
Expand Up @@ -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> ';
Expand Down
12 changes: 10 additions & 2 deletions mod/glossary/lib.php
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 1f63b7c

Please sign in to comment.