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...
andyjdavis committed Sep 24, 2012
1 parent d695785 commit 88852071b53d33b3a2b868a3e908bb19c74d6788
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 8885207

Please sign in to comment.