Skip to content

Commit

Permalink
Merge branch 'MDL-33829_22' of https://github.com/andyjdavis/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_22_STABLE
  • Loading branch information
Sam Hemelryk committed Oct 2, 2012
2 parents 2213098 + e1f24eb commit bd465e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/glossary/lib.php
Expand Up @@ -1143,7 +1143,9 @@ function glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode='',$h
} }
} }
$fs = get_file_storage(); $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); $button->set_formats(PORTFOLIO_FORMAT_RICHHTML);
} else { } else {
$button->set_formats(PORTFOLIO_FORMAT_PLAINHTML); $button->set_formats(PORTFOLIO_FORMAT_PLAINHTML);
Expand Down
6 changes: 6 additions & 0 deletions mod/glossary/locallib.php
Expand Up @@ -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', 'attachment', $this->entry->id, "timemodified", false),
$fs->get_area_files($context->id, 'mod_glossary', 'entry', $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);
}
} }


/** /**
Expand Down

0 comments on commit bd465e3

Please sign in to comment.