Merge branch 'MDL-53111_m31v1' of https://github.com/sbourget/moodle into MOODLE_31_STABLE
This commit is contained in:
@@ -426,6 +426,12 @@ class mod_lesson_mod_form extends moodleform_mod {
|
||||
$data->completiontimespent = 0;
|
||||
}
|
||||
}
|
||||
if (!empty($data->completionunlocked)) {
|
||||
$autocompletion = !empty($data->completion) && $data->completion == COMPLETION_TRACKING_AUTOMATIC;
|
||||
if (empty($data->completionendreached) || !$autocompletion) {
|
||||
$data->completionendreached = 0;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user