Merge branch 'MDL-73547-master-v03' of https://github.com/ferranrecio/moodle

This commit is contained in:
Andrew Nicols 2022-02-25 10:55:20 +08:00
commit faa6c74404
26 changed files with 292 additions and 80 deletions

View file

@ -27,6 +27,7 @@
*/
use core_completion\activity_custom_completion;
use core_courseformat\base as course_format;
defined('MOODLE_INTERNAL') || die();
@ -635,6 +636,12 @@ class completion_info {
return;
}
// The activity completion alters the course state cache for this particular user.
$course = get_course($cm->course);
if ($course) {
course_format::session_cache_reset($course);
}
// For auto tracking, if the status is overridden to 'COMPLETION_COMPLETE', then disallow further changes,
// unless processing another override.
// Basically, we want those activities which have been overridden to COMPLETE to hold state, and those which have been

View file

@ -211,6 +211,12 @@ $definitions = array(
'simplekeys' => true,
'ttl' => 3600,
),
// Course reactive state cache.
'courseeditorstate' => [
'mode' => cache_store::MODE_SESSION,
'simplekeys' => true,
'simpledata' => true,
],
// Used to store data for repositories to avoid repetitive DB queries within one request.
'repositories' => array(
'mode' => cache_store::MODE_REQUEST,