Move the construction of the useridlist $SESSION cache to when a key
is requested.
This stops the writing of $SESSION when backing up
or restoring mod_assign instances, which is neccessary since the
backup and restore scripts close the session when processing.
The session write_close was moved to the earliest point in the script
that does not modify the session. This is currently always after
$OUTPUT->header()
As part of a restore, the session is closed early so it does not
interrupt the users session during the restore.
Currently the restore controller rebuilds the course caches while
restoring. This inadvertently resets the navcache, which would edit the
session despite it being closed.
Because this tracker now adds logging for this behaviour, it means
restoring now outputs a debugging message as a warning.
To resolve the debugging message, the navcache is now reset just before
closing the session. This is allowed, since the caches are designed
to be volatile.
The script has been reorganised so that it closes the session as early
as possible, without causing session changes after close being logged.
In this case, after the table has been output it is OK to close the
session.
A snapshot of the session is now taken when write_close is called.
The session at shutdown is then compared to the snapshot. If changes
are detected, they are logged. This aids developers in seeing if
early session closes may be having unintended consequences.
Previously, newly added keys to the session were not detected. Objects
with the same properties were also incorrectly reported as different.
This commit improves this, and updates the unit tests to reflect the
new functionality.
In 4.0, the plugin name was added above their name. Based on the community
feedback and the research done by the UX team, this needs to be removed.
This commit removes the activity name when edit mode is disabled.
During request lifecycle ensure that column, filter and condition
persistents are only loaded a single time to prevent additional
database reads.
Provide invalidation method, used by the report helpers, to ensure
that the persistents are re-loaded appropriately.
Co-authored-by: Marina Glancy <marina@moodle.com>