Last active
March 25, 2019 15:11
-
-
Save iarenaza/cd5bb7c766e457caa73e73298bcbf31b to your computer and use it in GitHub Desktop.
moodle-35-glossary-bug-multilang-filter.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/filter/glossary/filter.php b/filter/glossary/filter.php | |
index 1f2591836a1..53f5a68d8ae 100644 | |
--- a/filter/glossary/filter.php | |
+++ b/filter/glossary/filter.php | |
@@ -125,7 +125,7 @@ class filter_glossary extends moodle_text_filter { | |
if ($concept->category) { // Link to a category. | |
$title = get_string('glossarycategory', 'filter_glossary', | |
- ['glossary' => $glossaries[$concept->glossaryid], 'category' => $concept->concept]); | |
+ ['glossary' => format_string($glossaries[$concept->glossaryid]), 'category' => $concept->concept]); | |
$link = new moodle_url('/mod/glossary/view.php', | |
['g' => $concept->glossaryid, 'mode' => 'cat', 'hook' => $concept->id]); | |
$attributes = array( | |
@@ -135,7 +135,7 @@ class filter_glossary extends moodle_text_filter { | |
} else { // Link to entry or alias. | |
$title = get_string('glossaryconcept', 'filter_glossary', | |
- ['glossary' => $glossaries[$concept->glossaryid], 'concept' => $concept->concept]); | |
+ ['glossary' => format_string($glossaries[$concept->glossaryid]), 'concept' => $concept->concept]); | |
// Hardcoding dictionary format in the URL rather than defaulting | |
// to the current glossary format which may not work in a popup. | |
// for example "entry list" means the popup would only contain | |
diff --git a/mod/glossary/showentry_ajax.php b/mod/glossary/showentry_ajax.php | |
index 204d76606f5..b864a54ed9b 100644 | |
--- a/mod/glossary/showentry_ajax.php | |
+++ b/mod/glossary/showentry_ajax.php | |
@@ -71,6 +71,7 @@ if ($entries) { | |
$options->para = false; | |
$options->trusted = $entry->definitiontrust; | |
$options->context = $context; | |
+ $entries[$key]->concept = format_string($entries[$key]->concept); | |
$entries[$key]->definition = format_text($definition, $entry->definitionformat, $options); | |
if (core_tag_tag::is_enabled('mod_glossary', 'glossary_entries')) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment