MDL-33829 mod_glossary: added some smarts so glossary entries with an image in their description are classed as richhtml instead of plainhtml

This commit is contained in:
Andrew Davis 2012-09-24 17:52:52 +08:00
parent 06b53930ab
commit 2403ea411c

View file

@ -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);