Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6, 2.7
-
Fix Version/s: 2.8
-
Component/s: Accessibility, HTML and CSS, JavaScript
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Fixed Branches:MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-44486-master -
Pull Master Diff URL:
Description
The progress bar (or at least the one at the following location, there seems to be several in Moodle, including some that show progress but aren't actually bars as such) is ugly and it's hard to fix this in a theme because the style is applied via a style tag in the HTML.
https://github.com/moodle/moodle/blob/master/lib/weblib.php#L3001-L3012
To overcome those styles you'd need to add !important to your CSS which is generally a sign you're doing something wrong.
The fix is to remove all the unnecessary styles, and add a couple of class names so that styles can be attached via CSS.
There's also a "wibbler", I'm not really sure what this, but it's also quite ugly and sometimes attached to the bottom of the progress bar so it might be able to be fixed at the same time.
The easiest way to see a progress bar is to edit the language pack, but they pop up in other areas too like backup.
There's also a few styles hard-coded into the javascript that animates the progress bar as well. They could probably just be deleted. They seem intended to change the color of the progress bar in order to show progress, but that's already well covered by the progress bar itself, and the textual display of the percentage progress. And since that javascript is loaded and processed by every page, it's probably best if it stuck to the basics.