mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-29924 Glossary: Entry attachments displayed in Moodle dialogue
This commit is contained in:
parent
71d7bc34a8
commit
096d4d8767
3
filter/glossary/yui/autolinker/autolinker.js
vendored
3
filter/glossary/yui/autolinker/autolinker.js
vendored
@ -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;
|
||||
|
@ -70,6 +70,12 @@ if ($entries) {
|
||||
$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\">» <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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user