Esempio n. 1
0
 /**
  * Constructor
  *
  * @param object $a_parent_obj parent gui object
  * @param string $a_parent_cmd parent cmd
  * @param ilObjContentObject $a_lm learning module
  */
 public function __construct($a_parent_obj, $a_parent_cmd, ilObjContentObject $a_lm, $a_id = "")
 {
     $this->lm = $a_lm;
     include_once "./Modules/LearningModule/classes/class.ilLMTree.php";
     $tree = ilLMTree::getInstance($this->lm->getId());
     //echo "+".$tree->isCacheUsed()."+";
     //		$tree = new ilTree($this->lm->getId());
     //		$tree->setTableNames('lm_tree','lm_data');
     //		$tree->setTreeTablePK("lm_id");
     include_once "./Modules/LearningModule/classes/class.ilLMObject.php";
     $this->cnt_lmobj = ilLMObject::preloadDataByLM($this->lm->getId());
     include_once "./Services/COPage/classes/class.ilPageObject.php";
     ilPageObject::preloadActivationDataByParentId($this->lm->getId());
     if ($a_id == "") {
         $a_id = "lm_exp";
         // this does not work, since it is not set yet
         if ($this->getOfflineMode()) {
             $a_id = "lm_exp_off";
         }
     }
     parent::__construct($a_id, $a_parent_obj, $a_parent_cmd, $tree);
     $this->setSkipRootNode(false);
     $this->setAjax(false);
     $this->setPreloadChilds(true);
     if ((int) $_GET["obj_id"] > 0) {
         $this->setPathOpen((int) $_GET["obj_id"]);
     }
 }