- Created a "Course preferences" for user preference. This
is where "activity chooser off/on" option is moved.
- Changed the lib/navigationlib.php to have a new user preference
section, which is "Course preferences".
- Removed the "activity chooser" toggle codes in javascript.
Previously if the date field was not enabled it would
be treated as having value 0. A bug would allow this 0
to pass through and save the date as 1 January 1970
The validation of the timezone field should not occur, especially
when it is automatically cleaned. Timezones can be volatile, we
must try hard to fallback on real timezones and must not lose reset
the values arbitrarily.
"There is absolutely no need to change $CFG->timezone and user timezones
in database - the timezones may come and go. If you change the value in
upgrade or on the fly you would not be able to get it back. This is the
reason why I implemented the "invalid timezone" thing in server and
user settings instead." - Petr Skoda (MDL-49684)
This commit replace as much as possible of clean_param and PARAM_ usages related to user object.
Also few unit tests has been changed to match the new validation
The new validation were added to user_create_user and user_update_user,
displaying debug message if some invalid data has been found.
Also the unit tests of those methods has been changed to match the methods behaviour.
Fix:
$PAGE->context must be reset when calling validate_context
Improve:
Provide wrapper for calling an external function
The wrapper correctly checks the function parameters and return type against
the description of the external function, and stores the PAGE and COURSE global
state variables, restoring them before the function returns.
Fix: buggy unit tests.
These tests are expecting debugging from a bug that was fixed, and calling web
service functions with no user or session.
1. Participants are sorted by last access and they could
be different on different db's. So sort them by last name
before checking.
2. Use Give-When-Then steps.
This change prevents from registering and/or saving the profile of a
user with the whitespace instead of the required name.
Additionally, there is accessibility improvement for better error labels
in case of missing values (copied over from signup_form).
Previously the role assignment url was used when a role was selected, but
this page doesn't enrol users into the course (its the old 1.9 way
before we had the enrollments table).