Skip to content

Commit a7ce37e

Browse files
committed
V405.1.3
1 parent d1b8475 commit a7ce37e

File tree

4 files changed

+25
-10
lines changed

4 files changed

+25
-10
lines changed

Changes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Change Log in version 405.1.3 (2024100504)
2+
==========================================
3+
1. Improve FontAwesome class name processing for setting values.
4+
2. Fix impact of MDL-79986 removing section anchors from the course format URL ('get_view_url()' in the format's 'lib.php' file)
5+
causing the 'Sections' in the 'This course' menu to no longer go to the given section on the page.
6+
17
Change Log in version 405.1.2 (2024100503)
28
==========================================
39
1. Add 'logoalt' setting to provide a description of your logo for accessibility. Multilang compatible.

classes/output/core_renderer_toolbox.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,8 +1884,8 @@ protected function create_course_sections_menu($menu) {
18841884
$modinfo = get_fast_modinfo($COURSE);
18851885
$numsections = $courseformat->get_last_section_number();
18861886
$sectionsformnenu = [];
1887-
foreach ($modinfo->get_section_info_all() as $section => $thissection) {
1888-
if ($section > $numsections) {
1887+
foreach ($modinfo->get_section_info_all() as $sectionno => $thissection) {
1888+
if ($sectionno > $numsections) {
18891889
// Don't link to stealth sections.
18901890
continue;
18911891
}
@@ -1894,10 +1894,14 @@ protected function create_course_sections_menu($menu) {
18941894
$showsection = $thissection->uservisible ||
18951895
($thissection->visible && !$thissection->available && !empty($thissection->availableinfo));
18961896

1897-
if (($showsection) || ($section == 0)) {
1898-
$sectionsformnenu[$section] = [
1899-
'sectionname' => $courseformat->get_section_name($section),
1900-
'url' => $courseformat->get_view_url($section),
1897+
if (($showsection) || ($sectionno == 0)) {
1898+
$url = $courseformat->get_view_url($sectionno);
1899+
if (empty($url->get_encoded_anchor())) {
1900+
$url->set_anchor('section-'.$sectionno);
1901+
}
1902+
$sectionsformnenu[$sectionno] = [
1903+
'sectionname' => $courseformat->get_section_name($sectionno),
1904+
'url' => $url,
19011905
];
19021906
}
19031907
}

classes/toolbox.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,16 @@ public static function getfontawesomemarkup($theicon, $classes = [], $attributes
625625
$theicon = trim($theicon);
626626
if (mb_strpos($theicon, ' ') === false) { // No spaces, so find.
627627
$fav = self::get_setting('fav');
628+
$hasprefix = (mb_strpos($theicon, 'fa') !== false);
628629
if (!empty($fav)) {
629630
$toolbox = self::get_instance();
630-
$classes[] = $toolbox->get_fa6_from_fa4($theicon);
631+
$classes[] = $toolbox->get_fa6_from_fa4($theicon, $hasprefix);
631632
} else {
632-
$classes[] = 'fa fa-' . $theicon;
633+
$iconprefix = 'fa ';
634+
if (!$hasprefix) {
635+
$iconprefix .= 'fa-';
636+
}
637+
$classes[] = $iconprefix . $theicon;
633638
}
634639
} else {
635640
// Spaces so full icon specified.

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
$plugin->component = 'theme_adaptable';
3434

3535
// Adaptable version date (YYYYMMDDrr where rr is the release number).
36-
$plugin->version = 2024100503;
36+
$plugin->version = 2024100504;
3737

3838
$plugin->requires = 2024100700.00; // 4.5 (Build: 20241007).
3939

4040
$plugin->supported = [405, 405];
4141

4242
// Adaptable version using SemVer (https://semver.org).
43-
$plugin->release = '405.1.2';
43+
$plugin->release = '405.1.3';
4444

4545
// Adaptable maturity (do not use ALPHA or BETA versions in production sites).
4646
$plugin->maturity = MATURITY_STABLE;

0 commit comments

Comments
 (0)