mirror of
https://github.com/moodle/moodle.git
synced 2025-04-18 15:07:34 +02:00
MDL-65952 mod_scorm: Fix unwanted changes to require status
This commit is contained in:
parent
fd126006b0
commit
f6cd1cc153
@ -551,8 +551,13 @@ class mod_scorm_mod_form extends moodleform_mod {
|
||||
// Convert completionstatusrequired to a proper integer, if any.
|
||||
$total = 0;
|
||||
if (isset($data->completionstatusrequired) && is_array($data->completionstatusrequired)) {
|
||||
foreach (array_keys($data->completionstatusrequired) as $state) {
|
||||
$total |= $state;
|
||||
foreach ($data->completionstatusrequired as $state => $value) {
|
||||
if ($value) {
|
||||
$total |= $state;
|
||||
}
|
||||
}
|
||||
if (!$total) {
|
||||
$total = null;
|
||||
}
|
||||
$data->completionstatusrequired = $total;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user