Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…nto MOODLE_23_STABLE
  • Loading branch information...
commit c67ed6adfe88ea0b378fbb9c287ce75b7d898967 2 parents 9289c14 + 8885207
@samhemelryk samhemelryk authored
Showing with 9 additions and 1 deletion.
  1. +3 −1 mod/glossary/lib.php
  2. +6 −0 mod/glossary/locallib.php
View
4 mod/glossary/lib.php
@@ -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);
View
6 mod/glossary/locallib.php
@@ -266,6 +266,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);
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.