5 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
32 $lng->loadLanguageModule(
'skmg');
34 $ilCtrl->saveParameter($this,
"skill_id");
35 $ilCtrl->saveParameter($this,
"tref_id");
37 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
51 $next_class = $ilCtrl->getNextClass($this);
52 $cmd = $ilCtrl->getCmd(
"listSkills");
54 $tpl->setTitle($lng->txt(
"skills"));
74 $ilTabs->addTab(
"list_skills",
75 $lng->txt(
"skmg_list_skills"),
76 $ilCtrl->getLinkTarget($this,
"listSkills"));
83 $ilTabs->activateTab($a_activate);
88 $this->offline_mode = $a_file_path;
100 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
104 $ilToolbar->addFormButton($lng->txt(
"skmg_add_skill"),
106 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
110 foreach ($skills as $s)
112 $path = $stree->getSkillTreePath($s[
"skill_node_id"]);
115 foreach (
$path as $p)
124 $html.= $this->
getSkillHTML($s[
"skill_node_id"], 0,
true);
131 $tpl->setContent($html);
140 function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit =
false)
144 $this->tooltips = array();
155 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"Services/Skill");
157 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
159 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
162 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
163 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
166 include_once(
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
168 $act_list->setListTitle($lng->txt(
"actions"));
169 $act_list->setSelectionHeaderClass(
"small");
172 $act_list->setUseImages(
false);
175 foreach ($b_skills as $bs)
177 $path = $stree->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
180 foreach (
$path as $p)
190 $a_top_skill_id, $bs[
"tref"], $bs[
"id"]);
193 $level_data = $skill->getLevelData();
196 $valid_sel_level =
false;
199 foreach ($level_data as $k => $v)
201 if ($v[
"id"] == $se_level)
203 $valid_sel_level =
true;
209 foreach ($level_data as $k => $v)
212 $tpl->setCurrentBlock(
"level_td");
213 $tpl->setVariable(
"VAL_LEVEL", $v[
"title"]);
214 $tt_id =
"skmg_skl_tt_".self::$skill_tt_cnt;
215 self::$skill_tt_cnt++;
216 $tpl->setVariable(
"TT_ID", $tt_id);
217 if ($v[
"description"] !=
"")
221 $tpl->parseCurrentBlock();
224 $tpl->setCurrentBlock(
"self_eval_td");
225 if ($valid_sel_level && !$found)
227 $tpl->setVariable(
"VAL_SELF_EVAL",
"x");
228 $tpl->setVariable(
"CLASS_SELF_EVAL",
"ilSkillSelf");
232 $tpl->setVariable(
"VAL_SELF_EVAL",
" ");
234 $tpl->parseCurrentBlock();
235 if ($v[
"id"] == $se_level)
242 $bs[
"tref"], $v[
"id"]);
245 $tpl->setCurrentBlock(
"material_td");
246 $tpl->setVariable(
"VAL_MATERIAL",
" ");
247 $tpl->parseCurrentBlock();
252 $tpl->setCurrentBlock(
"material_links");
257 $bs[
"tref"], $v[
"id"]) as $item)
260 $tpl->setVariable(
"URL_MATERIAL", $mat_data[1]);
261 $tpl->setVariable(
"TXT_MATERIAL", $cnt);
264 $mat_tt_id =
"skmg_skl_tt_mat_".self::$skill_tt_cnt;
265 self::$skill_tt_cnt++;
266 $tpl->setVariable(
"TOOLTIP_MATERIAL_ID", $mat_tt_id);
268 if(!$this->offline_mode)
274 $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
277 $tpl->parseCurrentBlock();
281 $tpl->setCurrentBlock(
"material_td");
282 $tpl->setVariable(
"CLASS_MAT",
"ilSkillMat");
283 $tpl->parseCurrentBlock();
289 foreach (
$path as $p)
293 $title.= $sep.$p[
"title"];
296 if ($a_top_skill_id == $p[
"child"])
302 $tpl->setCurrentBlock(
"skill");
304 $tpl->setVariable(
"TXT_LEVEL", $lng->txt(
"skmg_level"));
305 $tpl->setVariable(
"TXT_SELF_EVAL", $lng->txt(
"skmg_self_evaluation"));
306 $tpl->setVariable(
"TXT_MATERIAL", $lng->txt(
"skmg_material"));
311 $act_list->setId(
"act_".$a_top_skill_id.
"_".$bs[
"id"]);
312 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
313 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
314 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
315 $act_list->addItem($lng->txt(
'skmg_assign_materials'),
"",
316 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials"));
317 $act_list->addItem($lng->txt(
'skmg_self_evaluation'),
"",
318 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation"));
319 $tpl->setVariable(
"ACTIONS2", $act_list->getHTML());
323 $tpl->parseCurrentBlock();
331 $act_list->setId(
"act_".$a_top_skill_id);
332 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
335 $act_list->addItem($lng->txt(
'skmg_remove_skill'),
"",
336 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove"));
337 $tpl->setVariable(
"ACTIONS1", $act_list->getHTML());
345 return $this->tooltips;
360 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
361 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
366 $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
369 if(!$this->offline_mode)
371 $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
375 $url = $this->offline_mode.
"file_".$obj_id.
"/";
381 include_once
"Modules/Test/classes/class.ilObjTestVerification.php";
383 $url .= $obj->getOfflineFilename();
387 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerification.php";
389 $url .= $obj->getOfflineFilename();
394 $url .=
$file->getFilename();
399 return array($caption, $url);
412 $ilCtrl->redirect($this,
"listSkills");
424 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
425 if (
$_GET[
"skill_id"] > 0)
429 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
432 $ilCtrl->redirect($this,
"listSkills");
436 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
438 $cgui->setFormAction($ilCtrl->getFormAction($this));
439 $cgui->setHeaderText($lng->txt(
"skmg_really_remove_skills"));
440 $cgui->setCancel($lng->txt(
"cancel"),
"listSkills");
441 $cgui->setConfirm($lng->txt(
"delete"),
"removeSkills");
443 foreach (
$_POST[
"id"] as $i)
448 $tpl->setContent($cgui->getHTML());
459 if (is_array(
$_POST[
"id"]))
461 foreach (
$_POST[
"id"] as $n_id)
468 $ilCtrl->redirect($this,
"listSkills");
486 $ilTabs->setBackTarget($lng->txt(
"back"),
487 $ilCtrl->getLinkTarget($this,
"listSkills"));
489 $ilCtrl->saveParameter($this,
"skill_id");
490 $ilCtrl->saveParameter($this,
"basic_skill_id");
491 $ilCtrl->saveParameter($this,
"tref_id");
493 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
508 $cur_basic_skill_id = ((int)
$_POST[
"basic_skill_id"] > 0)
509 ? (int)
$_POST[
"basic_skill_id"]
510 : (((
int) $_GET[
"basic_skill_id"] > 0)
511 ? (
int) $_GET[
"basic_skill_id"]
514 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
516 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
519 $si->setValue($cur_basic_skill_id);
520 $ilToolbar->addInputItem($si,
true);
521 $ilToolbar->addFormButton($lng->txt(
"select"),
524 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
527 include_once(
"./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
529 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], $cur_basic_skill_id);
531 $tpl->setContent(
$tab->getHTML());
546 $ilCtrl->saveParameter($this,
"skill_id");
547 $ilCtrl->saveParameter($this,
"level_id");
548 $ilCtrl->saveParameter($this,
"tref_id");
549 $ilCtrl->saveParameter($this,
"basic_skill_id");
551 $ilTabs->setBackTarget($lng->txt(
"back"),
552 $ilCtrl->getLinkTarget($this,
"assignMaterials"));
555 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
559 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
563 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
565 'skill_wspexpand', $tree, $acc_handler);
566 $exp->setTargetGet(
'wsp_id');
567 $exp->setFiltered(
false);
568 $exp->removeAllFormItemTypes();
569 $exp->addFormItemForType(
"file");
570 $exp->addFormItemForType(
"tstv");
571 $exp->addFormItemForType(
"excv");
573 if(
$_GET[
'skill_wspexpand'] ==
'')
576 $expanded = $tree->readRootId();
580 $expanded =
$_GET[
'skill_wspexpand'];
582 $exp->setCheckedItems(array((
int)
$_POST[
'wsp_id']));
583 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'assignMaterial'));
584 $exp->setPostVar(
'wsp_id[]');
585 $exp->setExpand($expanded);
589 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"Services/Skill");
590 $mtpl->setVariable(
"EXP", $exp->getOutput());
594 $tb->addFormButton($lng->txt(
"select"),
596 $tb->setFormAction($ilCtrl->getFormAction($this));
597 $tb->setOpenFormTag(
true);
598 $tb->setCloseFormTag(
false);
599 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
600 $tb->setOpenFormTag(
false);
601 $tb->setCloseFormTag(
true);
602 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
604 $tpl->setContent($mtpl->get());
614 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
615 if (is_array(
$_POST[
"wsp_id"]))
617 foreach (
$_POST[
"wsp_id"] as $w)
620 (
int)
$_GET[
"tref_id"],
621 (int)
$_GET[
"basic_skill_id"], (
int)
$_GET[
"level_id"], (int) $w);
626 $ilCtrl->saveParameter($this,
"skill_id");
627 $ilCtrl->saveParameter($this,
"level_id");
628 $ilCtrl->saveParameter($this,
"tref_id");
629 $ilCtrl->saveParameter($this,
"basic_skill_id");
631 $ilCtrl->redirect($this,
"assignMaterials");
643 (
int)
$_GET[
"level_id"],
644 (int)
$_GET[
"wsp_id"]);
646 $ilCtrl->redirect($this,
"assignMaterials");
664 $ilTabs->setBackTarget($lng->txt(
"back"),
665 $ilCtrl->getLinkTarget($this,
"listSkills"));
667 $ilCtrl->saveParameter($this,
"skill_id");
668 $ilCtrl->saveParameter($this,
"basic_skill_id");
669 $ilCtrl->saveParameter($this,
"tref_id");
671 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
686 $cur_basic_skill_id = ((int)
$_POST[
"basic_skill_id"] > 0)
687 ? (int)
$_POST[
"basic_skill_id"]
688 : (((
int) $_GET[
"basic_skill_id"] > 0)
689 ? (
int) $_GET[
"basic_skill_id"]
692 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
694 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
697 $si->setValue($cur_basic_skill_id);
698 $ilToolbar->addInputItem($si,
true);
699 $ilToolbar->addFormButton($lng->txt(
"select"),
702 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
705 include_once(
"./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
707 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], $cur_basic_skill_id);
709 $tpl->setContent(
$tab->getHTML());
729 $ilCtrl->redirect($this,
"listSkills");
745 $ilTabs->setBackTarget($lng->txt(
"back"),
746 $ilCtrl->getLinkTarget($this,
""));
748 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
751 require_once (
"./Services/Skill/classes/class.ilPersonalSkillExplorer.php");
755 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
"listSkillsForAdd"));
757 if (
$_GET[
"skpexpand"] ==
"")
763 $expanded =
$_GET[
"skpexpand"];
766 if (
$_GET[
"obj_id"] > 0)
768 $path = $this->skill_tree->getPathId(
$_GET[
"obj_id"]);
769 $exp->setForceOpenPath(
$path);
770 $exp->highlightNode(
$_GET[
"obj_id"]);
774 $exp->highlightNode($this->skill_tree->readRootId());
776 $exp->setExpand($expanded);
779 $output = $exp->getOutput();
782 if ($ilCtrl->isAsynch())
787 $tpl->setContent($output);