Files that are oversized could have been uploaded by a user who
can ignore the file size limits. These files should not be deleted
in these situations.
There is an edge case whereby redis will fail
to accept connections on the first try but
retrying the connection seems to make it work
Included in this commit:
* Retry functionality in the session init
If the file does not have Unix line endings then the regular expression
in oci_native_moodle_database::attempt_oci_package_install() does
not split it correctly.
This leads to an invalid package being created in Oracle.
The .gitattribute file changes for oci_native_moodle_package.sql
force it to have Unix style line endings when the branch is checked
out and the file does not already exist.
The file has been modified so that the Unix style line endings are
applied even if the file already exists, for example when pulling in
this change to an existing branch.
There were basically two problems, which are demostrated by
the new test users u7 and u8 in the unit test.
1. There was a problem if a role was overridden in a context above the
one where it was assigned. E.g. User has teacher role in a course, and
there is a role override in the course-category context. That was being
ignored.
2. Problems with the handling of PROHIBITs. It should be the case that
if there is a PROHIBIT in force, then it cannot be overridden by another
role, or by a role override. However, this was not working in all cases.
Also, I had to add comments to the unit test so that I could understand
it. Hopefully these will be hepful to other developers too.
Now when enrol_get_my_courses(), enrol_get_users_courses() and
enrol_get_all_users_courses() methods automatically reflect the
navsortmycoursessort setting by default, we do not need to manually
compose the sorting any more.
Similarly to what the previous patch does, we now change the default
sorting in functions enrol_get_users_courses() and
enrol_get_all_users_courses() too.
The patch also adds missing phpDocs for the functions, improves the
readability of some existing bits and mentions the changes in the
enrol/upgrade.txt file.
The new default value (null) now respects the navsortmycoursessort
behaviour and should be consistently used whenever we are displaying the
courses in the UI.
LTS (3.5) requires previous LTS (3.1)
This just deletes all the upgrade steps previous to 3.1.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2016052300 (v3.1.0) as anti-cheating measure.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.