Quellcode durchsuchen

Fix Next or previous button while the item position is first or last - Refs BT#11192

José Loguercio vor 8 Jahren
Ursprung
Commit
abc1ae73af
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      main/lp/learnpath.class.php

+ 3 - 3
main/lp/learnpath.class.php

@@ -11157,9 +11157,9 @@ EOD;
         $lpItemId = [];
 
         $typeListNotToVerify = self::getChapterTypes();
-        foreach ($this->items as $item) {
-            if (!in_array($item->get_type(), $typeListNotToVerify)) {
-                $lpItemId[] = $item->get_id();
+        foreach ($this->get_toc() as $item) {
+            if (!in_array($item['type'], $typeListNotToVerify)) {
+                $lpItemId[] = $item['id'];
             }
         }