Existing language strings for the host component suggest that the host can
be provided in the format hostname:port, but we previously did not support
this.
This patch explodes the string based on the colon character and assumes
that if there are two parts, that they are in the format hostname:port.
Note: This does not attempt to deal with full host specifications (e.g.
protocol://hostname:port), as this is beyond the scope of this change.
I have spent quite a lot of time working through the current list of
eslint options and configuring them for Moodle style and I think this is
a very good basis to start us at (as well as taking some of out jshint
options out with https://www.npmjs.com/package/polyjuice ). Thanks to
Andrew Nicols, Mark Johnson and Frédéric Massart for some refinements.
With this configuration the grunt build will fail if errors are present
in the js (though you can of course tell jshint to ignore some errors,
as I have done in admin/tool/lp/amd/src/competency_rule_points.js and
defining the Y global in lib/amd/src/yui.js ).
The grunt task will not report warnings by default, but a new
--show-lint-warnings flag will help achieve that. Editor
integrations/stanadalone eslint tool will surely be a better way of
getting eslint errors rather than using the grunt task.
dirname() is a slow function compared with __DIR__ and using
'/../'. Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code. This allows those required includes to perform as
best as possible in this situation.
Changes made in this patch include:
* Reverting to the original look of having the percentage label of the
progress bar inside it.
* Setting a minimum width for the progress bar so the percentage label
will still be visible even at 0%.
* Replaced the blank space between the percent text and the percent
sign with a non-breaking space.
* Added relevant aria attributes for the progress bars.
* I think that this is a good opportunity to use a single template for the
progress bars so I created one that is basically based from the core
template columns-1to2. Column 1 contains the progress text, while column2
contains the progress bar itself.