Permalink
Browse files

Merge branch 'MDL-33829_22' of https://github.com/andyjdavis/moodle i…

…nto MOODLE_22_STABLE
  • Loading branch information...
2 parents 2213098 + e1f24eb commit bd465e3917e0ab451a7a18e5216431cc91d81b70 Sam Hemelryk committed Oct 2, 2012
Showing with 9 additions and 1 deletion.
  1. +3 −1 mod/glossary/lib.php
  2. +6 −0 mod/glossary/locallib.php
@@ -1143,7 +1143,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);
@@ -265,6 +265,12 @@ public function load_data() {
$fs->get_area_files($context->id, 'mod_glossary', 'attachment', $this->entry->id, "timemodified", false),
$fs->get_area_files($context->id, 'mod_glossary', 'entry', $this->entry->id, "timemodified", false)
);
+
+ if (!empty($this->multifiles)) {
+ $this->add_format(PORTFOLIO_FORMAT_RICHHTML);
+ } else {
+ $this->add_format(PORTFOLIO_FORMAT_PLAINHTML);
+ }
}
/**

0 comments on commit bd465e3

Please sign in to comment.