Permalink
Browse files

MDL-33829 mod_glossary: added some smarts so glossary entries with an…

… image in their description are classed as richhtml instead of plainhtml
  • Loading branch information...
1 parent 06b5393 commit 2403ea411c9f39efb72241393a1608162e92e5a2 @andyjdavis andyjdavis committed Sep 24, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/glossary/lib.php
View
@@ -1282,7 +1282,9 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
}
}
$fs = get_file_storage();
- if ($files = $fs->get_area_files($filecontext->id, 'mod_glossary', 'attachment', $entry->id, "timemodified", false)) {
+ if ($files = $fs->get_area_files($filecontext->id, 'mod_glossary', 'attachment', $entry->id, "timemodified", false)
+ || $files = $fs->get_area_files($filecontext->id, 'mod_glossary', 'entry', $entry->id, "timemodified", false)) {
+
$button->set_formats(PORTFOLIO_FORMAT_RICHHTML);
} else {
$button->set_formats(PORTFOLIO_FORMAT_PLAINHTML);

0 comments on commit 2403ea4

Please sign in to comment.