소스 검색

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

José Loguercio 8 년 전
부모
커밋
abc1ae73af
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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'];
             }
         }