Skip to content

Commit

Permalink
Fixed rendering of coursecards in Moodle 3.10-.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-milette committed Oct 25, 2023
1 parent 39ff123 commit 48725b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.4.2] 2023-10-25
### Updated
- Fixed bug with rendering of coursecards in Moodle 3.10 and earlier.

## [2.4.1] 2023-10-23
### Added
- New %7Bwwwroot%7D - alias for the {wwwroot} tag.
Expand Down
4 changes: 2 additions & 2 deletions filter.php
Expand Up @@ -502,9 +502,9 @@ private function rendercoursecards($rcourseids, $format = 'vertical') {
}
$coursefiles = $course->get_course_overviewfiles();
$imgurl = '';
if ($CFG->branch >= 33) {
if ($CFG->branch >= 311) {
$imgurl = \core_course\external\course_summary_exporter::get_course_image($course);
} else { // Previous to Moodle 3.3.
} else { // Previous to Moodle 3.11.
foreach ($coursefiles as $file) {
if ($isimage = $file->is_valid_image()) {
// The file_encode_url() function is deprecated as per MDL-31071 but still in wide use.
Expand Down
2 changes: 1 addition & 1 deletion lang/en/filter_filtercodes.php
Expand Up @@ -51,7 +51,7 @@
$string['coursecontactshowdesc'] = 'Show contact\'s profile description.';
$string['coursecontactshowdesc_desc'] = 'If enabled, will display the contact\'s profile description in {coursecontacts} tags.';
$string['coursecontactlinktype'] = 'Contact link type';
$string['coursecontactlinktype_desc'] = 'Choose the type of link for the contact\s link in the {coursecontacts} tags.';
$string['coursecontactlinktype_desc'] = 'Choose the type of link for the contact\'s link in the {coursecontacts} tags.';
$string['showhiddenprofilefields'] = 'Show hidden profile fields';
$string['showhiddenprofilefields_desc'] = 'Enable the {profile_field_...} tag to process all profile fields including ones hidden from the user.';
$string['ifprofilefiedonlyvisible'] = '{ifprofile_field_} only visible.';
Expand Down
4 changes: 2 additions & 2 deletions version.php
Expand Up @@ -25,8 +25,8 @@

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

$plugin->version = 2023102300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2023102500; // 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.4.1';
$plugin->release = '2.4.2';
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 48725b1

Please sign in to comment.