Skip to content

Commit

Permalink
Fixed minor issue using {coursesummary} tag in a block.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed Oct 4, 2024
1 parent dcc4b4c commit 8e2d137
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.5.2] 2024-09-03 (dev)
## [2.5.2] 2024-10-04 (rc)
### Added
- New {menulanguages} tag.
- New {keyboard}...{/keyboard} tag.
Expand All @@ -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 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.
- Refactoring in preparations for Moodle 4.5.
Expand Down
9 changes: 8 additions & 1 deletion classes/text_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1161,8 +1161,15 @@ private function generatortags(&$text) {
// No course ID specified.
$coursecontext = \context_course::instance($PAGE->course->id);
$PAGE->course->summary == null ? '' : $PAGE->course->summary;
$replace['/\{coursesummary\}/i'] = format_text(
$summary = file_rewrite_pluginfile_urls(
$PAGE->course->summary,
'pluginfile.php',
$coursecontext->id,
'course',
'section',
0);
$replace['/\{coursesummary\}/i'] = format_text(
$summary,
FORMAT_HTML,
['context' => $coursecontext]
);
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024082300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2024100400; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2014051200; // Requires Moodle version 2.7 or later.
$plugin->component = 'filter_filtercodes'; // Full name of the plugin (used for diagnostics).
$plugin->release = '2.5.2';
Expand Down

0 comments on commit 8e2d137

Please sign in to comment.