mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Merge branch 'MDL-65952' of https://github.com/fabiendallet/moodle
This commit is contained in:
commit
32113d7a9b
@ -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