5 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillProfile.php");
39 $lng->loadLanguageModule(
'skmg');
41 $ilHelp->setScreenIdComponent(
"skill");
43 $ilCtrl->saveParameter($this,
"skill_id");
44 $ilCtrl->saveParameter($this,
"tref_id");
45 $ilCtrl->saveParameter($this,
"profile_id");
47 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
50 $this->use_materials = !$ilSetting->get(
"disable_personal_workspace");
60 $this->profile_id = $a_val;
70 return $this->profile_id;
80 $this->gap_self_eval_levels = $a_val;
100 $this->history_view = $a_val;
120 $this->intro_text = $a_val;
141 $this->hidden_skills[] = $a_skill_id.
":".$a_tref_id;
155 $next_class = $ilCtrl->getNextClass($this);
160 $std_cmd =
"listSkills";
161 if (count($profiles) > 0)
166 $cmd = $ilCtrl->getCmd($std_cmd);
168 $tpl->setTitle($lng->txt(
"skills"));
188 $ilTabs->addTab(
"list_skills",
189 $lng->txt(
"skmg_list_skills"),
190 $ilCtrl->getLinkTarget($this,
"listSkills"));
197 $ilTabs->activateTab($a_activate);
202 $this->offline_mode = $a_file_path;
214 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
218 $ilToolbar->addFormButton($lng->txt(
"skmg_add_skill"),
220 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
224 foreach ($skills as $s)
226 $path = $stree->getSkillTreePath($s[
"skill_node_id"]);
229 foreach (
$path as $p)
236 $html.= $this->
getSkillHTML($s[
"skill_node_id"], 0,
true);
243 $tpl->setContent($html);
255 function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit =
false, $a_tref_id = 0)
258 include_once(
"./Services/UIComponent/classes/class.ilUIHookProcessor.php");
260 array(
"personal_skills_gui" => $this,
"top_skill_id" => $a_top_skill_id,
"user_id" => $a_user_id,
261 "edit" => $a_edit,
"tref_id" => $a_tref_id));
262 if (!$uip->replaced())
264 $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
266 $skill_html = $uip->getHTML($skill_html);
277 function renderSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit =
false, $a_tref_id = 0)
282 $this->tooltips =
array();
293 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"Services/Skill");
295 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
297 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
300 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
301 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
304 include_once(
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
306 $act_list->setListTitle($lng->txt(
"actions"));
307 $act_list->setSelectionHeaderClass(
"small");
310 $act_list->setUseImages(
false);
312 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
314 $tref_id = $a_tref_id;
315 $skill_id = $a_top_skill_id;
318 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
319 $tref_id = $a_top_skill_id;
322 $b_skills = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
324 foreach ($b_skills as $bs)
326 $bs[
"id"] = $bs[
"skill_id"];
327 $bs[
"tref"] = $bs[
"tref_id"];
329 $path = $stree->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
332 foreach (
$path as $p)
342 $level_data = $skill->getLevelData();
348 if ($this->mode !=
"gap")
353 if ($this->mode ==
"gap" && !$this->history_view)
362 $se_rendered = ($se_date ==
"")
367 foreach ($skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"] , $user->getId(),
ilBasicSkill::EVAL_BY_ALL) as $level_entry)
370 if ($se_date > $level_entry[
"status_date"] && !$se_rendered)
381 $current_target_level = 0;
383 foreach ($level_data as $k => $v)
386 $tpl->setCurrentBlock(
"level_td");
387 $tpl->setVariable(
"VAL_LEVEL", $v[
"title"]);
388 $tt_id =
"skmg_skl_tt_".self::$skill_tt_cnt;
389 self::$skill_tt_cnt++;
390 $tpl->setVariable(
"TT_ID", $tt_id);
391 if ($v[
"description"] !=
"")
395 $tpl->parseCurrentBlock();
401 foreach (
$path as $p)
405 $title.= $sep.$p[
"title"];
408 if ($a_top_skill_id == $p[
"child"])
414 $tpl->setCurrentBlock(
"skill");
422 $tpl->setVariable(
"TXT_TARGET", $lng->txt(
"skmg_target_level"));
423 $tpl->setVariable(
"TXT_360_SURVEY", $lng->txt(
"skmg_360_survey"));
428 $act_list->setId(
"act_".$a_top_skill_id.
"_".$bs[
"id"]);
429 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
430 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
431 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
432 if ($this->use_materials)
434 $act_list->addItem($lng->txt(
'skmg_assign_materials'),
"",
435 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials"));
437 $act_list->addItem($lng->txt(
'skmg_self_evaluation'),
"",
438 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation"));
439 $tpl->setVariable(
"ACTIONS2", $act_list->getHTML());
442 $tpl->parseCurrentBlock();
451 $act_list->setId(
"act_".$a_top_skill_id);
452 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
455 $act_list->addItem($lng->txt(
'skmg_remove_skill'),
"",
456 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove"));
457 $tpl->setVariable(
"ACTIONS1", $act_list->getHTML());
467 return $this->tooltips;
480 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
481 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
486 $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
489 if(!$this->offline_mode)
491 $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
495 $url = $this->offline_mode.
"file_".$obj_id.
"/";
501 include_once
"Modules/Test/classes/class.ilObjTestVerification.php";
503 $url .= $obj->getOfflineFilename();
507 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerification.php";
509 $url .= $obj->getOfflineFilename();
513 include_once
"Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
515 $url .= $obj->getOfflineFilename();
519 include_once
"Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
521 $url .= $obj->getOfflineFilename();
544 $ilCtrl->redirect($this,
"listSkills");
556 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
557 if (
$_GET[
"skill_id"] > 0)
561 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
564 $ilCtrl->redirect($this,
"listSkills");
568 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
570 $cgui->setFormAction($ilCtrl->getFormAction($this));
571 $cgui->setHeaderText($lng->txt(
"skmg_really_remove_skills"));
572 $cgui->setCancel($lng->txt(
"cancel"),
"listSkills");
573 $cgui->setConfirm($lng->txt(
"delete"),
"removeSkills");
575 foreach (
$_POST[
"id"] as $i)
580 $tpl->setContent($cgui->getHTML());
591 if (is_array(
$_POST[
"id"]))
593 foreach (
$_POST[
"id"] as $n_id)
600 $ilCtrl->redirect($this,
"listSkills");
618 $ilTabs->setBackTarget($lng->txt(
"back"),
619 $ilCtrl->getLinkTarget($this,
"listSkills"));
621 $ilCtrl->saveParameter($this,
"skill_id");
622 $ilCtrl->saveParameter($this,
"basic_skill_id");
623 $ilCtrl->saveParameter($this,
"tref_id");
625 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
632 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
635 $skill_id = (int) $_GET[
"skill_id"];
638 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
639 $tref_id = $_GET[
"skill_id"];
642 $bs = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
651 $cur_basic_skill_id = ((int)
$_POST[
"basic_skill_id"] > 0)
652 ? (int)
$_POST[
"basic_skill_id"]
653 : (((
int) $_GET[
"basic_skill_id"] > 0)
654 ? (
int) $_GET[
"basic_skill_id"]
657 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
659 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
662 $si->setValue($cur_basic_skill_id);
663 $ilToolbar->addInputItem(
$si,
true);
664 $ilToolbar->addFormButton($lng->txt(
"select"),
667 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
670 include_once(
"./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
672 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], $cur_basic_skill_id);
674 $tpl->setContent(
$tab->getHTML());
689 if(!$ilSetting->get(
"disable_personal_workspace"))
691 ilUtil::sendInfo($lng->txt(
"skmg_ass_materials_from_workspace").
" » <a href='ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace'>".$lng->txt(
"personal_workspace").
"</a>");
694 $ilCtrl->saveParameter($this,
"skill_id");
695 $ilCtrl->saveParameter($this,
"level_id");
696 $ilCtrl->saveParameter($this,
"tref_id");
697 $ilCtrl->saveParameter($this,
"basic_skill_id");
699 $ilTabs->setBackTarget($lng->txt(
"back"),
700 $ilCtrl->getLinkTarget($this,
"assignMaterials"));
703 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
707 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
711 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
713 'skill_wspexpand', $tree, $acc_handler);
714 $exp->setTargetGet(
'wsp_id');
715 $exp->setFiltered(
false);
716 $exp->removeAllFormItemTypes();
717 $exp->addFormItemForType(
"file");
718 $exp->addFormItemForType(
"tstv");
719 $exp->addFormItemForType(
"excv");
721 if(
$_GET[
'skill_wspexpand'] ==
'')
724 $expanded = $tree->readRootId();
728 $expanded =
$_GET[
'skill_wspexpand'];
730 $exp->setCheckedItems(
array((
int)
$_POST[
'wsp_id']));
731 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'assignMaterial'));
732 $exp->setPostVar(
'wsp_id[]');
733 $exp->setExpand($expanded);
737 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"Services/Skill");
738 $mtpl->setVariable(
"EXP", $exp->getOutput());
742 $tb->addFormButton($lng->txt(
"select"),
744 $tb->setFormAction($ilCtrl->getFormAction($this));
745 $tb->setOpenFormTag(
true);
746 $tb->setCloseFormTag(
false);
747 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
748 $tb->setOpenFormTag(
false);
749 $tb->setCloseFormTag(
true);
750 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
752 $tpl->setContent($mtpl->get());
762 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
763 if (is_array(
$_POST[
"wsp_id"]))
768 (
int)
$_GET[
"tref_id"],
769 (int)
$_GET[
"basic_skill_id"], (
int)
$_GET[
"level_id"], (int) $w);
774 $ilCtrl->saveParameter($this,
"skill_id");
775 $ilCtrl->saveParameter($this,
"level_id");
776 $ilCtrl->saveParameter($this,
"tref_id");
777 $ilCtrl->saveParameter($this,
"basic_skill_id");
779 $ilCtrl->redirect($this,
"assignMaterials");
791 (
int)
$_GET[
"level_id"],
792 (int)
$_GET[
"wsp_id"]);
794 $ilCtrl->redirect($this,
"assignMaterials");
812 $ilTabs->setBackTarget($lng->txt(
"back"),
813 $ilCtrl->getLinkTarget($this,
"listSkills"));
815 $ilCtrl->saveParameter($this,
"skill_id");
816 $ilCtrl->saveParameter($this,
"basic_skill_id");
817 $ilCtrl->saveParameter($this,
"tref_id");
819 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
826 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
829 $skill_id = (int) $_GET[
"skill_id"];
832 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
833 $tref_id = $_GET[
"skill_id"];
836 $bs = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
845 $cur_basic_skill_id = ((int)
$_POST[
"basic_skill_id"] > 0)
846 ? (int)
$_POST[
"basic_skill_id"]
847 : (((
int) $_GET[
"basic_skill_id"] > 0)
848 ? (
int) $_GET[
"basic_skill_id"]
851 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
853 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
856 $si->setValue($cur_basic_skill_id);
857 $ilToolbar->addInputItem(
$si,
true);
858 $ilToolbar->addFormButton($lng->txt(
"select"),
861 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
864 include_once(
"./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
866 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], $cur_basic_skill_id);
868 $tpl->setContent(
$tab->getHTML());
888 $ilCtrl->redirect($this,
"listSkills");
902 $ilTabs->setBackTarget($lng->txt(
"back"),
903 $ilCtrl->getLinkTarget($this,
""));
905 include_once(
"./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
907 if ($exp->getHasSelectableNodes())
909 if (!$exp->handleCommand())
911 $tpl->setContent($exp->getHTML());
933 if (count($profiles) == 0)
939 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
941 foreach ($profiles as $p)
948 $_GET[
"profile_id"] = (int) key(
$options);
949 $ilCtrl->setParameter($this,
"profile_id", $_GET[
"profile_id"]);
951 $current_profile_id = $_GET[
"profile_id"];
955 $si->setValue($current_profile_id);
956 $ilToolbar->addInputItem(
$si,
true);
957 $ilToolbar->addFormButton($lng->txt(
"select"),
959 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
973 $this->gap_mode =
"max_per_type";
974 $this->gap_mode_type =
$a_type;
975 $this->gap_cat_title = $a_cat_title;
986 $this->gap_mode =
"max_per_object";
987 $this->gap_mode_obj_id = $a_obj_id;
988 $this->gap_cat_title = $a_cat_title;
1002 include_once(
"./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
1009 $intro_html = $pan->getHTML();
1014 if ($a_user_id == 0)
1016 $user_id = $ilUser->getId();
1020 $user_id = $a_user_id;
1027 $this->profile_levels = $profile->getSkillLevels();
1029 foreach ($this->profile_levels as
$l)
1032 "base_skill_id" => $l[
"base_skill_id"],
1033 "tref_id" => $l[
"tref_id"],
1034 "level_id" => $l[
"level_id"]
1038 else if (is_array($a_skills))
1040 $skills = $a_skills;
1044 $this->actual_levels =
array();
1045 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
1046 foreach ($skills as $sk)
1049 if ($this->gap_mode ==
"max_per_type")
1051 $max = $bs->getMaxLevelPerType($sk[
"tref_id"], $this->gap_mode_type, $user_id);
1052 $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
1054 else if ($this->gap_mode ==
"max_per_object")
1056 $max = $bs->getMaxLevelPerObject($sk[
"tref_id"], $this->gap_mode_obj_id, $user_id);
1057 $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
1061 $incl_self_eval =
false;
1064 $incl_self_eval =
true;
1069 $all_chart_html =
"";
1072 $sw_skills =
array();
1073 foreach ($skills as $sk)
1075 if (!in_array($sk[
"base_skill_id"].
":".$sk[
"tref_id"], $this->hidden_skills))
1081 if (count($sw_skills) >= 3)
1083 $skill_packages =
array();
1085 if (count($sw_skills) < 8)
1087 $skill_packages[1] = $sw_skills;
1091 $mod = count($sw_skills) % 7;
1092 $pkg_num = floor((count($sw_skills) - 1) / 7) + 1;
1094 foreach ($sw_skills as $k => $s)
1096 $skill_packages[$cpkg][$k] = $s;
1097 if ($mod < 3 && count($skill_packages) == ($pkg_num - 1) && count($skill_packages[$cpkg]) == 3+$mod)
1101 else if (count($skill_packages[$cpkg]) == 7)
1109 foreach ($skill_packages as $pskills)
1113 $leg_labels =
array();
1118 foreach ($pskills as $k =>
$l)
1123 $levels = $bs->getLevelData();
1125 foreach ($levels as $lv)
1128 if (
$l[
"level_id"] == $lv[
"id"])
1130 $pskills[$k][
"target_cnt"] = $cnt;
1132 if ($this->actual_levels[
$l[
"base_skill_id"]][
$l[
"tref_id"]] == $lv[
"id"])
1134 $pskills[$k][
"actual_cnt"] = $cnt;
1136 if ($incl_self_eval)
1138 if ($self_vals[
$l[
"base_skill_id"]][
$l[
"tref_id"]] == $lv[
"id"])
1140 $pskills[$k][
"self_cnt"] = $cnt;
1143 $max_cnt = max($max_cnt, $cnt);
1152 include_once(
"./Services/Chart/classes/class.ilChart.php");
1154 $chart->setsize(800, 300);
1155 $chart->setYAxisMax($max_cnt);
1156 $chart->setLegLabels($leg_labels);
1159 $cd =
$chart->getDataInstance();
1160 $cd->setLabel($lng->txt(
"skmg_target_level"));
1161 $cd->setFill(
true,
"#A0A0A0");
1164 $cd2 =
$chart->getDataInstance();
1165 if ($this->gap_cat_title !=
"")
1167 $cd2->setLabel($this->gap_cat_title);
1169 else if ($this->gap_mode ==
"max_per_type")
1171 $cd2->setLabel($lng->txt(
"objs_".$this->gap_mode_type));
1173 else if ($this->gap_mode ==
"max_per_object")
1177 $cd2->setFill(
true,
"#8080FF");
1180 if ($incl_self_eval)
1182 $cd3 =
$chart->getDataInstance();
1183 $cd3->setLabel($lng->txt(
"skmg_self_evaluation"));
1184 $cd3->setFill(
true,
"#FF8080");
1189 foreach ($pskills as $pl)
1191 $cd->addPoint($cnt, (
int) $pl[
"target_cnt"]);
1192 $cd2->addPoint($cnt, (
int) $pl[
"actual_cnt"]);
1193 if ($incl_self_eval)
1195 $cd3->addPoint($cnt, (
int) $pl[
"self_cnt"]);
1217 $chart_html =
$chart->getHTML();
1218 $all_chart_html.= $chart_html;
1223 $pan->setBody($all_chart_html);
1224 $all_chart_html = $pan->getHTML();
1229 foreach ($skills as $s)
1231 $path = $stree->getSkillTreePath($s[
"base_skill_id"]);
1234 foreach (
$path as $p)
1241 $html.= $this->
getSkillHTML($s[
"base_skill_id"], $user_id,
false, $s[
"tref_id"]);
1248 return $intro_html.$all_chart_html.$html;
1261 $ilCtrl->setParameter($this,
"profile_id",
$_GET[
"profile_id"]);
1262 $ilCtrl->redirect($this,
"listProfiles");
1275 if ($a_user_id == 0)
1277 $a_user_id = $ilUser->getId();
1283 $a_top_skill_id, $a_tref_id, $a_base_skill);
1285 $valid_sel_level =
false;
1288 foreach ($a_levels as $k => $v)
1290 if ($v[
"id"] == $se_level)
1292 $valid_sel_level =
true;
1298 foreach ($a_levels as $k => $v)
1300 $a_tpl->setCurrentBlock(
"val_level_td");
1301 if ($valid_sel_level && $v[
"id"] == $se_level)
1303 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1304 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1308 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1310 $a_tpl->parseCurrentBlock();
1317 $a_tpl->setCurrentBlock(
"value_row");
1319 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_self_evaluation").
1322 $a_tpl->parseCurrentBlock();
1331 function renderMaterialsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id = 0, $a_user_id = 0)
1335 if ($a_user_id == 0)
1337 $a_user_id = $ilUser->getId();
1341 foreach ($a_levels as $v)
1344 $a_tref_id, $v[
"id"]);
1355 foreach ($a_levels as $k => $v)
1358 $a_tref_id, $v[
"id"]);
1361 $a_tpl->setCurrentBlock(
"val_level_td");
1362 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1363 $a_tpl->parseCurrentBlock();
1368 $a_tpl->setCurrentBlock(
"level_link");
1373 $a_tref_id, $v[
"id"]) as $item)
1376 $a_tpl->setVariable(
"HREF_LINK", $mat_data[1]);
1377 $a_tpl->setVariable(
"TXT_LINK", $cnt);
1380 $mat_tt_id =
"skmg_skl_tt_mat_".self::$skill_tt_cnt;
1381 self::$skill_tt_cnt++;
1382 $a_tpl->setVariable(
"LEVEL_LINK_ID", $mat_tt_id);
1384 if(!$this->offline_mode)
1390 $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
1393 $a_tpl->parseCurrentBlock();
1397 $a_tpl->setCurrentBlock(
"val_level_td");
1398 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillMat");
1399 $a_tpl->parseCurrentBlock();
1403 $a_tpl->setCurrentBlock(
"value_row");
1404 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_material"));
1405 $a_tpl->parseCurrentBlock();
1418 if ($a_user_id == 0)
1420 $a_user_id = $ilUser->getId();
1424 $profile_levels = $profile->getSkillLevels();
1426 foreach ($a_levels as $k => $v)
1428 $a_tpl->setCurrentBlock(
"val_level_td");
1429 $target_level =
false;
1430 foreach ($profile_levels as $pl)
1432 if ($pl[
"level_id"] == $v[
"id"] &&
1433 $pl[
"base_skill_id"] == $v[
"skill_id"] &&
1434 $a_tref_id == $pl[
"tref_id"])
1436 $target_level =
true;
1437 $current_target_level = $v[
"id"];
1443 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1444 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1448 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1450 $a_tpl->parseCurrentBlock();
1453 $a_tpl->setCurrentBlock(
"value_row");
1454 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_target_level"));
1455 $a_tpl->parseCurrentBlock();
1468 if ($a_user_id == 0)
1470 $a_user_id = $ilUser->getId();
1474 $profile_levels = $profile->getSkillLevels();
1476 foreach ($a_levels as $k => $v)
1478 $a_tpl->setCurrentBlock(
"val_level_td");
1479 $survey_level =
false;
1480 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"])
1482 $survey_level =
true;
1487 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1488 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1492 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1494 $a_tpl->parseCurrentBlock();
1497 $a_tpl->setCurrentBlock(
"value_row");
1498 if ($this->gap_cat_title !=
"")
1500 $a_tpl->setVariable(
"TXT_VAL_TITLE", $this->gap_cat_title);
1502 else if ($this->gap_mode ==
"max_per_type")
1504 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"objs_".$this->gap_mode_type));
1506 else if ($this->gap_mode ==
"max_per_object")
1511 $a_tpl->parseCurrentBlock();
1524 if ($a_user_id == 0)
1526 $a_user_id = $ilUser->getId();
1530 if (count($self_vals) == 0)
1535 foreach ($a_levels as $k => $v)
1537 $a_tpl->setCurrentBlock(
"val_level_td");
1538 $survey_level =
false;
1539 if ($self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"])
1541 $survey_level =
true;
1545 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1546 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1550 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1552 $a_tpl->parseCurrentBlock();
1555 $a_tpl->setCurrentBlock(
"value_row");
1556 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_self_evaluation"));
1558 $a_tpl->parseCurrentBlock();
1569 global
$lng, $ilAccess;
1571 $se_level = $a_level_entry[
"level_id"];
1574 $valid_sel_level =
false;
1577 foreach ($a_levels as $k => $v)
1579 if ($v[
"id"] == $se_level)
1581 $valid_sel_level =
true;
1587 foreach ($a_levels as $k => $v)
1589 $a_tpl->setCurrentBlock(
"val_level_td");
1590 if ($valid_sel_level && $v[
"id"] == $se_level)
1592 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1593 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1597 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1599 $a_tpl->parseCurrentBlock();
1606 $a_tpl->setCurrentBlock(
"value_row");
1608 if ($a_level_entry[
"self_eval"] == 1 && $a_level_entry[
"trigger_obj_id"] == 0)
1610 $title = $lng->txt(
"skmg_self_evaluation");
1614 $title = ($a_level_entry[
"trigger_obj_id"] > 0 && $a_level_entry[
"self_eval"] == 1)
1615 ? $a_level_entry[
"trigger_title"].
" (".$lng->txt(
"skmg_self_evaluation").
")" 1616 : $a_level_entry[
"trigger_title"];
1619 if ($a_level_entry[
"trigger_ref_id"] > 0
1620 && $ilAccess->checkAccess(
"read",
"", $a_level_entry[
"trigger_ref_id"]))
1622 include_once(
"./Services/Link/classes/class.ilLink.php");
1623 $title =
"<a href='".ilLink::_getLink($a_level_entry[
"trigger_ref_id"]).
"'>".
$title.
"</a>";
1626 $a_tpl->setVariable(
"TXT_VAL_TITLE",
$title.
1629 $a_tpl->parseCurrentBlock();
1646 $profile_levels = $profile->getSkillLevels();
1649 $current_target_level = 0;
1652 foreach ($a_levels as $k => $v)
1654 foreach ($this->profile_levels as $pl)
1656 if ($pl[
"level_id"] == $v[
"id"] &&
1657 $pl[
"base_skill_id"] == $v[
"skill_id"])
1660 $current_target_level = $v[
"id"];
1664 if ($this->actual_levels[$v[
"skill_id"]][0] == $v[
"id"])
1673 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
1675 $res = $skill_res->getResources();
1676 $imp_resources =
array();
1677 foreach (
$res as $level)
1679 foreach($level as
$r)
1681 if ($r[
"imparting"] ==
true &&
1682 $current_target_level == $r[
"level_id"])
1684 $imp_resources[] =
$r;
1688 foreach($imp_resources as
$r)
1693 include_once(
"./Services/Link/classes/class.ilLink.php");
1694 $a_tpl->setCurrentBlock(
"resource_item");
1695 $a_tpl->setVariable(
"TXT_RES",
$title);
1697 $a_tpl->parseCurrentBlock();
1699 if (count($imp_resources) > 0)
1701 $a_tpl->touchBlock(
"resources_list");
1702 $a_tpl->setCurrentBlock(
"resources");
1703 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_needs_impr_res"));
1704 $a_tpl->parseCurrentBlock();
1708 $a_tpl->setCurrentBlock(
"resources");
1709 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_needs_impr_no_res"));
1710 $a_tpl->parseCurrentBlock();
1715 $a_tpl->setCurrentBlock(
"resources");
1716 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_no_needs_impr"));
1717 $a_tpl->parseCurrentBlock();
1723 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
1725 $res = $skill_res->getResources();
1728 foreach (
$res as $level)
1732 foreach($level as
$r)
1734 if ($r[
"imparting"])
1739 include_once(
"./Services/Link/classes/class.ilLink.php");
1740 $a_tpl->setCurrentBlock(
"resource_item");
1741 $a_tpl->setVariable(
"TXT_RES",
$title);
1743 $a_tpl->parseCurrentBlock();
1746 $cl = $r[
"level_id"];
1751 $a_tpl->setCurrentBlock(
"resources_list_level");
1752 $a_tpl->setVariable(
"TXT_LEVEL", $lng->txt(
"skmg_level"));
1754 $a_tpl->parseCurrentBlock();
1755 $a_tpl->touchBlock(
"resources_list");
1760 $a_tpl->setCurrentBlock(
"resources");
1761 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_suggested_resources"));
1762 $a_tpl->parseCurrentBlock();
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
saveSelfEvaluation()
Save self evaluation.
hideSkill($a_skill_id, $a_tref_id=0)
Hide skill.
renderSuggestedResources($a_tpl, $a_levels, $a_base_skill, $a_tref_id)
Render suggested resources.
setProfileId($a_val)
Set profile id.
renderActualLevelsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render actual levels row (gap analysis)
static lookupLevelTitle($a_id)
Lookup level title.
getMaterialInfo($a_wsp_id, $a_user_id)
Get material file name and goto url.
renderGapSelfEvalRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render actual levels row (gap analysis)
const PANEL_STYLE_PRIMARY
getHistoryView()
Get history view.
Explorer for selecting a personal skill.
getProfileId()
Get profile id.
Access handler for personal workspace.
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
addSkill()
Add personal skill.
getSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Get skill presentation HTML.
UI interface hook processor.
setTabs($a_activate)
Set tabs.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
static saveSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level)
Save self evaluation.
renderSkillHTML($a_top_skill_id, $a_user_id=0, $a_edit=false, $a_tref_id=0)
Render skill html.
getGapAnalysisHTML($a_user_id=0, $a_skills=null)
Get gap analysis html.
Assign materials to skill levels table.
removeMaterial()
Remove material.
Tree handler for personal workspace.
static _lookupType($a_obj_id)
Lookup Type.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
assignMaterial()
Assign materials to skill level.
Personal skills GUI class.
static getProfilesOfUser($a_user_id)
Get profiles of a user.
selfEvaluation()
Assign materials to skill levels.
getGapAnalysisSelfEvalLevels()
Get self evaluation levels for gap analysis.
getIntroText()
Get intro text.
selectMaterial()
Select material.
static getInstance($a_id=0)
if(!is_array($argv)) $options
static removeSkill($a_user_id, $a_skill_node_id)
Remove personal skill.
setIntroText($a_val)
Set intro text.
Self evaluation, second simplier implementation.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
Manages resources for skills.
static addPersonalSkill($a_user_id, $a_skill_node_id)
Add personal skill.
renderProfileTargetRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render profile target row.
static _lookupTemplateId($a_obj_id)
Lookup template ID.
setHistoryView($a_val)
Set history view.
listSkillsForAdd()
LIst skills for adding.
selectProfile()
Select profile.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
renderObjectEvalRow($a_tpl, $a_levels, $a_level_entry)
Render object evaluation row (has_level table)
setOfflineMode($a_file_path)
User interface class for advanced drop-down selection lists.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static getSelfEvaluation($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
static getAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
static getInstance()
Get instance.
assignMaterials()
Assign materials to skill levels.
static countAssignedMaterial($a_user_id, $a_tref_id, $a_level)
Get assigned material (for a skill level and user)
setGapAnalysisActualStatusModePerType($a_type, $a_cat_title="")
Set gap analysis actual status mode "per type".
listProfiles()
List profiles.
executeCommand()
Execute command.
renderSelfEvaluationRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render self evaluation row.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
confirmSkillRemove()
Confirm skill remove.
static getSelfEvaluationDate($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill)
Get self evaluation.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getInstanceByType($a_type, $a_id)
Get type instance.
setGapAnalysisSelfEvalLevels($a_val)
Set self evaluation levels for gap analysis.
static removeMaterial($a_user_id, $a_tref_id, $a_level_id, $a_wsp_id)
Remove material.
renderMaterialsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id=0, $a_user_id=0)
Render materials row.
Confirmation screen class.
static assignMaterial($a_user_id, $a_top_skill, $a_tref_id, $a_basic_skill, $a_level, $a_wsp_id)
Assign material to skill level.
removeSkills()
Remove skills.
setGapAnalysisActualStatusModePerObject($a_obj_id, $a_cat_title="")
Set gap analysis actual status mode "per object".