From 4390a542c6154874394f0d97d9f790a88de93173 Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Fri, 4 Oct 2024 11:46:38 -0400 Subject: [PATCH] Fixed issue with %7Bcoursemoduleid%7D leaving % symbol behind. --- CHANGELOG.md | 1 + classes/text_filter.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 081f227..371456d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. - New {ifnotgrouping groupingid}...{/ifnotgrouping} tag. - New {mygroupings} tag. ### Updated +- Fixed issue with %7Bcoursemoduleid%7D leaving % symbol behind. - Fixed issue when {coursesummary} is used in a block. - Link to External LTI now only available in Moodle 4.3+. - Addressed compatibility issue with mod_hvp that prevents link to current theme settings from working. diff --git a/classes/text_filter.php b/classes/text_filter.php index bc361dc..934c565 100644 --- a/classes/text_filter.php +++ b/classes/text_filter.php @@ -1714,7 +1714,7 @@ public function filter($text, array $options = []) { // Description: Alias for {coursemoduleid}. Useful for encoded URLs. // Parameters: None. if (stripos($text, '%7Bcoursemoduleid%7D') !== false) { - $text = str_replace('7Bcoursemoduleid%7D', '{coursemoduleid}', $text); + $text = str_replace('%7Bcoursemoduleid%7D', '{coursemoduleid}', $text); } // Tag: {coursemoduleid}.