If the grade types text or none are selected for an item or a category,
none of the 'grade display type' options will change the displayed
grade within the reports. Thus, we can disable the settings for grade
display type as well as the one for decimal places in this case.
3.7 (min PHP 7.1) requires 3.2 (first version supporting PHP 7.1)
This just deletes all the upgrade steps previous to 3.2.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 < 2016120500 (v3.2.0) as anti-cheating measure.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase. (note there isn't any this time).
The progress bar is being used when there are a large amount
of grades being recalculated. This was throwing a debugging message
about NO_OUTPUT_BUFFERING being unset.
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:
- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.
The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
change to continue 2
- When it was not clear, keep old behavior switching to break, no
matter how weird the behavior may be.
If javascript is disabled, we don't need to open the menus at all. If it is enabled
we should use the custom step where possible.
In some tests (user profile) we have to use link_or_button because
the element that opens the menu will be a link or a button in different themes.
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.
Change highlights:
- Remove unnecessary mark_dirty() calls performed after
assign_capability(), unassign_capability(), delete_role(),
deleted contexts, brand new contexts
- Move role definition cache clear from the user-centric
accesslib_clear_all_caches() to the newly created,
role-dedicated accesslib_reset_role_cache()
Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.