Browse Source

Only allow lp item list order buttons for chapter and final item BT#15967

Julio Montoya 5 years ago
parent
commit
7122dc33a1
1 changed files with 2 additions and 4 deletions
  1. 2 4
      main/lp/learnpath.class.php

+ 2 - 4
main/lp/learnpath.class.php

@@ -6438,7 +6438,7 @@ class learnpath
                     );
                 }
 
-                //if ($arrLP[$i]['item_type'] == 'dir') {
+                if (in_array($arrLP[$i]['item_type'], ['dir', 'final_item'])) {
                     /*if ($isFirst) {
                         $orderIcons = Display::url($disableUpIcon, '#', ['class' => 'btn btn-default']);
                     } else {
@@ -6459,9 +6459,7 @@ class learnpath
                         'javascript:void(0)',
                         ['class' => 'btn btn-default order_items', 'data-dir' => 'down', 'data-id' => $arrLP[$i]['id']]
                     );
-                //}
-
-
+                }
 
                 $delete_icon .= ' <a 
                     href="'.$mainUrl.'&action=delete_item&id='.$arrLP[$i]['id'].'&lp_id='.$this->lp_id.'"