Browse Source

Add "parent" field, used in new functions getParentToc/getChildrenToc

See:
e8ced63
Julio 7 years ago
parent
commit
04e4faa520
1 changed files with 2 additions and 1 deletions
  1. 2 1
      main/lp/learnpath.class.php

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

@@ -3022,7 +3022,7 @@ class learnpath
                 'type' => $this->items[$item_id]->get_type(),
                 'description' => $this->items[$item_id]->get_description(),
                 'path' => $this->items[$item_id]->get_path(),
-
+                'parent' => $this->items[$item_id]->get_parent(),
             );
         }
         if ($this->debug > 2) {
@@ -3249,6 +3249,7 @@ class learnpath
 
         foreach ($tree as $subtree) {
             $subtree['tree'] = null;
+
             if (!in_array($subtree['type'], $dirTypes) && $subtree['parent'] == $id ) {
                 if ($subtree['id'] == $this->current) {
                     $subtree['current'] = 'active';