Skip to content

Commit

Permalink
V405.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Feb 16, 2025
1 parent d1b8475 commit a7ce37e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Change Log in version 405.1.3 (2024100504)
==========================================
1. Improve FontAwesome class name processing for setting values.
2. Fix impact of MDL-79986 removing section anchors from the course format URL ('get_view_url()' in the format's 'lib.php' file)
causing the 'Sections' in the 'This course' menu to no longer go to the given section on the page.

Change Log in version 405.1.2 (2024100503)
==========================================
1. Add 'logoalt' setting to provide a description of your logo for accessibility. Multilang compatible.
Expand Down
16 changes: 10 additions & 6 deletions classes/output/core_renderer_toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -1884,8 +1884,8 @@ protected function create_course_sections_menu($menu) {
$modinfo = get_fast_modinfo($COURSE);
$numsections = $courseformat->get_last_section_number();
$sectionsformnenu = [];
foreach ($modinfo->get_section_info_all() as $section => $thissection) {
if ($section > $numsections) {
foreach ($modinfo->get_section_info_all() as $sectionno => $thissection) {
if ($sectionno > $numsections) {
// Don't link to stealth sections.
continue;
}
Expand All @@ -1894,10 +1894,14 @@ protected function create_course_sections_menu($menu) {
$showsection = $thissection->uservisible ||
($thissection->visible && !$thissection->available && !empty($thissection->availableinfo));

if (($showsection) || ($section == 0)) {
$sectionsformnenu[$section] = [
'sectionname' => $courseformat->get_section_name($section),
'url' => $courseformat->get_view_url($section),
if (($showsection) || ($sectionno == 0)) {
$url = $courseformat->get_view_url($sectionno);
if (empty($url->get_encoded_anchor())) {
$url->set_anchor('section-'.$sectionno);
}
$sectionsformnenu[$sectionno] = [
'sectionname' => $courseformat->get_section_name($sectionno),
'url' => $url,
];
}
}
Expand Down
9 changes: 7 additions & 2 deletions classes/toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,16 @@ public static function getfontawesomemarkup($theicon, $classes = [], $attributes
$theicon = trim($theicon);
if (mb_strpos($theicon, ' ') === false) { // No spaces, so find.
$fav = self::get_setting('fav');
$hasprefix = (mb_strpos($theicon, 'fa') !== false);
if (!empty($fav)) {
$toolbox = self::get_instance();
$classes[] = $toolbox->get_fa6_from_fa4($theicon);
$classes[] = $toolbox->get_fa6_from_fa4($theicon, $hasprefix);
} else {
$classes[] = 'fa fa-' . $theicon;
$iconprefix = 'fa ';
if (!$hasprefix) {
$iconprefix .= 'fa-';
}
$classes[] = $iconprefix . $theicon;
}
} else {
// Spaces so full icon specified.
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
$plugin->component = 'theme_adaptable';

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

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

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

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

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

0 comments on commit a7ce37e

Please sign in to comment.