mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
Merge branch 'MDL-73547-master-v03' of https://github.com/ferranrecio/moodle
This commit is contained in:
commit
faa6c74404
26 changed files with 292 additions and 80 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue