3 declare(strict_types=1);
170 $this->
ctrl = $DIC->ctrl();
171 $this->
lng = $DIC->language();
172 $this->
help = $DIC[
"ilHelp"];
173 $this->setting = $DIC[
"ilSetting"];
174 $this->
user = $DIC->user();
175 $this->tpl = $DIC[
"tpl"];
176 $this->
tabs = $DIC->tabs();
177 $this->
toolbar = $DIC->toolbar();
178 $this->
access = $DIC->access();
179 $this->ui_fac = $DIC->ui()->factory();
180 $this->ui_ren = $DIC->ui()->renderer();
181 $this->request = $DIC->http()->request();
182 $this->
ui = $DIC->ui();
183 $this->storage = $DIC->resourceStorage();
184 $this->data_fac = new \ILIAS\Data\Factory();
185 $this->tree = $DIC->repositoryTree();
186 $this->obj_definition = $DIC[
"objDefinition"];
187 $this->personal_gui_request = $DIC->skills()->internal()->gui()->personal_request();
188 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
189 $this->level_repo = $DIC->skills()->internal()->repo()->getLevelRepo();
190 $this->tree_service = $DIC->skills()->tree();
191 $this->internal_manager = $DIC->skills()->internal()->manager();
192 $this->profile_manager = $this->internal_manager->getProfileManager();
193 $this->profile_completion_manager = $this->internal_manager->getProfileCompletionManager();
194 $this->personal_manager = $this->internal_manager->getPersonalSkillManager();
195 $this->assigned_material_manager = $this->internal_manager->getAssignedMaterialManager();
196 $this->self_evaluation_manager = $this->internal_manager->getSelfEvaluationManager();
197 $this->resource_manager = $this->internal_manager->getResourceManager();
198 $this->table_manager = $this->internal_manager->getTableManager();
199 $this->cont_factory_service = $DIC->skills()->internalContainer()->factory();
208 $ilHelp->setScreenIdComponent(
"skill");
210 $ilCtrl->saveParameter($this,
"skill_id");
211 $ilCtrl->saveParameter($this,
"tref_id");
212 $ilCtrl->saveParameter($this,
"profile_id");
213 $ilCtrl->saveParameter($this,
"list_mode");
215 $this->requested_list_mode = $this->personal_gui_request->getListMode();
216 $this->requested_node_id = $this->personal_gui_request->getNodeId();
217 $this->requested_profile_id = $this->personal_gui_request->getProfileId();
218 $this->requested_skill_id = $this->personal_gui_request->getSkillId();
219 $this->requested_skill_ids = $this->personal_gui_request->getSkillIds();
220 $this->requested_basic_skill_id = $this->personal_gui_request->getBasicSkillId();
221 $this->requested_tref_id = $this->personal_gui_request->getTrefId();
222 $this->requested_level_id = $this->personal_gui_request->getLevelId();
223 $this->requested_wsp_ids = $this->personal_gui_request->getWorkspaceIds();
224 $this->requested_table_assign_materials_action = $this->personal_gui_request->getTableAssignMaterialsAction();
225 $this->requested_table_assign_materials_level_ids = $this->personal_gui_request->getTableAssignMaterialsLevelIds();
226 $this->requested_table_assign_materials_wsp_id = $this->personal_gui_request->getTableAssignMaterialsWorkspaceId();
228 $this->user_profiles = $this->profile_manager->getProfilesOfUser($this->
user->getId());
229 $this->cont_profiles = [];
231 $this->use_materials = !
$ilSetting->get(
"disable_personal_workspace");
245 $this->profile_id = $a_val;
258 $this->gap_self_eval_levels = $a_val;
271 $this->history_view = $a_val;
281 return ($this->mode ==
"gap" && !$this->history_view);
307 public function hideSkill(
int $a_skill_id,
int $a_tref_id = 0): void
309 $this->hidden_skills[] = $a_skill_id .
":" . $a_tref_id;
330 $this->obj_id = $a_obj_id;
331 $this->obj_skills = $a_skills;
335 int $cont_member_role_id
337 $this->cont_profiles = $this->profile_manager->getAllProfilesOfRole($cont_member_role_id);
347 $next_class = $ilCtrl->getNextClass($this);
350 $cmd = $ilCtrl->getCmd(
"render");
355 switch ($next_class) {
362 public function setTabs(
string $a_activate): void
368 if (!empty($this->user_profiles)) {
369 $ilCtrl->setParameter($this,
"list_mode", self::LIST_PROFILES);
372 $lng->
txt(
"skmg_assigned_profiles"),
373 $ilCtrl->getLinkTarget($this,
"render")
378 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
381 $lng->
txt(
"skmg_selected_skills"),
382 $ilCtrl->getLinkTarget($this,
"render")
385 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
389 $ilTabs->activateTab($a_activate);
394 $this->offline_mode = $a_file_path;
404 if ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles)) {
419 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"components/ILIAS/Skill");
424 $ilToolbar->addFormButton(
425 $lng->
txt(
"skmg_add_skill"),
428 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
431 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
432 $this->
getFilter()->addToToolbar($filter_toolbar,
false);
434 $skills = $this->personal_manager->getSelectedUserSkills($ilUser->getId());
436 foreach ($skills as $s) {
437 $path = $this->tree_service->getSkillTreePath($s->getSkillNodeId());
440 foreach (
$path as $p) {
445 $html .= $this->
getSkillHTML($s->getSkillNodeId(), 0,
true);
451 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilter");
452 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
453 $html = $tpl->
get() . $html;
455 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_no_skills_selected_info"));
456 $html = $this->ui_ren->render($box);
459 $main_tpl->setContent($html);
465 $this->
ctrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
466 $this->
ctrl->redirect($this,
"listSkills");
475 $this->
ctrl->redirect($this,
"listAssignedProfile");
490 bool $a_edit =
false,
497 "components/ILIAS/Skill",
498 "personal_skill_html",
499 array(
"personal_skills_gui" => $this,
"top_skill_id" => $a_top_skill_id,
"user_id" => $a_user_id,
500 "edit" => $a_edit,
"tref_id" => $a_tref_id)
503 if (!$uip->replaced()) {
504 $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
506 $skill_html = $uip->getHTML($skill_html);
507 $main_tpl->addJavaScript(
"assets/js/SkillEntries.js");
515 bool $a_edit =
false,
524 if ($a_user_id == 0) {
530 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"components/ILIAS/Skill");
532 $vtree = $this->tree_repo->getVirtualTreeForNodeId($a_top_skill_id);
533 $tref_id = $a_tref_id;
534 $skill_id = $a_top_skill_id;
536 $tref_id = $a_top_skill_id;
539 $b_skills = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
541 foreach ($b_skills as $bs) {
542 $bs[
"id"] = (
int) $bs[
"skill_id"];
543 $bs[
"tref"] = (
int) $bs[
"tref_id"];
545 $path = $this->tree_service->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
551 foreach (
$path as $p) {
559 $level_data = $skill->getLevelData();
565 foreach (
$path as $p) {
567 $title .= $sep . $p[
"title"];
569 $description = $p[
"description"];
571 if ($a_top_skill_id == $p[
"child"]) {
576 $title = $lng->
txt(
"skmg_skill_overview");
585 if (!empty($skl_lvl_desc)) {
588 $acc->addItem($lng->
txt(
'skmg_skill_levels'), $skl_lvl_desc);
589 $panel_comps[] = $this->ui_fac->legacy($acc->getHTML());
591 $prof_comp_head_rendered =
false;
592 $has_at_least_one_entry =
false;
595 if (!empty($self_eval_gap_item_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
597 $has_at_least_one_entry =
true;
599 $panel_comps[] = $this->ui_fac->legacy($self_eval_gap_item_prof);
619 if (!empty($self_eval_entries_latest)) {
621 $has_at_least_one_entry =
true;
623 $panel_comps[] = $this->ui_fac->legacy($self_eval_entries_latest);
624 $panel_comps[] = $this->ui_fac->legacy($self_eval_entries_non_latest);
627 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
629 if ($this->
getFilter()->showTargetLevel()) {
631 $prof_comp_head_rendered =
true;
638 if (!empty($actual_gap_item = $this->
getActualGapItem($level_data, $bs[
"tref"]))) {
639 $panel_comps[] = $this->ui_fac->legacy($actual_gap_item);
640 $has_at_least_one_entry =
true;
643 if (!empty($self_eval_gap_item_non_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
644 $panel_comps[] = $this->ui_fac->legacy($self_eval_gap_item_non_prof);
645 $has_at_least_one_entry =
true;
668 if (!empty($object_entries_latest) && !$prof_comp_head_rendered) {
671 if (!empty($object_entries_latest)) {
672 $has_at_least_one_entry =
true;
674 $panel_comps[] = $this->ui_fac->legacy($object_entries_latest);
675 $panel_comps[] = $this->ui_fac->legacy($object_entries_non_latest);
695 if (!empty($all_entries_latest) && !$prof_comp_head_rendered) {
698 if (!empty($all_entries_latest)) {
699 $has_at_least_one_entry =
true;
701 $panel_comps[] = $this->ui_fac->legacy($all_entries_latest);
702 $panel_comps[] = $this->ui_fac->legacy($all_entries_non_latest);
706 if (!$has_at_least_one_entry) {
707 $panel_comps[] = $this->ui_fac->legacy(
"<br/>" . $lng->
txt(
"skmg_no_skill_entries"));
712 $sub = $this->ui_fac->panel()->sub($title, $panel_comps);
715 $sub = $sub->withFurtherInformation(
$res);
716 } elseif ($this->
getFilter()->showMaterialsRessources() && $this->
getProfileId() == 0 && !$this->gap_mode_obj_id) {
720 $sub = $sub->withFurtherInformation($sugg);
725 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
726 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
727 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
728 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"list_mode", $this->requested_list_mode);
729 if ($this->use_materials) {
730 $actions[] = $this->ui_fac->button()->shy(
731 $lng->
txt(
'skmg_assign_materials'),
732 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials")
735 $actions[] = $this->ui_fac->button()->shy(
736 $lng->
txt(
'skmg_self_evaluation'),
737 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation")
739 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
742 $sub_panels[] = $sub;
748 $sub_panels[] = $mat;
758 $sub_panels = $this->ui_fac->legacy($des . $this->ui_ren->render($sub_panels));
760 $panel = $this->ui_fac->panel()->standard(
768 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
769 $actions[] = $this->ui_fac->button()->shy(
770 $lng->
txt(
'skmg_remove_skill'),
771 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove")
774 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
777 return $this->ui_ren->render($panel);
789 $obj_id = $ws_tree->lookupObjectId($a_wsp_id);
793 $url = $ws_access->getGotoLink($a_wsp_id, $obj_id);
801 $url .= $obj->getOfflineFilename();
806 $url .= $obj->getOfflineFilename();
811 $url .= $obj->getOfflineFilename();
816 $url .= $obj->getOfflineFilename();
821 $url .= $obj->getOfflineFilename();
826 $url .= $obj->getOfflineFilename();
831 $url .= $file->getFileName();
836 return array($caption,
$url, $obj_id);
847 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
848 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
849 $ilCtrl->redirect($this,
"listSkills");
858 if ($this->requested_skill_id > 0) {
861 if (empty($this->requested_skill_ids)) {
862 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"no_checkbox"),
true);
863 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
864 $ilCtrl->redirect($this,
"listSkills");
867 $cgui->setFormAction($ilCtrl->getFormAction($this));
868 $cgui->setHeaderText($lng->
txt(
"skmg_really_remove_skills"));
869 $cgui->setCancel($lng->
txt(
"cancel"),
"listSkills");
870 $cgui->setConfirm($lng->
txt(
"remove"),
"removeSkills");
872 foreach ($this->requested_skill_ids as $i) {
886 if (!empty($this->requested_skill_ids)) {
887 foreach ($this->requested_skill_ids as $n_id) {
888 $this->personal_manager->removePersonalSkill($ilUser->getId(), $n_id);
892 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
893 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
894 $ilCtrl->redirect($this,
"listSkills");
913 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
915 :
"listAssignedProfile";
918 $ilCtrl->getLinkTarget($this, $cmd)
921 $ilCtrl->saveParameter($this,
"skill_id");
922 $ilCtrl->saveParameter($this,
"basic_skill_id");
923 $ilCtrl->saveParameter($this,
"tref_id");
931 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
938 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
941 foreach ($bs as
$b) {
945 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
946 ? $this->requested_basic_skill_id
949 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
951 if (count($options) > 1) {
954 $si->setValue($cur_basic_skill_id);
955 $ilToolbar->addInputItem($si,
true);
956 $ilToolbar->addFormButton(
961 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
964 $table = $this->table_manager->getAssignMaterialsTable(
965 $this->requested_skill_id,
966 $this->requested_tref_id,
970 $tpl->
setContent($this->ui_ren->render($table));
988 if (!
$ilSetting->get(
"disable_personal_workspace")) {
989 $url =
'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
990 $mbox = $ui->
factory()->messageBox()->info($lng->
txt(
"skmg_ass_materials_from_workspace"))
991 ->withLinks([$ui->
factory()->link()->standard(
992 $lng->
txt(
"personal_resources"),
995 $message = $ui->
renderer()->render($mbox);
998 if ($this->requested_table_assign_materials_action ===
"assignMaterials" 999 && !empty($this->requested_table_assign_materials_level_ids)) {
1000 $ilCtrl->setParameter($this,
"level_id", $this->requested_table_assign_materials_level_ids[0]);
1002 $ilCtrl->saveParameter($this,
"skill_id");
1003 $ilCtrl->saveParameter($this,
"level_id");
1004 $ilCtrl->saveParameter($this,
"tref_id");
1005 $ilCtrl->saveParameter($this,
"basic_skill_id");
1007 $ilTabs->setBackTarget(
1009 $ilCtrl->getLinkTarget($this,
"assignMaterials")
1014 $exp->
setTypeWhiteList(array(
"blog",
"wsrt",
"wfld",
"file",
"tstv",
"excv"));
1015 $exp->setSelectableTypes(array(
"file",
"tstv",
"excv"));
1016 $exp->setSelectMode(
"wsp_ids",
true);
1017 if ($exp->handleCommand()) {
1022 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"components/ILIAS/Skill");
1023 $mtpl->setVariable(
"EXP", $exp->getHTML());
1028 $lng->
txt(
"select"),
1031 $tb->setFormAction($ilCtrl->getFormAction($this));
1032 $tb->setOpenFormTag(
true);
1033 $tb->setCloseFormTag(
false);
1034 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
1035 $tb->setOpenFormTag(
false);
1036 $tb->setCloseFormTag(
true);
1037 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
1049 if (!empty($this->requested_wsp_ids)) {
1050 foreach ($this->requested_wsp_ids as $w) {
1051 $this->assigned_material_manager->assignMaterial(
1060 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1063 $ilCtrl->saveParameter($this,
"skill_id");
1064 $ilCtrl->saveParameter($this,
"level_id");
1065 $ilCtrl->saveParameter($this,
"tref_id");
1066 $ilCtrl->saveParameter($this,
"basic_skill_id");
1068 $ilCtrl->redirect($this,
"assignMaterials");
1077 if ($this->requested_table_assign_materials_action ===
"removeMaterial" 1078 && !empty($this->requested_table_assign_materials_level_ids)
1079 && $this->requested_table_assign_materials_wsp_id !== 0) {
1080 $this->assigned_material_manager->removeAssignedMaterial(
1083 (
int) $this->requested_table_assign_materials_level_ids[0],
1084 $this->requested_table_assign_materials_wsp_id
1086 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1088 $ilCtrl->redirect($this,
"assignMaterials");
1104 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1106 :
"listAssignedProfile";
1109 $ilCtrl->getLinkTarget($this, $cmd)
1112 $ilCtrl->saveParameter($this,
"skill_id");
1113 $ilCtrl->saveParameter($this,
"basic_skill_id");
1114 $ilCtrl->saveParameter($this,
"tref_id");
1122 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
1129 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
1133 foreach ($bs as
$b) {
1137 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
1138 ? $this->requested_basic_skill_id
1141 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
1143 if (count($options) > 1) {
1146 $si->setValue($cur_basic_skill_id);
1147 $ilToolbar->addInputItem($si,
true);
1148 $ilToolbar->addFormButton(
1149 $lng->
txt(
"select"),
1153 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1157 $tpl->
setContent($this->ui_ren->render($form));
1164 $basic_skill_id = $cur_basic_skill_id;
1166 $self_eval = $this->ui_fac->input()->field()->radio($this->
lng->txt(
"skmg_self_evaluation"))
1167 ->withRequired(
true);
1169 $current_level_id = $this->self_evaluation_manager->getSelfEvaluation(
1170 $this->
user->getId(),
1176 foreach ($skill->getLevelData() as $level) {
1177 $self_eval = $self_eval->withOption((
string) $level[
"id"], $level[
"title"], $level[
"description"]);
1178 if ($current_level_id == $level[
"id"]) {
1179 $self_eval = $self_eval->withValue($level[
"id"]);
1183 $tree_id = $this->tree_repo->getTreeIdForNodeId($basic_skill_id);
1184 $node_manager = $this->internal_manager->getTreeNodeManager($tree_id);
1185 $section_title = $node_manager->getWrittenPath($basic_skill_id);
1186 $section_inputs = [
"self_eval" => $self_eval];
1187 $section = $this->ui_fac->input()->field()->section(
1192 $form_action = $this->
ctrl->getFormAction($this,
"saveSelfEvaluation");
1193 return $this->ui_fac->input()->container()->form()->standard($form_action, [
"section" => $section]);
1202 $ilCtrl->setParameter($this,
"basic_skill_id", $this->requested_basic_skill_id);
1204 $ilCtrl->clearParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id");
1205 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1206 ?
"render" :
"listAssignedProfile";
1208 if ($this->request->getMethod() ===
"POST") {
1209 $form = $form->withRequest($this->request);
1210 $data = $form->getData();
1211 if (isset(
$data[
"section"]) && is_array(
$data[
"section"]) && !empty(
$data[
"section"][
"self_eval"])) {
1212 $this->self_evaluation_manager->saveSelfEvaluation(
1217 (
int)
$data[
"section"][
"self_eval"]
1219 $this->tpl->setOnScreenMessage(
"success", $lng->
txt(
"msg_obj_modified"),
true);
1221 $this->tpl->setContent($this->ui_ren->render($form));
1226 $this->
tabs->clearTargets();
1227 $this->
tabs->setBackTarget(
1229 $ilCtrl->getLinkTarget($this, $cmd)
1235 $ilCtrl->redirect($this, $cmd);
1246 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
1249 $ilCtrl->getLinkTarget($this,
"render")
1251 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
1254 if ($exp->getHasSelectableNodes()) {
1255 if (!$exp->handleCommand()) {
1258 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_select_skill"));
1260 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_no_nodes_selectable"));
1266 $this->
ctrl->redirectByClass(
"ilContSkillPresentationGUI",
"showProfiles");
1271 if (empty($this->cont_profiles)) {
1279 $this->tpl->setContent($html);
1286 $this->
tabs->clearTargets();
1287 $this->
tabs->setBackTarget(
1288 $this->
lng->txt(
"back"),
1289 $this->
ctrl->getLinkTarget($this,
"showProfiles")
1293 $this->tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
1295 $this->tpl->setContent($this->getGapAnalysisHTML());
1305 $this->tpl->setContent($this->getGapAnalysisHTML());
1315 foreach ($profiles as $p) {
1316 $image_id = $p->getImageId();
1318 $identification = $this->storage->manage()->find($image_id);
1319 $src = $this->storage->consume()->src($identification);
1320 $image = $this->ui_fac->image()->responsive($src->getSrc(), $this->
lng->txt(
"skmg_custom_image_alt"));
1322 $image = $this->ui_fac->image()->responsive(
1323 "./assets/images/logo/ilias_logo_72x72.png",
1328 $this->
ctrl->setParameter($this,
"profile_id", $p->getId());
1329 $link = $this->ui_fac->link()->standard(
1331 $this->
ctrl->getLinkTarget($this, $gap_mode ?
"listProfileForGap" :
"listAssignedProfile")
1333 $this->
ctrl->setParameter($this,
"profile_id",
"");
1335 $chart_value = $this->profile_completion_manager->getProfileProgress($this->
user->getId(), $p->getId());
1336 $prof_item = $this->ui_fac->item()->standard($link)
1337 ->withDescription($p->getDescription())
1338 ->withLeadImage($image)
1339 ->withProgress($this->ui_fac->chart()->progressMeter()->standard(100, $chart_value));
1341 $prof_items[] = $prof_item;
1344 $prof_list = $this->ui_fac->panel()->listing()->standard(
"", array(
1345 $this->ui_fac->item()->group(
"", $prof_items)
1353 if (!empty($this->cont_profiles)) {
1354 $link = $this->ui_fac->link()->standard(
1355 $this->
lng->txt(
"skmg_open_all_assigned_profiles"),
1356 $this->
ctrl->getLinkTargetByClass([
"ilDashboardGUI",
"ilAchievementsGUI",
"ilPersonalSkillsGUI"])
1358 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info"))->withLinks([$link]);
1360 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info_empty"));
1363 return $this->ui_ren->render($box);
1368 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_records_info_empty"));
1370 return $this->ui_ren->render($box);
1375 $this->gap_mode =
"max_per_type";
1376 $this->gap_mode_type = $a_type;
1377 $this->gap_cat_title = $a_cat_title;
1378 $this->mode =
"gap";
1383 $this->gap_mode =
"max_per_object";
1384 $this->gap_mode_obj_id = $a_obj_id;
1385 $this->gap_cat_title = $a_cat_title;
1386 $this->mode =
"gap";
1389 public function getGapAnalysisHTML(
int $a_user_id = 0, ?array $a_skills = null):
string 1396 if ($a_skills == null) {
1398 $a_skills[] = array(
1399 "base_skill_id" => $s->getBaseSkillId(),
1400 "tref_id" => $s->getTrefId()
1407 if ($a_user_id == 0) {
1415 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
1419 $vtree = $this->tree_service->getGlobalVirtualSkillTree();
1420 $a_skills = $vtree->getOrderedNodeset($a_skills,
"base_skill_id",
"tref_id");
1422 foreach ($a_skills as $s) {
1424 $skills[] = $this->cont_factory_service->containerSkill()->skill(
1425 (
int) $s[
"base_skill_id"],
1434 $this->actual_levels = $this->profile_completion_manager->getLastLevelPerObjectAndTriggerUser(
1437 $this->gap_mode_obj_id,
1441 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
1445 $this->gap_mode_type,
1446 $this->gap_mode_obj_id
1448 $this->next_level_fuls = $this->profile_completion_manager->getActualNextLevelFulfilments(
1452 $this->gap_mode_type,
1453 $this->gap_mode_obj_id
1459 $not_all_self_evaluated =
false;
1461 foreach ($skills as $s) {
1462 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
1464 $not_all_self_evaluated =
true;
1467 $path = $this->tree_service->getSkillTreePath($s->getBaseSkillId());
1470 foreach (
$path as $p) {
1479 if ($not_all_self_evaluated) {
1480 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
1481 $html = $this->ui_ren->render($box) . $html;
1485 $all_chart_html = $this->getBarChartHTML($bc_skills);
1487 if (!empty($all_chart_html)) {
1488 $pan = $this->ui_fac->panel()->standard(
1489 $lng->
txt(
"skmg_bar_charts"),
1490 $this->ui_fac->legacy($all_chart_html)
1492 $all_chart_html = $this->ui_ren->render($pan);
1497 return $all_chart_html . $html;
1503 protected function getBarChartHTML(array $skills):
string 1508 $target_dim = $lng->
txt(
"skmg_target_level");
1509 $eval_dim = $lng->
txt(
"skmg_eval_type_1");
1510 if ($this->gap_cat_title !=
"") {
1512 } elseif ($this->gap_mode ==
"max_per_type") {
1513 $eval_dim = $lng->
txt(
"objs_" . $this->gap_mode_type);
1514 } elseif ($this->gap_mode ==
"max_per_object") {
1517 $self_eval_dim = $lng->
txt(
"skmg_self_evaluation");
1519 $incl_self_eval =
false;
1522 $incl_self_eval =
true;
1529 $all_chart_data = [];
1530 $render_eval_dim =
false;
1531 foreach ($skills as $l) {
1535 if (empty($levels)) {
1542 $labels = [0 =>
""];
1543 foreach ($levels as $lv) {
1546 $labels[] = $lv[
"title"];
1548 if ($l->getLevelId() == $lv[
"id"]) {
1549 $points[$target_dim] = [$cnt - 0.01, $cnt];
1550 $tooltips[$target_dim] = $lv[
"title"];
1552 $points[$target_dim] = $points[$target_dim] ?? null;
1553 $tooltips[$target_dim] = $tooltips[$target_dim] ?? null;
1556 if ($this->actual_levels[$l->getBaseSkillId()][$l->getTrefId()] == $lv[
"id"]) {
1557 $perc = $this->next_level_fuls[$l->getBaseSkillId()][$l->getTrefId()] ?? 0.0;
1558 $points[$eval_dim] = $cnt + $perc;
1559 $tooltips[$eval_dim] = null;
1561 $tooltips[$eval_dim] = $lv[
"title"] .
" + " . $perc * 100 .
"%";
1563 $render_eval_dim =
true;
1565 $points[$eval_dim] = $points[$eval_dim] ?? null;
1566 $tooltips[$eval_dim] = $tooltips[$eval_dim] ?? null;
1567 if (!is_null($points[$eval_dim])) {
1568 $render_eval_dim =
true;
1571 if ($incl_self_eval) {
1572 if (($self_vals[$l->getBaseSkillId()][$l->getTrefId()] ?? 0) == $lv[
"id"]) {
1573 $points[$self_eval_dim] = $cnt;
1574 $tooltips[$self_eval_dim] = null;
1576 $points[$self_eval_dim] = $points[$self_eval_dim] ?? null;
1577 $tooltips[$self_eval_dim] = $tooltips[$self_eval_dim] ?? null;
1583 if (!$render_eval_dim) {
1584 unset($points[$eval_dim]);
1585 unset($tooltips[$eval_dim]);
1592 if (!empty($tmp_labels) && $tmp_labels !== $labels) {
1596 $tmp_labels = $labels;
1599 $l->getBaseSkillId(),
1602 $all_chart_data[$chart_counter][$bar_counter][
"levels"] = $labels;
1603 $all_chart_data[$chart_counter][$bar_counter][
"points"] = $points;
1604 $all_chart_data[$chart_counter][$bar_counter][
"tooltips"] = $tooltips;
1609 $all_chart_html =
"";
1610 foreach ($all_chart_data as $chart_data) {
1611 $c_dimension = $this->data_fac->dimension()->cardinal($chart_data[0][
"levels"]);
1612 $r_dimension = $this->data_fac->dimension()->range($c_dimension);
1620 $target_bar = $target_bar->withRelativeWidth(1.1);
1621 $target_bar = $target_bar->withColor($this->data_fac->color(
"#333333"));
1622 $ds[$target_dim] = $r_dimension;
1623 $bars[$target_dim] = $target_bar;
1626 if ($render_eval_dim) {
1628 $eval_bar = $eval_bar->withRelativeWidth(0.5);
1629 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#307C88"));
1631 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#d38000"));
1633 $ds[$eval_dim] = $c_dimension;
1634 $bars[$eval_dim] = $eval_bar;
1637 if ($incl_self_eval) {
1639 $self_eval_bar = $self_eval_bar->withRelativeWidth(0.5);
1640 $self_eval_bar = $self_eval_bar->withColor($this->data_fac->color(
"#557b2e"));
1641 $ds[$self_eval_dim] = $c_dimension;
1642 $bars[$self_eval_dim] = $self_eval_bar;
1645 $dataset = $this->data_fac->dataset($ds);
1647 $render_chart =
false;
1648 foreach ($chart_data as
$a) {
1649 if ($render_eval_dim && !isset($a[
"points"][$eval_dim])) {
1650 $a[
"points"][$eval_dim] = null;
1651 $a[
"tooltips"][$eval_dim] = null;
1653 $dataset = $dataset->withPoint($a[
"item_title"], $a[
"points"]);
1654 $dataset = $dataset->withAlternativeInformation($a[
"item_title"], $a[
"tooltips"]);
1655 foreach ($a[
"points"] as $dim => $p) {
1657 if (!is_null($p) && $dim != $target_dim) {
1658 $render_chart =
true;
1663 if ($render_chart) {
1664 $bar_chart = $this->ui_fac->chart()->bar()->horizontal(
1670 $x_axis =
new XAxis();
1671 $x_axis = $x_axis->withMaxValue(count($chart_data[0][
"levels"]) - 1);
1673 $bar_chart = $bar_chart->withCustomXAxis($x_axis);
1674 $bar_chart = $bar_chart->withTitleVisible(
false);
1676 $all_chart_html .= $this->ui_ren->render($bar_chart);
1680 return $all_chart_html;
1688 if ($a_user_id == 0) {
1689 $a_user_id = $ilUser->getId();
1694 foreach ($a_levels as $v) {
1695 $mat_cnt = $this->assigned_material_manager->countAssignedMaterials(
1709 foreach ($a_levels as $k => $v) {
1712 foreach ($this->assigned_material_manager->getAssignedMaterials(
1717 $mat_data = $this->
getMaterialInfo($item->getWorkspaceId(), $a_user_id);
1718 $title = $mat_data[0];
1719 $icon = $this->ui_fac->symbol()->icon()->standard(
1723 $link = $this->ui_fac->link()->standard($title, $mat_data[1]);
1724 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
1728 $item_groups[] = $this->ui_fac->item()->group($v[
"title"], $items);
1731 $mat_panel = $this->ui_fac->panel()->sub(
1732 $lng->
txt(
"skmg_materials"),
1743 $profile_levels = $this->profile_manager->getSkillLevels($a_profile_id);
1745 $a_activated_levels = [];
1747 foreach ($a_levels as $k => $v) {
1748 foreach ($profile_levels as $pl) {
1749 if ($pl->getLevelId() == $v[
"id"] &&
1750 $pl->getBaseSkillId() == $v[
"skill_id"] &&
1751 $a_tref_id == $pl->getTrefId()) {
1752 $a_activated_levels[] = $pl->getLevelId();
1757 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1770 $a_activated_levels = [];
1771 foreach ($a_levels as $k => $v) {
1772 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1773 $a_activated_levels[] = $v[
"id"];
1777 if (empty($a_activated_levels)) {
1782 if ($this->gap_cat_title !=
"") {
1784 } elseif ($this->gap_mode ==
"max_per_type") {
1785 $title = $lng->
txt(
"objs_" . $this->gap_mode_type);
1786 } elseif ($this->gap_mode ==
"max_per_object") {
1790 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1794 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1800 if ($title != $lng->
txt(
"skmg_eval_type_" . $type)) {
1812 if (empty($self_vals)) {
1816 $a_activated_levels = [];
1817 foreach ($a_levels as $k => $v) {
1818 if (isset($self_vals[$v[
"skill_id"]][$a_tref_id]) &&
1819 $self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1820 $a_activated_levels[] = $v[
"id"];
1824 if (empty($a_activated_levels)) {
1828 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1832 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1846 public function getScaleBar(array $a_levels, $a_activated_levels): string
1850 if (!is_array($a_activated_levels)) {
1851 $a_activated_levels = array($a_activated_levels);
1854 foreach ($a_levels as $level) {
1855 $vals[$level[
"title"]] = (in_array($level[
"id"], $a_activated_levels));
1857 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1859 return $this->ui_ren->render($scale_bar);
1862 public function getEvalItem(array $a_levels, array $a_level_entry,
bool $is_latest =
false): string
1867 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1870 $type = Personal\SkillEval::TYPE_APPRAISAL;
1872 if ($a_level_entry[
"self_eval"] == 1) {
1873 $type = Personal\SkillEval::TYPE_SELF_EVAL;
1876 if ($a_level_entry[
"trigger_obj_type"] ==
"tst") {
1877 $type = Personal\SkillEval::TYPE_MEASUREMENT;
1882 if ($a_level_entry[
"trigger_obj_id"] > 0) {
1886 $title = $del_data[
"title"];
1888 $title = ($a_level_entry[
"trigger_title"]) ??
"";
1892 if ($a_level_entry[
"trigger_ref_id"] > 0
1893 && $ilAccess->checkAccess(
"read",
"", $a_level_entry[
"trigger_ref_id"])) {
1894 $title =
"<a href='" . ilLink::_getLink($a_level_entry[
"trigger_ref_id"]) .
"'>" . $title .
"</a>";
1898 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1927 $tpl =
new ilTemplate(
"tpl.skill_entries_latest.html",
true,
true,
"components/ILIAS/Skill");
1929 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1942 $latest_entries_html =
"";
1943 foreach ($latest_entries as $entry) {
1944 $latest_entries_html .= $this->ui_ren->render(
1945 $this->ui_fac->legacy($this->getEvalItem($level_data, $entry,
true))
1949 if (!empty($latest_entries_html)) {
1950 $tpl->
setVariable(
"SKILL_ENTRIES", $latest_entries_html);
1952 if (count($user_entries_filtered) != count($latest_entries)) {
1954 $show_all_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_all"),
"#")
1956 return "$('#$id').on('click', function() {SkillEntries.showNonLatest($id); return false;})";
1958 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_all_button));
1977 $tpl =
new ilTemplate(
"tpl.skill_entries_non_latest.html",
true,
true,
"components/ILIAS/Skill");
1978 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1991 $non_latest_entries_filtered_html =
"";
1992 foreach ($non_latest_entries as $entry) {
1993 $non_latest_entries_filtered_html .= $this->ui_ren->render(
1994 $this->ui_fac->legacy($this->getEvalItem($level_data, $entry,
false))
1998 if (!empty($non_latest_entries_filtered_html)) {
1999 $tpl->
setVariable(
"SKILL_ENTRIES", $non_latest_entries_filtered_html);
2001 $show_latest_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_latest_entries"),
"#")
2003 return "$('#$id').on('click', function() {SkillEntries.hideNonLatest($id); return false;})";
2005 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_latest_button));
2020 $se_date = $this->self_evaluation_manager->getSelfEvaluationDate($user->
getId(), $top_skill_id, $bs[
"tref"], $bs[
"id"]);
2021 $se_rendered = $se_date ==
"";
2022 $filtered_entries = [];
2023 foreach ($entries as $level_entry) {
2032 if ($se_date > $level_entry[
"status_date"] && !$se_rendered) {
2033 $se_rendered =
true;
2035 if ($this->
getFilter()->isInRange($level_entry)) {
2036 $filtered_entries[] = $level_entry;
2040 return $filtered_entries;
2045 if (!empty($entries)) {
2046 $last_entry[] = $entries[0];
2055 if (count($entries) > 1) {
2056 array_shift($entries);
2065 $first_self_added =
false;
2066 $first_measurement_added =
false;
2067 $first_appraisal_added =
false;
2068 $latest_entries = [];
2069 foreach ($entries as $entry) {
2070 if (!$first_self_added && $entry[
"self_eval"] == 1) {
2071 $latest_entries[] = $entry;
2072 $first_self_added =
true;
2075 if (!$first_measurement_added && $entry[
"trigger_obj_type"] ==
"tst") {
2076 $latest_entries[] = $entry;
2077 $first_measurement_added =
true;
2080 if (!$first_appraisal_added && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2081 $latest_entries[] = $entry;
2082 $first_appraisal_added =
true;
2086 return $latest_entries;
2091 $first_self_filtered =
false;
2092 $first_measurement_filtered =
false;
2093 $first_appraisal_filtered =
false;
2094 $non_latest_entries = [];
2095 foreach ($entries as $entry) {
2096 if (!$first_self_filtered && $entry[
"self_eval"] == 1) {
2097 $first_self_filtered =
true;
2100 if (!$first_measurement_filtered && $entry[
"trigger_obj_type"] ==
"tst") {
2101 $first_measurement_filtered =
true;
2104 if (!$first_appraisal_filtered && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2105 $first_appraisal_filtered =
true;
2108 $non_latest_entries[] = $entry;
2111 return $non_latest_entries;
2116 $tpl =
new ilTemplate(
"tpl.skill_entries_header.html",
true,
true,
"components/ILIAS/Skill");
2119 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_self_evaluation"));
2121 $tpl->
setVariable(
"BYLINE", $this->
lng->txt(
"skmg_self_evaluation_byline"));
2125 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_skill_profile_records"));
2134 $tpl =
new ilTemplate(
"tpl.skill_description_category.html",
true,
true,
"components/ILIAS/Skill");
2150 $tpl =
new ilTemplate(
"tpl.skill_description_basic.html",
true,
true,
"components/ILIAS/Skill");
2152 if (!empty($description)) {
2154 $tpl->
setVariable(
"DESCRIPTION_BASIC", $description);
2163 $level_data = $skill->getLevelData();
2164 $tpl =
new ilTemplate(
"tpl.skill_desc.html",
true,
true,
"components/ILIAS/Skill");
2166 $desc_exists =
false;
2167 foreach ($level_data as $l) {
2168 if ($l[
"description"] !=
"") {
2169 $desc_exists =
true;
2174 foreach ($level_data as $l) {
2177 $tpl->
setVariable(
"LEVEL_DESC", nl2br($l[
"description"]));
2189 int $gap_mode_obj_id = 0
2194 if ($gap_mode_obj_id > 0 && !$this->obj_definition->isContainer($gap_mode_obj_type)) {
2199 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2201 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_needs_self_eval"));
2202 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2207 if ($this->resource_manager->isLevelTooLow($a_tref_id, $a_levels, $this->profile_levels, $this->actual_levels)) {
2208 $imp_resources = $this->resource_manager->getSuggestedResources(
2212 $this->profile_levels
2214 $info = $this->ui_fac->item()->standard($lng->
txt(
"skmg_recommended_learning_material_info"));
2215 $item_groups[] = $this->ui_fac->item()->group(
"", [$info]);
2217 $at_least_one_item =
false;
2218 $highlighted_level =
false;
2221 $is_container =
false;
2222 if ($gap_mode_obj_id > 0 && $this->obj_definition->isContainer($gap_mode_obj_type)) {
2223 $is_container =
true;
2224 $sub_objects = $this->tree->getSubTree(
2230 foreach ($imp_resources as $order_level_id =>
$resources) {
2231 $level_id = (
int) substr(strrchr($order_level_id,
'_'), 1);
2233 if ($level_id <= $this->actual_levels[$a_base_skill][$a_tref_id]) {
2236 if ($level_id === $this->resource_manager->determineCurrentTargetLevel($a_levels, $this->profile_levels)) {
2237 $highlighted_level =
true;
2239 $level_title = $this->level_repo->lookupLevelTitle($level_id);
2244 if ($is_container && !in_array(
$ref_id, $sub_objects)) {
2249 $icon = $this->ui_fac->symbol()->icon()->standard(
2253 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2254 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2255 $at_least_one_item =
true;
2257 $item_groups[] = $this->ui_fac->item()->group(
2259 ?
"<strong>" . $level_title .
" (" . $lng->
txt(
"skmg_target_level") .
")</strong>" 2264 if ($at_least_one_item) {
2265 switch ($gap_mode_obj_type) {
2267 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_crs");
2270 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_grp");
2273 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_global");
2276 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2281 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_needs_impr_no_res"));
2282 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2285 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_no_needs_impr_info"));
2286 $sec_panel = $this->ui_fac->panel()->secondary()->legacy($lng->
txt(
"skmg_skill_no_needs_impr"), $sec_panel_content);
2298 $res = $this->resource_manager->getResources($a_base_skill, $a_tref_id);
2301 foreach (
$res as $level) {
2305 foreach ($level as
$r) {
2306 if ($r->getImparting()) {
2310 $icon = $this->ui_fac->symbol()->icon()->standard(
2314 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2315 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2318 $cl = $r->getLevelId();
2326 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2327 $lng->
txt(
"skmg_suggested_resources"),
2338 if (empty($this->user_profiles)) {
2339 $this->
ctrl->redirect($this,
"listSkills");
2346 $this->tpl->setContent($this->ui_ren->render($prof_list));
2356 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"components/ILIAS/Skill");
2358 $this->
tabs->clearTargets();
2359 $this->
tabs->setBackTarget(
2360 $this->
lng->txt(
"back"),
2361 $ilCtrl->getLinkTarget($this,
"listallassignedprofiles")
2365 $main_tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
2368 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
2369 $this->
getFilter()->addToToolbar($filter_toolbar,
true);
2373 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
2377 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
2378 $this->
user->getId(),
2387 $not_all_self_evaluated =
false;
2388 foreach ($skills as $s) {
2389 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2391 $not_all_self_evaluated =
true;
2395 $html .= $this->
getSkillHTML($s->getBaseSkillId(), 0,
true, $s->getTrefId());
2399 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilterAssignedProfiles");
2401 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
2403 $html = $tpl->
get() . $html;
2406 if ($not_all_self_evaluated) {
2407 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
2408 $html = $this->ui_ren->render($box) . $html;
2411 $main_tpl->setContent($html);
setGapAnalysisActualStatusModePerObject(int $a_obj_id, string $a_cat_title="")
Profile SkillProfileCompletionManager $profile_completion_manager
getSkillCategoryDescription(int $skill_id, int $tref_id)
setOfflineMode(string $a_file_path)
getTriggerObjectsFilter()
getProfilesListed(array $profiles, bool $gap_mode=false)
static _lookupTemplateId(int $a_obj_id)
getNonHistoricGapModeView()
ilObjectDefinition $obj_definition
static array static setUseRelativeDates(bool $a_status)
set use relative dates
setGapAnalysisSelfEvalLevels(array $a_val)
setObjectSkills(int $a_obj_id, array $a_skills)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
setTriggerUserFilter(string $trigger_user_filter)
getEvalItem(array $a_levels, array $a_level_entry, bool $is_latest=false)
int $requested_basic_skill_id
getMaterials(array $a_levels, int $a_tref_id=0, int $a_user_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
Personal PersonalSkillManager $personal_manager
hideSkill(int $a_skill_id, int $a_tref_id=0)
touchBlock(string $block)
overwrites ITX::touchBlock.
Table TableManager $table_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Profile SkillProfileManager $profile_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ServerRequestInterface $request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTypeWhiteList(array $a_val)
Set type white list.
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Resource SkillResourcesManager $resource_manager
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
Explorer for selecting a personal skill.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $requested_table_assign_materials_action
int $requested_table_assign_materials_wsp_id
loadLanguageModule(string $a_module)
Load language module.
getMaterialInfo(int $a_wsp_id, int $a_user_id)
Get material file name and goto url.
Filter for personal skills.
static lookupLevelTitle(int $a_id)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
Service SkillPersonalGUIRequest $personal_gui_request
renderSkillHTML(int $a_top_skill_id, int $a_user_id=0, bool $a_edit=false, int $a_tref_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $a_obj_id)
getProfileTargetItem(int $a_profile_id, array $a_levels, int $a_tref_id=0)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
array $gap_self_eval_levels
static getInstance(int $a_id=0)
setHistoryView(bool $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGapAnalysisActualStatusModePerType(string $a_type, string $a_cat_title="")
Builds a Color from either hex- or rgb values.
static _lookupDescription(int $a_obj_id)
getAllEntriesLatestOnly(array $entries)
withOnLoadCode(Closure $binder)
static _lookupObjId(int $ref_id)
static hasSelfEvaluated(int $a_user_id, int $a_skill_id, int $a_tref_id)
getSkillLevelDescription(ilSkillTreeNode $skill)
ilSkillManagementSettings $skmg_settings
getSkillHTML(int $a_top_skill_id, int $a_user_id=0, bool $a_edit=false, int $a_tref_id=0)
Get skill presentation HTML.
Service SkillTreeService $tree_service
assignMaterial()
Assign materials to skill level.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Personal skills GUI class.
setTabs(string $a_activate)
setTriggerObjectsFilter(array $trigger_objects_filter)
Provides fluid interface to RBAC services.
Personal SelfEvaluationManager $self_evaluation_manager
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
getSelfEvalGapItem(array $a_levels, int $a_tref_id=0)
getGapAnalysisSelfEvalLevels()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
getActualGapItem(array $a_levels, int $a_tref_id=0)
array $requested_skill_ids
ilPersonalSkillsFilterGUI $filter
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
renderer()
Get a renderer for UI components.
array $trigger_objects_filter
applyFilterAssignedProfiles()
Apply filter for profiles view.
ilSkillLevelRepository $level_repo
setBackTarget(string $a_title, string $a_target, string $a_frame="")
Explorer for selecting a personal workspace item.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getLevelData(int $a_id=0)
string $trigger_user_filter
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Service SkillInternalManagerService $internal_manager
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
string $requested_list_mode
ilGlobalTemplateInterface $tpl
listAllAssignedProfiles()
array $requested_table_assign_materials_level_ids
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Personal AssignedMaterialManager $assigned_material_manager
getSelfEvaluationForm(int $cur_basic_skill_id)
getNonLatestEntriesForSkillHTML(int $top_skill_id, array $bs, ilSkillTreeNode $skill, ilObjUser $user, int $eval_type, array $level_data)
assignMaterials()
Assign materials to skill levels.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getBasicSkillDescription(string $description)
getFilteredEntriesForSkill(array $entries, int $top_skill_id, array $bs, ilObjUser $user)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
getSuggestedResourcesForProfile(array $a_levels, int $a_base_skill, int $a_tref_id, int $gap_mode_obj_id=0)
getSkillEntriesHeader(int $eval_type)
setObjectSkillProfiles(int $cont_member_role_id)
factory()
Get the factory that crafts UI components.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static get(int $a_object_id)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
getAllSuggestedResources(int $a_base_skill, int $a_tref_id)
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ContainerSkills SkillInternalFactoryService $cont_factory_service
static _lookupType(int $id, bool $reference=false)
int $requested_profile_id
getSelfEvalEntriesWithoutLatest(array $entries)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getLatestEntriesForSkillHTML(int $top_skill_id, array $bs, ilSkillTreeNode $skill, ilObjUser $user, int $eval_type, array $level_data)
ilSkillTreeRepository $tree_repo
getSelfEvalEntriesLatestOnly(array $entries)
getScaleBar(array $a_levels, $a_activated_levels)
getAllEntriesWithoutLatest(array $entries)
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.