The patch increases the maximum supported precision (total number of
digits) for numeric (decimal) fields to 38 digits (current limit on
Oracle and MSSQL).
Additionally, we add our own limit for the whole number part of numeric
fields so they are no longer than integer fields (20 digits). This is to
make it easier to eventually convert from one field type to another.
Note that PHP floats commonly support precision of roughly 15 digits
anyway.
We are going to unify the maximum supported precision of all numeric
fields to 38 digits (which are the current Oracle and MSSQL limits). Get
rid of hard-coded exceptions for longer fields.
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.