Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-29924 Glossary: Entry attachments displayed in Moodle dialogue

  • Loading branch information...
commit 096d4d876746d7576d0a6561dbd594f67c08a87e 1 parent 71d7bc3
@FMCorz FMCorz authored
View
3  filter/glossary/yui/autolinker/autolinker.js
@@ -70,7 +70,8 @@ YUI.add('moodle-filter_glossary-autolinker', function(Y) {
this.overlay.hide(); //hide progress indicator
for (key in data.entries) {
- new M.core.alert({title:data.entries[key].concept, message:data.entries[key].definition, lightbox:false});
+ definition = data.entries[key].definition + data.entries[key].attachments
+ new M.core.alert({title:data.entries[key].concept, message:definition, lightbox:false});
}
return true;
View
6 mod/glossary/showentry_ajax.php
@@ -70,6 +70,12 @@
$options->context = $context;
$entries[$key]->definition = format_text($definition, $entry->definitionformat, $options);
+ $entries[$key]->attachments = '';
+ if (!empty($entries[$key]->attachment)) {
+ $attachments = glossary_print_attachments($entry, $cm, 'html');
+ $entries[$key]->attachments = html_writer::tag('p', $attachments);
+ }
+
$entries[$key]->footer = "<p style=\"text-align:right\">&raquo;&nbsp;<a href=\"$CFG->wwwroot/mod/glossary/view.php?g=$entry->glossaryid\">".format_string($entry->glossaryname,true)."</a></p>";
add_to_log($entry->courseid, 'glossary', 'view entry', "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
}
Please sign in to comment.
Something went wrong with that request. Please try again.