LearnR - Fix Bootstrap 5 compatibility issues - #55
Open
jlhollowell wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Bootstrap 5 compatibility issues (collapse, dropdown, utility classes)
Description
This PR updates the LearnR theme to improve compatibility with Moodle 5.x (Bootstrap 5), addressing several UI elements that no longer function due to deprecated Bootstrap 4 attributes and classes.
Key fixes
• Updated deprecated Bootstrap 4 attributes:
• data-toggle → data-bs-toggle
• data-target → data-bs-target
• Restored functionality of:
• Course Management panel (collapse toggle)
• Header dropdown menus (e.g., “My Courses”)
• Front page icon slider (collapse behavior)
• Updated Bootstrap utility classes:
• ml-* / mr-* → ms-* / me-*
• text-left → text-start
• Cleaned up minor HTML issues:
• Removed invalid alt attributes from elements
• Corrected duplicate class attribute in collapse panel
• Replaced invalid role="iconbtn" with role="button"
Notes
• These changes were tested on Moodle 5.1.
• No functional changes beyond restoring expected UI behavior.
• Changes are limited in scope to avoid impacting broader theme structure.
Version
• Bumped $plugin->version to reflect this update.
Summary
This PR restores broken interactive elements caused by Bootstrap 5 migration and improves overall compatibility with newer Moodle versions while keeping changes minimal and focused.