-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.5.1
-
MOODLE_405_STABLE
An error was detected, on a site with read-only sessions enabled, when browsing to the "Single view" grade report.
All the cache definitions with a "session" mode are linked to our Redis store.
To trigger this error, using a site with read-only sessions turned on (add $CFG->enable_read_only_sessions = true; to your config file), navigate to a course (some content might be required), go to Grades, change the report to "Single view", then "Grade items".
Error:
The session caches can not be in the session store when enable_read_only_sessions is enabled. Please map all session mode caches to be outside of the default session store before enabling this features. Found these definitions in the session: adhoc/gradereport_singleview_perpage
$a contents:
Stack trace:
line 175 of /lib/classes/session/manager.php: core\exception\moodle_exception thrown
line 136 of /lib/classes/session/manager.php: call to core\session\manager::start_session()
line 905 of /lib/setup.php: call to core\session\manager::start()
line 206 of /config.php: call to require_once()
line 27 of /grade/report/singleview/index.php: call to require_once()
Fwiw, https://github.com/moodle/moodle/blob/main/grade/report/singleview/classes/local/screen/screen.php#L130 (and similar in flickrclient.php) are the only instances of a MODE_SESSION cache created in this way.
We only noticed this recently, because we only recently started using read-only sessions.