5 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillProfile.php");
36 $lng->loadLanguageModule(
'skmg');
38 $ilHelp->setScreenIdComponent(
"skill");
40 $ilCtrl->saveParameter($this,
"skill_id");
41 $ilCtrl->saveParameter($this,
"tref_id");
42 $ilCtrl->saveParameter($this,
"profile_id");
44 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
47 $this->use_materials = !$ilSetting->get(
"disable_personal_workspace");
57 $this->profile_id = $a_val;
67 return $this->profile_id;
77 $this->gap_self_eval_levels = $a_val;
100 $next_class = $ilCtrl->getNextClass($this);
105 $std_cmd =
"listSkills";
106 if (count($profiles) > 0)
111 $cmd = $ilCtrl->getCmd($std_cmd);
113 $tpl->setTitle($lng->txt(
"skills"));
133 $ilTabs->addTab(
"list_skills",
134 $lng->txt(
"skmg_list_skills"),
135 $ilCtrl->getLinkTarget($this,
"listSkills"));
142 $ilTabs->activateTab($a_activate);
147 $this->offline_mode = $a_file_path;
159 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
163 $ilToolbar->addFormButton($lng->txt(
"skmg_add_skill"),
165 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
169 foreach ($skills as $s)
171 $path = $stree->getSkillTreePath($s[
"skill_node_id"]);
174 foreach (
$path as $p)
181 $html.= $this->
getSkillHTML($s[
"skill_node_id"], 0,
true);
188 $tpl->setContent($html);
200 function getSkillHTML($a_top_skill_id, $a_user_id = 0, $a_edit =
false, $a_tref_id = 0)
205 $this->tooltips = array();
216 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"Services/Skill");
218 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
220 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
223 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
224 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
227 include_once(
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
229 $act_list->setListTitle($lng->txt(
"actions"));
230 $act_list->setSelectionHeaderClass(
"small");
233 $act_list->setUseImages(
false);
235 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
237 $tref_id = $a_tref_id;
238 $skill_id = $a_top_skill_id;
241 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
242 $tref_id = $a_top_skill_id;
245 $b_skills = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
247 foreach ($b_skills as $bs)
249 $bs[
"id"] = $bs[
"skill_id"];
250 $bs[
"tref"] = $bs[
"tref_id"];
252 $path = $stree->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
255 foreach (
$path as $p)
265 $level_data = $skill->getLevelData();
267 if ($this->mode ==
"gap")
287 $se_rendered = ($se_date ==
"")
292 foreach ($skill->getAllLevelEntriesOfUser($bs[
"tref"] , $user->getId()) as $level_entry)
295 if ($se_date > $level_entry[
"status_date"] && !$se_rendered)
312 $current_target_level = 0;
314 foreach ($level_data as $k => $v)
317 $tpl->setCurrentBlock(
"level_td");
318 $tpl->setVariable(
"VAL_LEVEL", $v[
"title"]);
319 $tt_id =
"skmg_skl_tt_".self::$skill_tt_cnt;
320 self::$skill_tt_cnt++;
321 $tpl->setVariable(
"TT_ID", $tt_id);
322 if ($v[
"description"] !=
"")
326 $tpl->parseCurrentBlock();
332 foreach (
$path as $p)
336 $title.= $sep.$p[
"title"];
339 if ($a_top_skill_id == $p[
"child"])
345 $tpl->setCurrentBlock(
"skill");
346 $tpl->setVariable(
"BSKILL_TITLE", $title);
353 $tpl->setVariable(
"TXT_TARGET", $lng->txt(
"skmg_target_level"));
354 $tpl->setVariable(
"TXT_360_SURVEY", $lng->txt(
"skmg_360_survey"));
359 $act_list->setId(
"act_".$a_top_skill_id.
"_".$bs[
"id"].
"_".$bs[
"tref"]);
360 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
361 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
362 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
363 if ($this->use_materials)
365 $act_list->addItem($lng->txt(
'skmg_assign_materials'),
"",
366 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials"));
368 $act_list->addItem($lng->txt(
'skmg_self_evaluation'),
"",
369 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation"));
370 $tpl->setVariable(
"ACTIONS2", $act_list->getHTML());
373 $tpl->parseCurrentBlock();
382 $act_list->setId(
"act_".$a_top_skill_id);
383 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
386 $act_list->addItem($lng->txt(
'skmg_remove_skill'),
"",
387 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove"));
388 $tpl->setVariable(
"ACTIONS1", $act_list->getHTML());
398 return $this->tooltips;
411 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
412 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
417 $obj_id = $this->ws_tree->lookupObjectId($a_wsp_id);
420 if(!$this->offline_mode)
422 $url = $this->ws_access->getGotoLink($a_wsp_id, $obj_id);
426 $url = $this->offline_mode.
"file_".$obj_id.
"/";
432 include_once
"Modules/Test/classes/class.ilObjTestVerification.php";
434 $url .= $obj->getOfflineFilename();
438 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerification.php";
440 $url .= $obj->getOfflineFilename();
444 include_once
"Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
446 $url .= $obj->getOfflineFilename();
450 include_once
"Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerification.php";
452 $url .= $obj->getOfflineFilename();
457 $url .=
$file->getFilename();
462 return array($caption, $url);
475 $ilCtrl->redirect($this,
"listSkills");
487 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
488 if (
$_GET[
"skill_id"] > 0)
492 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
495 $ilCtrl->redirect($this,
"listSkills");
499 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
501 $cgui->setFormAction($ilCtrl->getFormAction($this));
502 $cgui->setHeaderText($lng->txt(
"skmg_really_remove_skills"));
503 $cgui->setCancel($lng->txt(
"cancel"),
"listSkills");
504 $cgui->setConfirm($lng->txt(
"delete"),
"removeSkills");
506 foreach (
$_POST[
"id"] as $i)
511 $tpl->setContent($cgui->getHTML());
522 if (is_array(
$_POST[
"id"]))
524 foreach (
$_POST[
"id"] as $n_id)
531 $ilCtrl->redirect($this,
"listSkills");
549 $cskill = explode(
":",
$_POST[
"cskill_id"]);
550 $ilCtrl->setParameter($this,
"skill_id",
$_GET[
"skill_id"]);
551 $ilCtrl->setParameter($this,
"basic_skill_id", (
int) $cskill[0]);
552 $ilCtrl->setParameter($this,
"tref_id", (
int) $cskill[1]);
553 $ilCtrl->redirect($this,
"assignMaterials");
566 $ilTabs->setBackTarget($lng->txt(
"back"),
567 $ilCtrl->getLinkTarget($this,
"listSkills"));
569 $ilCtrl->saveParameter($this,
"skill_id");
570 $ilCtrl->saveParameter($this,
"basic_skill_id");
571 $ilCtrl->saveParameter($this,
"tref_id");
573 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
580 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
583 $skill_id = (int) $_GET[
"skill_id"];
586 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
587 $tref_id = $_GET[
"skill_id"];
590 $bs = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
593 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
607 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
610 $si->setValue($_GET[
"basic_skill_id"].
":".((
int) $_GET[
"tref_id"]));
611 $ilToolbar->addInputItem(
$si,
true);
612 $ilToolbar->addFormButton($lng->txt(
"select"),
613 "switchAssignMaterials");
615 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
618 include_once(
"./Services/Skill/classes/class.ilSkillAssignMaterialsTableGUI.php");
620 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], (
int) $_GET[
"basic_skill_id"]);
622 $tpl->setContent(
$tab->getHTML());
637 if(!$ilSetting->get(
"disable_personal_workspace"))
639 ilUtil::sendInfo($lng->txt(
"skmg_ass_materials_from_workspace").
" » <a href='ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace'>".$lng->txt(
"personal_workspace").
"</a>");
642 $ilCtrl->saveParameter($this,
"skill_id");
643 $ilCtrl->saveParameter($this,
"level_id");
644 $ilCtrl->saveParameter($this,
"tref_id");
645 $ilCtrl->saveParameter($this,
"basic_skill_id");
647 $ilTabs->setBackTarget($lng->txt(
"back"),
648 $ilCtrl->getLinkTarget($this,
"assignMaterials"));
651 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
655 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
659 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceExplorer.php");
661 'skill_wspexpand', $tree, $acc_handler);
662 $exp->setTargetGet(
'wsp_id');
663 $exp->setFiltered(
false);
664 $exp->removeAllFormItemTypes();
665 $exp->addFormItemForType(
"file");
666 $exp->addFormItemForType(
"tstv");
667 $exp->addFormItemForType(
"excv");
669 if(
$_GET[
'skill_wspexpand'] ==
'')
672 $expanded = $tree->readRootId();
676 $expanded =
$_GET[
'skill_wspexpand'];
678 $exp->setCheckedItems(array((
int)
$_POST[
'wsp_id']));
679 $exp->setExpandTarget($ilCtrl->getLinkTarget($this,
'assignMaterial'));
680 $exp->setPostVar(
'wsp_id[]');
681 $exp->setExpand($expanded);
685 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"Services/Skill");
686 $mtpl->setVariable(
"EXP", $exp->getOutput());
690 $tb->addFormButton($lng->txt(
"select"),
692 $tb->setFormAction($ilCtrl->getFormAction($this));
693 $tb->setOpenFormTag(
true);
694 $tb->setCloseFormTag(
false);
695 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
696 $tb->setOpenFormTag(
false);
697 $tb->setCloseFormTag(
true);
698 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
700 $tpl->setContent($mtpl->get());
710 include_once(
"./Services/Skill/classes/class.ilPersonalSkill.php");
711 if (is_array(
$_POST[
"wsp_id"]))
713 foreach (
$_POST[
"wsp_id"] as $w)
716 (
int)
$_GET[
"tref_id"],
717 (int)
$_GET[
"basic_skill_id"], (
int)
$_GET[
"level_id"], (int) $w);
722 $ilCtrl->saveParameter($this,
"skill_id");
723 $ilCtrl->saveParameter($this,
"level_id");
724 $ilCtrl->saveParameter($this,
"tref_id");
725 $ilCtrl->saveParameter($this,
"basic_skill_id");
727 $ilCtrl->redirect($this,
"assignMaterials");
739 (
int)
$_GET[
"level_id"],
740 (int)
$_GET[
"wsp_id"]);
742 $ilCtrl->saveParameter($this, array(
"skill_id",
"basic_skill_id",
"tref_id"));
743 $ilCtrl->redirect($this,
"assignMaterials");
761 $cskill = explode(
":",
$_POST[
"cskill_id"]);
762 $ilCtrl->setParameter($this,
"skill_id",
$_GET[
"skill_id"]);
763 $ilCtrl->setParameter($this,
"basic_skill_id", (
int) $cskill[0]);
764 $ilCtrl->setParameter($this,
"tref_id", (
int) $cskill[1]);
765 $ilCtrl->redirect($this,
"selfEvaluation");
779 $ilTabs->setBackTarget($lng->txt(
"back"),
780 $ilCtrl->getLinkTarget($this,
"listSkills"));
782 $ilCtrl->saveParameter($this,
"skill_id");
783 $ilCtrl->saveParameter($this,
"basic_skill_id");
784 $ilCtrl->saveParameter($this,
"tref_id");
786 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
793 include_once(
"./Services/Skill/classes/class.ilVirtualSkillTree.php");
796 $skill_id = (int) $_GET[
"skill_id"];
799 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
800 $tref_id = $_GET[
"skill_id"];
803 $bs = $vtree->getSubTreeForCSkillId($skill_id.
":".$tref_id,
true);
807 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
822 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
825 $si->setValue(((
int) $_GET[
"basic_skill_id"]).
":".((
int) $_GET[
"tref_id"]));
826 $ilToolbar->addInputItem(
$si,
true);
827 $ilToolbar->addFormButton($lng->txt(
"select"),
828 "switchSelfEvaluation");
830 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
833 include_once(
"./Services/Skill/classes/class.ilSelfEvaluationSimpleTableGUI.php");
835 (
int) $_GET[
"skill_id"], (
int) $_GET[
"tref_id"], (
int) $_GET[
"basic_skill_id"]);
837 $tpl->setContent(
$tab->getHTML());
857 $ilCtrl->redirect($this,
"listSkills");
871 $ilTabs->setBackTarget($lng->txt(
"back"),
872 $ilCtrl->getLinkTarget($this,
""));
874 include_once(
"./Services/Skill/classes/class.ilPersonalSkillExplorerGUI.php");
876 if ($exp->getHasSelectableNodes())
878 if (!$exp->handleCommand())
880 $tpl->setContent($exp->getHTML());
902 if (count($profiles) == 0)
908 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
910 foreach ($profiles as $p)
917 $_GET[
"profile_id"] = (int) key(
$options);
918 $ilCtrl->setParameter($this,
"profile_id", $_GET[
"profile_id"]);
920 $current_profile_id = $_GET[
"profile_id"];
924 $si->setValue($current_profile_id);
925 $ilToolbar->addInputItem(
$si,
true);
926 $ilToolbar->addFormButton($lng->txt(
"select"),
928 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
942 $this->gap_mode =
"max_per_type";
943 $this->gap_mode_type = $a_type;
944 $this->gap_cat_title = $a_cat_title;
955 $this->gap_mode =
"max_per_object";
956 $this->gap_mode_obj_id = $a_obj_id;
957 $this->gap_cat_title = $a_cat_title;
975 $user_id = $ilUser->getId();
979 $user_id = $a_user_id;
986 $this->profile_levels = $profile->getSkillLevels();
988 foreach ($this->profile_levels as $l)
991 "base_skill_id" => $l[
"base_skill_id"],
992 "tref_id" => $l[
"tref_id"],
993 "level_id" => $l[
"level_id"]
997 else if (is_array($a_skills))
1003 $this->actual_levels = array();
1004 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
1005 foreach ($skills as $sk)
1008 if ($this->gap_mode ==
"max_per_type")
1010 $max = $bs->getMaxLevelPerType($sk[
"tref_id"], $this->gap_mode_type, $user_id);
1011 $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
1013 else if ($this->gap_mode ==
"max_per_object")
1015 $max = $bs->getMaxLevelPerObject($sk[
"tref_id"], $this->gap_mode_obj_id, $user_id);
1016 $this->actual_levels[$sk[
"base_skill_id"]][$sk[
"tref_id"]] = $max;
1020 $incl_self_eval =
false;
1023 $incl_self_eval =
true;
1028 if (count($skills) >= 3)
1031 $leg_labels = array();
1036 foreach ($skills as $k => $l)
1041 $levels = $bs->getLevelData();
1043 foreach ($levels as $lv)
1046 if ($l[
"level_id"] == $lv[
"id"])
1048 $skills[$k][
"target_cnt"] = $cnt;
1050 if ($this->actual_levels[$l[
"base_skill_id"]][$l[
"tref_id"]] == $lv[
"id"])
1052 $skills[$k][
"actual_cnt"] = $cnt;
1054 if ($incl_self_eval)
1056 if ($self_vals[$l[
"base_skill_id"]][$l[
"tref_id"]] == $lv[
"id"])
1058 $skills[$k][
"self_cnt"] = $cnt;
1061 $max_cnt = max($max_cnt, $cnt);
1070 include_once(
"./Services/Chart/classes/class.ilChart.php");
1071 $chart =
new ilChart(
"gap_chart", 800, 300);
1072 $chart->setYAxisMax($max_cnt);
1073 $chart->setLegLabels($leg_labels);
1077 $cd->setLabel($lng->txt(
"skmg_target_level"));
1078 $cd->setFill(
"true",
"#A0A0A0");
1082 if ($this->gap_cat_title !=
"")
1084 $cd2->setLabel($this->gap_cat_title);
1086 else if ($this->gap_mode ==
"max_per_type")
1088 $cd2->setLabel($lng->txt(
"objs_".$this->gap_mode_type));
1090 else if ($this->gap_mode ==
"max_per_object")
1094 $cd2->setFill(
"true",
"#8080FF");
1097 if ($incl_self_eval)
1100 $cd3->setLabel($lng->txt(
"skmg_self_evaluation"));
1101 $cd3->setFill(
"true",
"#FF8080");
1106 foreach ($skills as $pl)
1108 $cd->addPoint($cnt, (
int) $pl[
"target_cnt"]);
1109 $cd2->addPoint($cnt, (
int) $pl[
"actual_cnt"]);
1110 if ($incl_self_eval)
1112 $cd3->addPoint($cnt, (
int) $pl[
"self_cnt"]);
1120 $chart->addData($cd);
1122 $chart->addData($cd2);
1125 $chart->addData($cd3);
1129 $chart->setLegend($lg);
1131 $chart_html = $chart->getHTML();
1136 foreach ($skills as $s)
1138 $path = $stree->getSkillTreePath($s[
"base_skill_id"]);
1141 foreach (
$path as $p)
1148 $html.= $this->
getSkillHTML($s[
"base_skill_id"], $user_id,
false, $s[
"tref_id"]);
1155 return $chart_html.$html;
1168 $ilCtrl->setParameter($this,
"profile_id",
$_GET[
"profile_id"]);
1169 $ilCtrl->redirect($this,
"listProfiles");
1182 if ($a_user_id == 0)
1184 $a_user_id = $ilUser->getId();
1190 $a_top_skill_id, $a_tref_id, $a_base_skill);
1192 $valid_sel_level =
false;
1195 foreach ($a_levels as $k => $v)
1197 if ($v[
"id"] == $se_level)
1199 $valid_sel_level =
true;
1205 foreach ($a_levels as $k => $v)
1207 $a_tpl->setCurrentBlock(
"val_level_td");
1208 if ($valid_sel_level && $v[
"id"] == $se_level)
1210 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1211 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1215 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1217 $a_tpl->parseCurrentBlock();
1224 $a_tpl->setCurrentBlock(
"value_row");
1226 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_self_evaluation").
1229 $a_tpl->parseCurrentBlock();
1238 function renderMaterialsRow($a_tpl, $a_levels, $a_top_skill_id, $a_base_skill, $a_tref_id = 0, $a_user_id = 0)
1242 if ($a_user_id == 0)
1244 $a_user_id = $ilUser->getId();
1248 foreach ($a_levels as $v)
1251 $a_tref_id, $v[
"id"]);
1262 foreach ($a_levels as $k => $v)
1265 $a_tref_id, $v[
"id"]);
1268 $a_tpl->setCurrentBlock(
"val_level_td");
1269 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1270 $a_tpl->parseCurrentBlock();
1275 $a_tpl->setCurrentBlock(
"level_link");
1280 $a_tref_id, $v[
"id"]) as $item)
1283 $a_tpl->setVariable(
"HREF_LINK", $mat_data[1]);
1284 $a_tpl->setVariable(
"TXT_LINK", $cnt);
1287 $mat_tt_id =
"skmg_skl_tt_mat_".self::$skill_tt_cnt;
1288 self::$skill_tt_cnt++;
1289 $a_tpl->setVariable(
"LEVEL_LINK_ID", $mat_tt_id);
1291 if(!$this->offline_mode)
1297 $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
1300 $a_tpl->parseCurrentBlock();
1304 $a_tpl->setCurrentBlock(
"val_level_td");
1305 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillMat");
1306 $a_tpl->parseCurrentBlock();
1310 $a_tpl->setCurrentBlock(
"value_row");
1311 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_material"));
1312 $a_tpl->parseCurrentBlock();
1325 if ($a_user_id == 0)
1327 $a_user_id = $ilUser->getId();
1331 $profile_levels = $profile->getSkillLevels();
1333 foreach ($a_levels as $k => $v)
1335 $a_tpl->setCurrentBlock(
"val_level_td");
1336 $target_level =
false;
1337 foreach ($profile_levels as $pl)
1339 if ($pl[
"level_id"] == $v[
"id"] &&
1340 $pl[
"base_skill_id"] == $v[
"skill_id"])
1342 $target_level =
true;
1343 $current_target_level = $v[
"id"];
1349 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1350 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1354 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1356 $a_tpl->parseCurrentBlock();
1359 $a_tpl->setCurrentBlock(
"value_row");
1360 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_target_level"));
1361 $a_tpl->parseCurrentBlock();
1374 if ($a_user_id == 0)
1376 $a_user_id = $ilUser->getId();
1380 $profile_levels = $profile->getSkillLevels();
1382 foreach ($a_levels as $k => $v)
1384 $a_tpl->setCurrentBlock(
"val_level_td");
1385 $survey_level =
false;
1386 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"])
1388 $survey_level =
true;
1393 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1394 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1398 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1400 $a_tpl->parseCurrentBlock();
1403 $a_tpl->setCurrentBlock(
"value_row");
1404 if ($this->gap_cat_title !=
"")
1406 $a_tpl->setVariable(
"TXT_VAL_TITLE", $this->gap_cat_title);
1408 else if ($this->gap_mode ==
"max_per_type")
1410 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"objs_".$this->gap_mode_type));
1412 else if ($this->gap_mode ==
"max_per_object")
1417 $a_tpl->parseCurrentBlock();
1430 if ($a_user_id == 0)
1432 $a_user_id = $ilUser->getId();
1436 if (count($self_vals) == 0)
1441 foreach ($a_levels as $k => $v)
1443 $a_tpl->setCurrentBlock(
"val_level_td");
1444 $survey_level =
false;
1445 if ($self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"])
1447 $survey_level =
true;
1451 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1452 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1456 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1458 $a_tpl->parseCurrentBlock();
1461 $a_tpl->setCurrentBlock(
"value_row");
1462 $a_tpl->setVariable(
"TXT_VAL_TITLE", $lng->txt(
"skmg_self_evaluation"));
1464 $a_tpl->parseCurrentBlock();
1475 $se_level = $a_level_entry[
"level_id"];
1478 $valid_sel_level =
false;
1481 foreach ($a_levels as $k => $v)
1483 if ($v[
"id"] == $se_level)
1485 $valid_sel_level =
true;
1491 foreach ($a_levels as $k => $v)
1493 $a_tpl->setCurrentBlock(
"val_level_td");
1494 if ($valid_sel_level && $v[
"id"] == $se_level)
1496 $a_tpl->setVariable(
"VAL_LEVEL",
"x");
1497 $a_tpl->setVariable(
"TD_CLASS",
"ilSkillSelf");
1501 $a_tpl->setVariable(
"VAL_LEVEL",
" ");
1503 $a_tpl->parseCurrentBlock();
1510 $a_tpl->setCurrentBlock(
"value_row");
1512 $a_tpl->setVariable(
"TXT_VAL_TITLE", $a_level_entry[
"trigger_title"].
1515 $a_tpl->parseCurrentBlock();
1532 $profile_levels = $profile->getSkillLevels();
1535 $current_target_level = 0;
1538 foreach ($a_levels as $k => $v)
1540 foreach ($this->profile_levels as $pl)
1542 if ($pl[
"level_id"] == $v[
"id"] &&
1543 $pl[
"base_skill_id"] == $v[
"skill_id"])
1546 $current_target_level = $v[
"id"];
1550 if ($this->actual_levels[$v[
"skill_id"]][0] == $v[
"id"])
1559 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
1561 $res = $skill_res->getResources();
1562 $imp_resources = array();
1563 foreach (
$res as $level)
1565 foreach($level as $r)
1567 if ($r[
"imparting"] ==
true &&
1568 $current_target_level == $r[
"level_id"])
1570 $imp_resources[] = $r;
1574 foreach($imp_resources as $r)
1579 include_once(
"./Services/Link/classes/class.ilLink.php");
1580 $a_tpl->setCurrentBlock(
"resource_item");
1581 $a_tpl->setVariable(
"TXT_RES", $title);
1583 $a_tpl->parseCurrentBlock();
1585 if (count($imp_resources) > 0)
1587 $a_tpl->touchBlock(
"resources_list");
1588 $a_tpl->setCurrentBlock(
"resources");
1589 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_needs_impr_res"));
1590 $a_tpl->parseCurrentBlock();
1594 $a_tpl->setCurrentBlock(
"resources");
1595 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_needs_impr_no_res"));
1596 $a_tpl->parseCurrentBlock();
1601 $a_tpl->setCurrentBlock(
"resources");
1602 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_skill_no_needs_impr"));
1603 $a_tpl->parseCurrentBlock();
1609 include_once(
"./Services/Skill/classes/class.ilSkillResources.php");
1611 $res = $skill_res->getResources();
1614 foreach (
$res as $level)
1618 foreach($level as $r)
1620 if ($r[
"imparting"])
1625 include_once(
"./Services/Link/classes/class.ilLink.php");
1626 $a_tpl->setCurrentBlock(
"resource_item");
1627 $a_tpl->setVariable(
"TXT_RES", $title);
1629 $a_tpl->parseCurrentBlock();
1632 $cl = $r[
"level_id"];
1637 $a_tpl->setCurrentBlock(
"resources_list_level");
1638 $a_tpl->setVariable(
"TXT_LEVEL", $lng->txt(
"skmg_level"));
1640 $a_tpl->parseCurrentBlock();
1641 $a_tpl->touchBlock(
"resources_list");
1646 $a_tpl->setCurrentBlock(
"resources");
1647 $a_tpl->setVariable(
"SUGGESTED_MAT_MESS", $lng->txt(
"skmg_suggested_resources"));
1648 $a_tpl->parseCurrentBlock();