diff --git a/README.md b/README.md index d8b898b..6481377 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ This plugin currently supports Moodle: |--------------------|----------------------| | Moodle 3.8 to 3.10 | MOODLE_38_STABLE | | Moodle 3.11 | MOODLE_311_STABLE | -| Moodle 4.0+ | MOODLE_400_STABLE | +| Moodle 4.0 to 4.3 | MOODLE_400_STABLE | +| Moodle 4.4+ | MOODLE_404_STABLE | ## Installation @@ -66,7 +67,7 @@ You can choose from the course settings how the course and section images are di There are three options for formatting the display of the header image: * Contain: Scales the image as large as possible without cropping or stretching the image. * Contain Left: Sam as contain but the image is left aligned. -* Cover: Scales the image (while preserving its ratio) to the smallest possible size to fill, leaving no empty space. Image may be cropped. +* Cover: Scales the image (while preserving its ratio) to the smallest possible size to fill, leaving no empty space. Image may be cropped. * Auto: Scales the background image in the corresponding direction such that its intrinsic proportions are maintained.'; # Crafted by Catalyst IT @@ -81,7 +82,7 @@ https://www.catalyst-au.net/ # Contributing and Support -Issues, and pull requests using github are welcome and encouraged! +Issues, and pull requests using github are welcome and encouraged! https://github.com/catalyst/moodle-format_twocol/issues diff --git a/classes/output/courseformat/content.php b/classes/output/courseformat/content.php index e2278c2..ea6cccb 100644 --- a/classes/output/courseformat/content.php +++ b/classes/output/courseformat/content.php @@ -65,7 +65,7 @@ public function export_for_template(renderer_base $output): stdClass { $data = new stdClass(); $format = $this->format; - $displaysection = $format->get_section_number(); + $displaysection = $format->get_sectionnum(); if (!empty($displaysection)) { $data->singlesectionpage = $this->print_single_section_page($output); } else { @@ -274,7 +274,7 @@ public function print_course_summary(renderer_base $output): stdClass { */ public function print_single_section_page(renderer_base $output): stdClass { $format = $this->format; - $displaysection = $format->get_section_number(); + $displaysection = $format->get_sectionnum(); $course = $format->get_course(); $modinfo = get_fast_modinfo($course); diff --git a/format.php b/format.php index 0b46cb5..866c645 100644 --- a/format.php +++ b/format.php @@ -41,13 +41,10 @@ $renderer = $PAGE->get_renderer('format_twocol'); if (!empty($displaysection)) { - $format->set_section_number($displaysection); + $format->set_sectionnum($displaysection); } $outputclass = $format->get_output_classname('content'); $output = new $outputclass($format); echo $renderer->render($output); -// Include course format js module. We are reusing the core topics format JS. -$PAGE->requires->js('/course/format/topics/format.js'); - diff --git a/templates/course_summary.mustache b/templates/course_summary.mustache index 5f9f4d1..0d4c721 100644 --- a/templates/course_summary.mustache +++ b/templates/course_summary.mustache @@ -41,7 +41,7 @@ {{#courseimage}}style='background-image: url("{{{courseimage}}}"), linear-gradient({{{headerbackcolor}}}, {{{headerbackcolor}}});' {{/courseimage}} {{^courseimage}}style='background-color: {{{headerbackcolor}}};'{{/courseimage}} > - {{#str}}aria:courseimage, core_course{{/str}} + {{fullname}} {{> format_twocol/progress_bar }}