/**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_sn_id, $a_se = null)
 {
     global $ilCtrl, $lng, $ilAccess, $lng;
     $this->sn_id = $a_sn_id;
     if ($a_se != null) {
         $this->se = $a_se;
         $this->levels = $this->se->getLevels();
     }
     // build title
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $stree = new ilSkillTree();
     $path = $stree->getPathFull($this->sn_id);
     $title = $sep = "";
     foreach ($path as $p) {
         if ($p["type"] != "skrt") {
             $title .= $sep . $p["title"];
             $sep = " > ";
         }
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setData($this->getLevels());
     $this->setTitle($title);
     $this->setLimit(9999);
     $this->addColumn($this->lng->txt("skmg_your_self_evaluation"));
     $this->addColumn($this->lng->txt("skmg_skill_level"));
     $this->setEnableHeader(true);
     //		$this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.self_eval_row.html", "Services/Skill");
     $this->disable("footer");
     $this->setEnableTitle(true);
     //		$this->addMultiCommand("", $lng->txt(""));
     //		$this->addCommandButton("", $lng->txt(""));
 }
 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_top_skill_id, $a_tref_id, $a_basic_skill_id)
 {
     global $ilCtrl, $lng, $ilAccess, $lng, $ilUser;
     $this->top_skill_id = $a_top_skill_id;
     $this->tref_id = (int) $a_tref_id;
     $this->basic_skill_id = $a_basic_skill_id;
     $this->cur_level_id = ilPersonalSkill::getSelfEvaluation($ilUser->getId(), $this->top_skill_id, $this->tref_id, $this->basic_skill_id);
     // build title
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $stree = new ilSkillTree();
     $path = $stree->getPathFull($this->basic_skill_id);
     $title = $sep = "";
     foreach ($path as $p) {
         if ($p["type"] != "skrt") {
             $title .= $sep . $p["title"];
             $sep = " > ";
         }
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setData($this->getLevels());
     $this->setTitle($title);
     $this->setLimit(9999);
     $this->addColumn("", "", "", true);
     $this->addColumn($this->lng->txt("skmg_skill_level"));
     $this->addColumn($this->lng->txt("description"));
     $this->setEnableHeader(true);
     $this->setRowTemplate("tpl.simple_self_eval.html", "Services/Skill");
     $this->disable("footer");
     $this->setEnableTitle(true);
     $this->addCommandButton("saveSelfEvaluation", $lng->txt("save"));
     $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
 }
 /**
  * Constructor
  */
 function __construct($a_parent_obj, $a_parent_cmd, $a_top_skill_id, $a_tref_id, $a_basic_skill_id)
 {
     global $ilUser;
     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
     $this->ws_tree = new ilWorkspaceTree($ilUser->getId());
     $this->ws_access = new ilWorkspaceAccessHandler();
     $this->top_skill_id = $a_top_skill_id;
     $this->tref_id = (int) $a_tref_id;
     $this->basic_skill_id = $a_basic_skill_id;
     // workspace tree
     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
     $this->ws_tree = new ilWorkspaceTree($ilUser->getId());
     // build title
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $stree = new ilSkillTree();
     $path = $stree->getPathFull($this->basic_skill_id);
     $title = $sep = "";
     foreach ($path as $p) {
         if ($p["type"] != "skrt") {
             $title .= $sep . $p["title"];
             $sep = " > ";
         }
     }
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setData($this->getLevels());
     $this->setTitle($title);
     $this->setLimit(9999);
     $this->addColumn($this->lng->txt("skmg_skill_level"));
     $this->addColumn($this->lng->txt("description"), "", "60%");
     $this->addColumn($this->lng->txt("skmg_materials"));
     $this->addColumn($this->lng->txt("actions"));
     $this->setEnableHeader(true);
     //		$this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
     $this->setRowTemplate("tpl.skill_materials_row.html", "Services/Skill");
     $this->disable("footer");
     $this->setEnableTitle(true);
     //		$this->addMultiCommand("", $lng->txt(""));
     //		$this->addCommandButton("", $lng->txt(""));
 }
 /**
  * Set Locator Items
  */
 function setLocator()
 {
     global $ilLocator, $tpl, $ilCtrl;
     $ilLocator->addRepositoryItems($_GET["ref_id"]);
     $this->getParentGUI()->addLocatorItems();
     if ($_GET["obj_id"] > 0) {
         include_once "./Services/Skill/classes/class.ilSkillTree.php";
         $tree = new ilSkillTree();
         $path = $tree->getPathFull($_GET["obj_id"]);
         for ($i = 1; $i < count($path); $i++) {
             switch ($path[$i]["type"]) {
                 case "scat":
                     $ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", $path[$i]["child"]);
                     $ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilskillmanagementgui", "ilskillcategorygui"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_skmg_s.png"));
                     break;
                 case "skll":
                     $ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id", $path[$i]["child"]);
                     $ilLocator->addItem($path[$i]["title"], $ilCtrl->getLinkTargetByClass("ilskillmanagementgui", "ilbasicskillgui"), "", 0, $path[$i]["type"], ilUtil::getImagePath("icon_skmg_s.png"));
                     break;
             }
         }
     }
     $ilCtrl->setParameter($this, "obj_id", $_GET["obj_id"]);
     $tpl->setLocator();
 }
Ejemplo n.º 5
0
 /**
  * Set header for level
  */
 function setLevelHead()
 {
     global $ilTabs, $ilCtrl, $tpl, $lng, $ilHelp;
     // tabs
     $ilTabs->clearTargets();
     $ilHelp->setScreenIdComponent("skmg_lev");
     $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, "edit"));
     if ($_GET["level_id"] > 0) {
         $ilTabs->addTab("level_settings", $lng->txt("settings"), $ilCtrl->getLinkTarget($this, "editLevel"));
         /*			$ilTabs->addTab("level_trigger",
         				$lng->txt("skmg_trigger"),
         				$ilCtrl->getLinkTarget($this, "editLevelTrigger"));*/
         $ilTabs->addTab("level_resources", $lng->txt("skmg_resources"), $ilCtrl->getLinkTarget($this, "showLevelResources"));
         /*
         			$ilTabs->addTab("level_certificate",
         				$lng->txt("certificate"),
         				$ilCtrl->getLinkTargetByClass("ilcertificategui", "certificateEditor"));*/
     }
     // title
     if ($_GET["level_id"] > 0) {
         $tpl->setTitle($lng->txt("skmg_skill_level") . ": " . ilBasicSkill::lookupLevelTitle((int) $_GET["level_id"]));
     } else {
         $tpl->setTitle($lng->txt("skmg_skill_level"));
     }
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $tree = new ilSkillTree();
     $path = $tree->getPathFull($this->node_object->getId());
     $desc = "";
     foreach ($path as $p) {
         if (in_array($p["type"], array("scat", "skll"))) {
             $desc .= $sep . $p["title"];
             $sep = " > ";
         }
     }
     $tpl->setDescription($desc);
 }