diff --git a/mod/glossary/edit_form.php b/mod/glossary/edit_form.php index 414bc47879d..ce8443e6762 100644 --- a/mod/glossary/edit_form.php +++ b/mod/glossary/edit_form.php @@ -18,6 +18,11 @@ class mod_glossary_entry_form extends moodleform { $definitionoptions = $this->_customdata['definitionoptions']; $attachmentoptions = $this->_customdata['attachmentoptions']; + $context = get_context_instance(CONTEXT_MODULE, $cm->id); + // Prepare format_string/text options + $fmtoptions = array( + 'context' => $context); + //------------------------------------------------------------------------------- $mform->addElement('header', 'general', get_string('general', 'form')); @@ -30,6 +35,9 @@ class mod_glossary_entry_form extends moodleform { $mform->addRule('definition_editor', get_string('required'), 'required', null, 'client'); if ($categories = $DB->get_records_menu('glossary_categories', array('glossaryid'=>$glossary->id), 'name ASC', 'id, name')){ + foreach ($categories as $id => $name) { + $categories[$id] = format_string($name, true, $fmtoptions); + } $categories = array(0 => get_string('notcategorised', 'glossary')) + $categories; $categoriesEl = $mform->addElement('select', 'categories', get_string('categories', 'glossary'), $categories); $categoriesEl->setMultiple(true); diff --git a/mod/glossary/editcategories.php b/mod/glossary/editcategories.php index 1c45a33325d..3a78f5c0948 100644 --- a/mod/glossary/editcategories.php +++ b/mod/glossary/editcategories.php @@ -79,6 +79,10 @@ $PAGE->set_title(format_string($glossary->name)); $PAGE->set_heading($course->fullname); echo $OUTPUT->header(); +// Prepare format_string/text options +$fmtoptions = array( + 'context' => $context); + if ( $hook >0 ) { if ( $action == "edit" ) { @@ -118,7 +122,7 @@ if ( $hook >0 ) { echo "
" . get_string("delete"). " " . get_string("category","glossary"). "
"; echo $OUTPUT->box_start('generalbox boxaligncenter errorboxcontent boxwidthnarrow'); - echo "| '; |
|---|