renamed Visible to Availability and added help strings
AMOS BEGIN
CPY [availability,core_moodle],[modvisible,core_moodle]
CPY [availability,core_moodle],[modvisiblewithstealth,core_moodle]
CPY [availability,core_moodle],[modvisiblehiddensection,core_moodle]
CPY [show,core_moodle],[modshow,core_moodle]
CPY [hide,core_moodle],[modhide,core_moodle]
AMOS END
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.
Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.
When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.
Part of MDL-58220
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
1. BrowserKitDriver::setValue only checks if the element is
disabled. It still is able to set value on hidden elements
So there is no need for noscript tag in password unmask
2. Set size on hidden field is not valid html, so set it later
when text element is displayed
Some "select" based form elements are not inheriting directly from
MoodleQuickForm_select - so did not have the adjustment to the form
field name that allows multiple values. I moved this fix to the
templateable trait so all the form fields get this fix.
Wrap the HTML from a static form element with "form-control-static" to apply correct padding.
Also use a span, not a label for unlabelable static form elements.
We had a few problems here.
1/ The auto complete element was displaying the picker though the
field was frozen.
2/ Checking for existing enrolment including the courses chosen was
not checking if the courses found were in the instance we edit.
3/ Upon creation we support multiple courses but when editing we
should not expect more than the course in the instance being edited.
The initial approach I took was to provide a noscript area containing the
standard input element, and to move it to a hidden input element as part of
the passwordunmask setup.
This allowed behat tests to pass both with and without JS enabled (i.e.
with Goutte and real browsers), and also ensured that the real input did
not appear on screen.
However, the standard formslib validation occurs before other page JS is
run and hooks into the elements on page during its setup.
Since noscript elements are not accessible to scripts as standard elements,
the form validation would fail for _client_ side validation and work for
server-side validation.
This change creates creates the hidden input element in the template
instead, as well as the password element in the noscript tag.
Doing this means that when JS is disabled, the form has two elements of the
same name - one hidden, and the second a visible password field.
Since the latter element will always override the former one on form
submission, and the noscript variant is last, the noscript variant wins
when JS is disabled and tests continue to pass.
When JS is enabled, the noscript variant is not a valid part of the DOM
(the browser sees it as a hidden text field essentially). The password is
not automatically entered into the hidden field, so the autocomplete
prevention continues to work as expected.
This version:
* should work with the Behat Goutte driver
* should not suffer from password autofill anxiety
* should allow unmasking (and masking) of a password
* should allow editing of passwords in either masked, or unmasked form
AMOS BEGIN
MOV [revealpassword,core_form],[passwordunmaskrevealhint,core_form]
AMOS END