Skip to content

Commit 90bd5a4

Browse files
committed
Merge pull request ILIAS-eLearning#7517 from chlulei/8_il_lp_status_array_diff_fix
Fixes array diff call, the structure of the compared arrays did not m…
1 parent ee13c97 commit 90bd5a4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Services/Tracking/classes/class.ilLPStatus.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
declare(strict_types=0);
43
/**
54
* This file is part of ILIAS, a powerful learning management system
65
* published by ILIAS open source e-Learning e.V.
@@ -17,6 +16,8 @@
1716
*
1817
*********************************************************************/
1918

19+
declare(strict_types=0);
20+
2021
/**
2122
* Abstract class ilLPStatus for all learning progress modes
2223
* E.g ilLPStatusManual, ilLPStatusObjectives ...
@@ -889,8 +890,9 @@ protected static function checkLPModesForObjects(
889890
}
890891

891892
// missing objects in DB (default mode)
893+
$existing_obj_ids = array_keys($existing);
892894
if (sizeof($existing) != sizeof($a_obj_ids)) {
893-
foreach (array_diff($a_obj_ids, $existing) as $obj_id) {
895+
foreach (array_diff($a_obj_ids, $existing_obj_ids) as $obj_id) {
894896
$olp = ilObjectLP::getInstance($obj_id);
895897
$mode = $olp->getCurrentMode();
896898
if ($mode == ilLPObjSettings::LP_MODE_DEACTIVATED) {

0 commit comments

Comments
 (0)