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

See:
e8ced63
pull/2487/head
Julio 7 years ago
parent db74ab4c40
commit 04e4faa520
  1. 3
      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';

Loading…
Cancel
Save