Adaptable theme for Moodle 4.1 to 4.4 updated

Adaptable theme for Moodle 4.1 to 4.4 updated

by Gareth J Barnard -
Number of replies: 10
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello,

I've released an updated versions of the Adaptable themes as follows:

Release 404.1.0 for Moodle 4.4 version 2024042200.00 (Build: 20240422) and above within the MOODLE_404_STABLE branch until the next release:

with:

  1. Fix header information overridden when set in the context header leading to missing output.
  2. Add 'Information blocks'.  This is designed to be a replacement for the marketing blocks that are now deprecated.  The code that they use has always been problematic and subject to contained file based content being lost on occasion, or rather not lost but misplaced in terms of linkage at times.  I've never been able to entirely rectify or resolve the issues.  Therefore instead of reinventing the wheel, I've gone for a block region based solution whereby proven and tested block code is employed.  Instead of defining the content in the theme settings, you'll create blocks and place them in the 'information' region on the front page.  Of course you'll find all of the other settings in place to control the layout and visiblity as before, on the theme's 'Information blocks' settings tab.  When editing you'll see the full block header with each block having the same width to allow easy manipulation, i.e. the layout you set is not applied.  Its only when editing is off that the layout is applied and the block titles removed.  If you see the word 'Overflow' then that means that you have more blocks than you've defined in the layout rows to allow.  Admins will see 'Marketing blocks are deprecated, please migrate to using the Information block region.'.  When editing, block regions will have their name at the top.  In testing with re-ordering the blocks I did find this problematic and could not work out entiry why as the theme code is doing what it should do, the core code is telling the backend via an AJAX call about the reordering, just that after doing so then it seemed that cron had to run for the changes to become permanent.  It is my intention that other settings employing the same code as the marketing blocks will also migrate to this improved solution.
  3. Improve the look of the calendar block controls and fix the next and previous icons.
  4. Improve the layout builder to have new clearer responsive images.

Release 403.1.5 for Moodle 4.3 version 2023100900.00 (Build: 20231009) and above within the MOODLE_403_STABLE branch until the next release:

Release 402.1.4 for Moodle 4.2 version 2023042400.00 (Build: 20230424) and above within the MOODLE_402_STABLE branch until the next release:

Release 401.1.12 for Moodle 4.1 version 2022112800.00 (Build: 20221128) and above within the MOODLE_401_STABLE branch until the next release:

all with:

  1. Reduce drawer flicker on page load when the navbar is sticky.
  2. Fix 'itemid' not being regenerated for 'customjsfiles'.
  3. Add ability to move custom menus into a single menu to save navbar space by giving 'custommenutitle' setting a value.  Note: At bottom of the 'Navbar' settings tab.
  4. Improve custom menu code to facilitate simple inclusion of Font Awesome icons.
  5. Fix dropdown menu id's.
  6. Remember the tab currently selected when saving settings.
  7. Functionality using a 'custom menu' such as 'Custom menu items', 'Header menus' and 'Tools menu' now supports the format as shown below.
  8. Renamed 'Tools menu dropdown' setting tab to 'Tools menu'.
  9. Add 'customusermenuitems' to the user menu.
  10. Add FontAwesome support to 'customusermenuitems' as the third parameter, name or CSS classes.
  11. Add duplicate entries for 'custommenuitems' and 'customusermenuitems' on a new 'Custom menu' settings tab.
  12. Settings language strings tidy.
  13. Social icons improvement to use either icon name or CSS classes.
  14. Replace 'menuhovercolor' with 'menubkhovercolor' and 'menufonthovercolor' to fix menu hovering.
  15. Add 'courseindexenabled' setting on the 'Course index' tab to enable / disable the 'Course Index'.
  16. Fix header information overridden when set in the context header leading to missing output.
  17. Add 'Information blocks'.  This is designed to be a replacement for the marketing blocks that are now deprecated.  The code that they use has always been problematic and subject to contained file based content being lost on occasion, or rather not lost but misplaced in terms of linkage at times.  I've never been able to entirely rectify or resolve the issues.  Therefore instead of reinventing the wheel, I've gone for a block region based solution whereby proven and tested block code is employed.  Instead of defining the content in the theme settings, you'll create blocks and place them in the 'information' region on the front page.  Of course you'll find all of the other settings in place to control the layout and visiblity as before, on the theme's 'Information blocks' settings tab.  When editing you'll see the full block header with each block having the same width to allow easy manipulation, i.e. the layout you set is not applied.  Its only when editing is off that the layout is applied and the block titles removed.  If you see the word 'Overflow' then that means that you have more blocks than you've defined in the layout rows to allow.  Admins will see 'Marketing blocks are deprecated, please migrate to using the Information block region.'.  When editing, block regions will have their name at the top.  In testing with re-ordering the blocks I did find this problematic and could not work out entiry why as the theme code is doing what it should do, the core code is telling the backend via an AJAX call about the reordering, just that after doing so then it seemed that cron had to run for the changes to become permanent.  It is my intention that other settings employing the same code as the marketing blocks will also migrate to this improved solution.
  18. Improve the look of the calendar block controls and fix the next and previous icons.
  19. Improve the layout builder to have new clearer responsive images.

Item 7 format:

    text|url|title|langs|fontawesome classes or name|capability.
   where:
     text - Text to show for the entry.
     url - URL of the entry.
     title - Title attribute in the link tag value.
     langs - Only show on the given language codes - separate more than one with a comma.
     fontawesome classes or name - State the Font Awesome classes or name for the icon that is placed before the text.
     capability - State the capability to check that the user has on the page before showing, for example
       'moodle/course:manageactivities' to only show to editing teachers.

Please note that to use the 'Information blocks', this is a 'Block region' like any other so use it accordingly.  The only difference is the horizontal layout and the presentation of the blocks when editing is off.

These releases could contain bugs and so I strongly recommend that you check on a test server first!  Not sure how to set one up?  Then look at the 'Installer packages' on https://download.moodle.org/releases/latest/. Ensure that you have multiple backups of all data before using.  Please report any issues. i.e. 'bugs' with this release ONLY here.  Before doing so please read 'Reporting issues' on the 'Information' tab on the theme 'Settings' under 'Site administration' -> 'Appearance' -> 'Adaptable'.

Note: Always install on a test server to confirm that the theme does what you want it to do before updating or installing on a production server.

Note: Adaptable for Moodle 4.1 and above contain some functionality that is available to sponsors only.  Always install on a test server to confirm that the theme does what you want it to do before updating or installing on a production server.

If you find this post useful, then please mark it so.

Thank you,

Gareth

Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Liko Purba -
Dear Gareth thank you for your hard work

I'm trying to activate reCaptcha Google v2 in Moodle
But it appear when I'm using Adaptable, the "Checkbox I'm not a Robot" is not showing
But the box is visible when using Boost Theme

reCaptcha Google is showing in Boost Theme
 
reCaptcha Google not showing in Adaptable
 
Release 404.1.0, version 2024032802 on Moodle 4.4.1+ (Build: 20240627)
 
Thank You
In reply to Liko Purba

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Is a bug (as in something needs to change because something else has changed) Liko and the fix will be in the next release.
In reply to Gareth J Barnard

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Christine Ce -

Hi Gareth, 

Thanks for all your work on this theme. 

We are having trouble with the information blocks. They're not behaving responsively: on a small screen, instead of rearranging themselves vertically, as I would expect them to do, they just shrink to the size of the screen until they are unusable. Is there a setting somewhere we're missing that we need to enable so that they behave in a more responsive manner, or is it a bug? 

I include a screenshot

Thanks!

Christine

Attachment iPhone12ss.PNG
In reply to Christine Ce

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Bug, thanks for the report Christine.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Christine Ce -
Thanks for your reply, Gareth. Do you know when it might be fixed?
In reply to Christine Ce

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

The fix will be in the next release when that happens Christine.  In the mean time, this is the fix:

Attachment Screenshot 2024-08-15 173405.png
In reply to Gareth J Barnard

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Christine Ce -
Thanks Gareth, I appreciate you taking the time to reply! I'm not sure I can do anything with the fix, but I'll pass it on.

Is there any likelihood that the next release will happen before 21 September? (She asked hopfully...)
In reply to Christine Ce

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Christine,

No problem. There might be a release before the 21st September, will just have to see how things go. I tend to do releases when there are a lot of changes or a critical bug to fix. It just takes around 10 - 15 mins per release and that can add up when releasing for four versions of Moodle. That doesn't include the time it takes to backport improvements in the main branch to support older major versions of Moodle. In addition I want to avoid the 'Oh no not another release' situation.

Gareth
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Adaptable theme for Moodle 4.1 to 4.4 updated

by Christine Ce -
Thanks Gareth, I totally see your point...