Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
438ecf0fb5
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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'];
             }
         }