Bladeren bron

Merge pull request #1423 from jloguercio/1.11.x

Fix Next or previous button while the item position is first or last - Refs BT#11192
José Loguercio 8 jaren geleden
bovenliggende
commit
438ecf0fb5
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      main/lp/learnpath.class.php

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

@@ -11161,9 +11161,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'];
             }
         }