19 declare(strict_types=1);
169 $this->
ctrl = $DIC->ctrl();
170 $this->
lng = $DIC->language();
171 $this->
help = $DIC[
"ilHelp"];
172 $this->setting = $DIC[
"ilSetting"];
173 $this->
user = $DIC->user();
174 $this->tpl = $DIC[
"tpl"];
175 $this->
tabs = $DIC->tabs();
176 $this->
toolbar = $DIC->toolbar();
177 $this->
access = $DIC->access();
178 $this->ui_fac = $DIC->ui()->factory();
179 $this->ui_ren = $DIC->ui()->renderer();
180 $this->request = $DIC->http()->request();
181 $this->
ui = $DIC->ui();
182 $this->storage = $DIC->resourceStorage();
183 $this->data_fac = new \ILIAS\Data\Factory();
184 $this->tree = $DIC->repositoryTree();
185 $this->obj_definition = $DIC[
"objDefinition"];
186 $this->personal_gui_request = $DIC->skills()->internal()->gui()->personal_request();
187 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
188 $this->level_repo = $DIC->skills()->internal()->repo()->getLevelRepo();
189 $this->tree_service = $DIC->skills()->tree();
190 $this->internal_manager = $DIC->skills()->internal()->manager();
191 $this->profile_manager = $this->internal_manager->getProfileManager();
192 $this->profile_completion_manager = $this->internal_manager->getProfileCompletionManager();
193 $this->personal_manager = $this->internal_manager->getPersonalSkillManager();
194 $this->assigned_material_manager = $this->internal_manager->getAssignedMaterialManager();
195 $this->self_evaluation_manager = $this->internal_manager->getSelfEvaluationManager();
196 $this->resource_manager = $this->internal_manager->getResourceManager();
197 $this->table_manager = $this->internal_manager->getTableManager();
198 $this->cont_factory_service = $DIC->skills()->internalContainer()->factory();
207 $ilHelp->setScreenIdComponent(
"skill");
209 $ilCtrl->saveParameter($this,
"skill_id");
210 $ilCtrl->saveParameter($this,
"tref_id");
211 $ilCtrl->saveParameter($this,
"profile_id");
212 $ilCtrl->saveParameter($this,
"list_mode");
214 $this->requested_list_mode = $this->personal_gui_request->getListMode();
215 $this->requested_node_id = $this->personal_gui_request->getNodeId();
216 $this->requested_profile_id = $this->personal_gui_request->getProfileId();
217 $this->requested_skill_id = $this->personal_gui_request->getSkillId();
218 $this->requested_skill_ids = $this->personal_gui_request->getSkillIds();
219 $this->requested_basic_skill_id = $this->personal_gui_request->getBasicSkillId();
220 $this->requested_tref_id = $this->personal_gui_request->getTrefId();
221 $this->requested_level_id = $this->personal_gui_request->getLevelId();
222 $this->requested_wsp_ids = $this->personal_gui_request->getWorkspaceIds();
223 $this->requested_table_assign_materials_action = $this->personal_gui_request->getTableAssignMaterialsAction();
224 $this->requested_table_assign_materials_level_ids = $this->personal_gui_request->getTableAssignMaterialsLevelIds();
225 $this->requested_table_assign_materials_wsp_id = $this->personal_gui_request->getTableAssignMaterialsWorkspaceId();
227 $this->user_profiles = $this->profile_manager->getProfilesOfUser($this->
user->getId());
228 $this->cont_profiles = [];
230 $this->use_materials = !
$ilSetting->get(
"disable_personal_workspace");
244 $this->profile_id = $a_val;
257 $this->gap_self_eval_levels = $a_val;
270 $this->history_view = $a_val;
280 return ($this->mode ==
"gap" && !$this->history_view);
306 public function hideSkill(
int $a_skill_id,
int $a_tref_id = 0): void
308 $this->hidden_skills[] = $a_skill_id .
":" . $a_tref_id;
329 $this->obj_id = $a_obj_id;
330 $this->obj_skills = $a_skills;
334 int $cont_member_role_id
336 $this->cont_profiles = $this->profile_manager->getAllProfilesOfRole($cont_member_role_id);
346 $next_class = $ilCtrl->getNextClass($this);
349 $cmd = $ilCtrl->getCmd(
"render");
354 switch ($next_class) {
361 public function setTabs(
string $a_activate): void
367 if (!empty($this->user_profiles)) {
368 $ilCtrl->setParameter($this,
"list_mode", self::LIST_PROFILES);
371 $lng->
txt(
"skmg_assigned_profiles"),
372 $ilCtrl->getLinkTarget($this,
"render")
377 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
380 $lng->
txt(
"skmg_selected_skills"),
381 $ilCtrl->getLinkTarget($this,
"render")
384 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
388 $ilTabs->activateTab($a_activate);
393 $this->offline_mode = $a_file_path;
403 if ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles)) {
418 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"components/ILIAS/Skill");
423 $ilToolbar->addFormButton(
424 $lng->
txt(
"skmg_add_skill"),
427 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
430 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
431 $this->
getFilter()->addToToolbar($filter_toolbar,
false);
433 $skills = $this->personal_manager->getSelectedUserSkills($ilUser->getId());
435 foreach ($skills as $s) {
436 $path = $this->tree_service->getSkillTreePath($s->getSkillNodeId());
439 foreach (
$path as $p) {
444 $html .= $this->
getSkillHTML($s->getSkillNodeId(), 0,
true);
450 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilter");
451 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
452 $html = $tpl->
get() . $html;
454 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_no_skills_selected_info"));
455 $html = $this->ui_ren->render($box);
458 $main_tpl->setContent($html);
464 $this->
ctrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
465 $this->
ctrl->redirect($this,
"listSkills");
474 $this->
ctrl->redirect($this,
"listAssignedProfile");
489 bool $a_edit =
false,
496 "components/ILIAS/Skill",
497 "personal_skill_html",
498 array(
"personal_skills_gui" => $this,
"top_skill_id" => $a_top_skill_id,
"user_id" => $a_user_id,
499 "edit" => $a_edit,
"tref_id" => $a_tref_id)
502 if (!$uip->replaced()) {
503 $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
505 $skill_html = $uip->getHTML($skill_html);
506 $main_tpl->addJavaScript(
"assets/js/SkillEntries.js");
514 bool $a_edit =
false,
523 if ($a_user_id == 0) {
529 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"components/ILIAS/Skill");
531 $vtree = $this->tree_repo->getVirtualTreeForNodeId($a_top_skill_id);
532 $tref_id = $a_tref_id;
533 $skill_id = $a_top_skill_id;
535 $tref_id = $a_top_skill_id;
538 $b_skills = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
540 foreach ($b_skills as $bs) {
541 $bs[
"id"] = (
int) $bs[
"skill_id"];
542 $bs[
"tref"] = (
int) $bs[
"tref_id"];
544 $path = $this->tree_service->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
550 foreach (
$path as $p) {
558 $level_data = $skill->getLevelData();
564 foreach (
$path as $p) {
566 $title .= $sep . $p[
"title"];
568 $description = $p[
"description"];
570 if ($a_top_skill_id == $p[
"child"]) {
575 $title = $lng->
txt(
"skmg_skill_overview");
584 if (!empty($skl_lvl_desc)) {
587 $acc->addItem($lng->
txt(
'skmg_skill_levels'), $skl_lvl_desc);
588 $panel_comps[] = $this->ui_fac->legacy()->content($acc->getHTML());
590 $prof_comp_head_rendered =
false;
591 $has_at_least_one_entry =
false;
594 if (!empty($self_eval_gap_item_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
596 $has_at_least_one_entry =
true;
598 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_gap_item_prof);
618 if (!empty($self_eval_entries_latest)) {
620 $has_at_least_one_entry =
true;
622 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_entries_latest);
623 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_entries_non_latest);
626 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
628 if ($this->
getFilter()->showTargetLevel()) {
630 $prof_comp_head_rendered =
true;
637 if (!empty($actual_gap_item = $this->
getActualGapItem($level_data, $bs[
"tref"]))) {
638 $panel_comps[] = $this->ui_fac->legacy()->content($actual_gap_item);
639 $has_at_least_one_entry =
true;
642 if (!empty($self_eval_gap_item_non_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
643 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_gap_item_non_prof);
644 $has_at_least_one_entry =
true;
667 if (!empty($object_entries_latest) && !$prof_comp_head_rendered) {
670 if (!empty($object_entries_latest)) {
671 $has_at_least_one_entry =
true;
673 $panel_comps[] = $this->ui_fac->legacy()->content($object_entries_latest);
674 $panel_comps[] = $this->ui_fac->legacy()->content($object_entries_non_latest);
694 if (!empty($all_entries_latest) && !$prof_comp_head_rendered) {
697 if (!empty($all_entries_latest)) {
698 $has_at_least_one_entry =
true;
700 $panel_comps[] = $this->ui_fac->legacy()->content($all_entries_latest);
701 $panel_comps[] = $this->ui_fac->legacy()->content($all_entries_non_latest);
705 if (!$has_at_least_one_entry) {
706 $panel_comps[] = $this->ui_fac->legacy()->content(
"<br/>" . $lng->
txt(
"skmg_no_skill_entries"));
711 $sub = $this->ui_fac->panel()->sub($title, $panel_comps);
714 $sub = $sub->withFurtherInformation(
$res);
715 } elseif ($this->
getFilter()->showMaterialsRessources() && $this->
getProfileId() == 0 && !$this->gap_mode_obj_id) {
719 $sub = $sub->withFurtherInformation($sugg);
724 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
725 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
726 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
727 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"list_mode", $this->requested_list_mode);
728 if ($this->use_materials) {
729 $actions[] = $this->ui_fac->button()->shy(
730 $lng->
txt(
'skmg_assign_materials'),
731 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials")
734 $actions[] = $this->ui_fac->button()->shy(
735 $lng->
txt(
'skmg_self_evaluation'),
736 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation")
738 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
741 $sub_panels[] = $sub;
747 $sub_panels[] = $mat;
757 $sub_panels = $this->ui_fac->legacy()->content($des . $this->ui_ren->render($sub_panels));
759 $panel = $this->ui_fac->panel()->standard(
767 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
768 $actions[] = $this->ui_fac->button()->shy(
769 $lng->
txt(
'skmg_remove_skill'),
770 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove")
773 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
776 return $this->ui_ren->render($panel);
788 $obj_id = $ws_tree->lookupObjectId($a_wsp_id);
792 $url = $ws_access->getGotoLink($a_wsp_id, $obj_id);
800 $url .= $obj->getOfflineFilename();
805 $url .= $obj->getOfflineFilename();
810 $url .= $obj->getOfflineFilename();
815 $url .= $obj->getOfflineFilename();
820 $url .= $obj->getOfflineFilename();
825 $url .= $obj->getOfflineFilename();
830 $url .= $file->getFileName();
835 return array($caption,
$url, $obj_id);
846 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
847 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
848 $ilCtrl->redirect($this,
"listSkills");
857 if ($this->requested_skill_id > 0) {
860 if (empty($this->requested_skill_ids)) {
861 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"no_checkbox"),
true);
862 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
863 $ilCtrl->redirect($this,
"listSkills");
866 $cgui->setFormAction($ilCtrl->getFormAction($this));
867 $cgui->setHeaderText($lng->
txt(
"skmg_really_remove_skills"));
868 $cgui->setCancel($lng->
txt(
"cancel"),
"listSkills");
869 $cgui->setConfirm($lng->
txt(
"remove"),
"removeSkills");
871 foreach ($this->requested_skill_ids as $i) {
885 if (!empty($this->requested_skill_ids)) {
886 foreach ($this->requested_skill_ids as $n_id) {
887 $this->personal_manager->removePersonalSkill($ilUser->getId(), $n_id);
891 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
892 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
893 $ilCtrl->redirect($this,
"listSkills");
912 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
914 :
"listAssignedProfile";
917 $ilCtrl->getLinkTarget($this, $cmd)
920 $ilCtrl->saveParameter($this,
"skill_id");
921 $ilCtrl->saveParameter($this,
"basic_skill_id");
922 $ilCtrl->saveParameter($this,
"tref_id");
930 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
937 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
940 foreach ($bs as
$b) {
944 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
945 ? $this->requested_basic_skill_id
948 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
950 if (count($options) > 1) {
953 $si->setValue($cur_basic_skill_id);
954 $ilToolbar->addInputItem($si,
true);
955 $ilToolbar->addFormButton(
960 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
963 $table = $this->table_manager->getAssignMaterialsTable(
964 $this->requested_skill_id,
965 $this->requested_tref_id,
969 $tpl->
setContent($this->ui_ren->render($table));
987 if (!
$ilSetting->get(
"disable_personal_workspace")) {
988 $url =
'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
989 $mbox = $ui->
factory()->messageBox()->info($lng->
txt(
"skmg_ass_materials_from_workspace"))
990 ->withLinks([$ui->
factory()->link()->standard(
991 $lng->
txt(
"personal_resources"),
997 if ($this->requested_table_assign_materials_action ===
"assignMaterials" 998 && !empty($this->requested_table_assign_materials_level_ids)) {
999 $ilCtrl->setParameter($this,
"level_id", $this->requested_table_assign_materials_level_ids[0]);
1001 $ilCtrl->saveParameter($this,
"skill_id");
1002 $ilCtrl->saveParameter($this,
"level_id");
1003 $ilCtrl->saveParameter($this,
"tref_id");
1004 $ilCtrl->saveParameter($this,
"basic_skill_id");
1006 $ilTabs->setBackTarget(
1008 $ilCtrl->getLinkTarget($this,
"assignMaterials")
1013 $exp->
setTypeWhiteList(array(
"blog",
"wsrt",
"wfld",
"file",
"tstv",
"excv"));
1014 $exp->setSelectableTypes(array(
"file",
"tstv",
"excv"));
1015 $exp->setSelectMode(
"wsp_ids",
true);
1016 if ($exp->handleCommand()) {
1021 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"components/ILIAS/Skill");
1022 $mtpl->setVariable(
"EXP", $exp->getHTML());
1027 $lng->
txt(
"select"),
1030 $tb->setFormAction($ilCtrl->getFormAction($this));
1031 $tb->setOpenFormTag(
true);
1032 $tb->setCloseFormTag(
false);
1033 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
1034 $tb->setOpenFormTag(
false);
1035 $tb->setCloseFormTag(
true);
1036 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
1048 if (!empty($this->requested_wsp_ids)) {
1049 foreach ($this->requested_wsp_ids as $w) {
1050 $this->assigned_material_manager->assignMaterial(
1059 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1062 $ilCtrl->saveParameter($this,
"skill_id");
1063 $ilCtrl->saveParameter($this,
"level_id");
1064 $ilCtrl->saveParameter($this,
"tref_id");
1065 $ilCtrl->saveParameter($this,
"basic_skill_id");
1067 $ilCtrl->redirect($this,
"assignMaterials");
1076 if ($this->requested_table_assign_materials_action ===
"removeMaterial" 1077 && !empty($this->requested_table_assign_materials_level_ids)
1078 && $this->requested_table_assign_materials_wsp_id !== 0) {
1079 $this->assigned_material_manager->removeAssignedMaterial(
1082 (
int) $this->requested_table_assign_materials_level_ids[0],
1083 $this->requested_table_assign_materials_wsp_id
1085 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1087 $ilCtrl->redirect($this,
"assignMaterials");
1103 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1105 :
"listAssignedProfile";
1108 $ilCtrl->getLinkTarget($this, $cmd)
1111 $ilCtrl->saveParameter($this,
"skill_id");
1112 $ilCtrl->saveParameter($this,
"basic_skill_id");
1113 $ilCtrl->saveParameter($this,
"tref_id");
1121 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
1128 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
1132 foreach ($bs as
$b) {
1136 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
1137 ? $this->requested_basic_skill_id
1140 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
1142 if (count($options) > 1) {
1145 $si->setValue($cur_basic_skill_id);
1146 $ilToolbar->addInputItem($si,
true);
1147 $ilToolbar->addFormButton(
1148 $lng->
txt(
"select"),
1152 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1156 $tpl->
setContent($this->ui_ren->render($form));
1163 $basic_skill_id = $cur_basic_skill_id;
1165 $self_eval = $this->ui_fac->input()->field()->radio($this->
lng->txt(
"skmg_self_evaluation"))
1166 ->withRequired(
true);
1168 $current_level_id = $this->self_evaluation_manager->getSelfEvaluation(
1169 $this->
user->getId(),
1175 foreach ($skill->getLevelData() as $level) {
1176 $self_eval = $self_eval->withOption((
string) $level[
"id"], $level[
"title"], $level[
"description"]);
1177 if ($current_level_id == $level[
"id"]) {
1178 $self_eval = $self_eval->withValue($level[
"id"]);
1182 $tree_id = $this->tree_repo->getTreeIdForNodeId($basic_skill_id);
1183 $node_manager = $this->internal_manager->getTreeNodeManager($tree_id);
1184 $section_title = $node_manager->getWrittenPath($basic_skill_id);
1185 $section_inputs = [
"self_eval" => $self_eval];
1186 $section = $this->ui_fac->input()->field()->section(
1191 $form_action = $this->
ctrl->getFormAction($this,
"saveSelfEvaluation");
1192 return $this->ui_fac->input()->container()->form()->standard($form_action, [
"section" => $section]);
1201 $ilCtrl->setParameter($this,
"basic_skill_id", $this->requested_basic_skill_id);
1203 $ilCtrl->clearParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id");
1204 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1205 ?
"render" :
"listAssignedProfile";
1207 if ($this->request->getMethod() ===
"POST") {
1208 $form = $form->withRequest($this->request);
1209 $data = $form->getData();
1210 if (isset(
$data[
"section"]) && is_array(
$data[
"section"]) && !empty(
$data[
"section"][
"self_eval"])) {
1211 $this->self_evaluation_manager->saveSelfEvaluation(
1216 (
int)
$data[
"section"][
"self_eval"]
1218 $this->tpl->setOnScreenMessage(
"success", $lng->
txt(
"msg_obj_modified"),
true);
1220 $this->tpl->setContent($this->ui_ren->render($form));
1225 $this->
tabs->clearTargets();
1226 $this->
tabs->setBackTarget(
1228 $ilCtrl->getLinkTarget($this, $cmd)
1234 $ilCtrl->redirect($this, $cmd);
1245 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
1248 $ilCtrl->getLinkTarget($this,
"render")
1250 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
1253 if ($exp->getHasSelectableNodes()) {
1254 if (!$exp->handleCommand()) {
1257 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_select_skill"));
1259 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_no_nodes_selectable"));
1265 $this->
ctrl->redirectByClass(
"ilContSkillPresentationGUI",
"showProfiles");
1270 if (empty($this->cont_profiles)) {
1278 $this->tpl->setContent($html);
1285 $this->
tabs->clearTargets();
1286 $this->
tabs->setBackTarget(
1287 $this->
lng->txt(
"back"),
1288 $this->
ctrl->getLinkTarget($this,
"showProfiles")
1292 $this->tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
1294 $this->tpl->setContent($this->getGapAnalysisHTML());
1304 $this->tpl->setContent($this->getGapAnalysisHTML());
1314 foreach ($profiles as $p) {
1315 $image_id = $p->getImageId();
1317 $identification = $this->storage->manage()->find($image_id);
1318 $src = $this->storage->consume()->src($identification);
1319 $image = $this->ui_fac->image()->responsive($src->getSrc(), $this->
lng->txt(
"skmg_custom_image_alt"));
1321 $image = $this->ui_fac->image()->responsive(
1322 "./assets/images/logo/ilias_logo_72x72.png",
1327 $this->
ctrl->setParameter($this,
"profile_id", $p->getId());
1328 $link = $this->ui_fac->link()->standard(
1330 $this->
ctrl->getLinkTarget($this, $gap_mode ?
"listProfileForGap" :
"listAssignedProfile")
1332 $this->
ctrl->setParameter($this,
"profile_id",
"");
1334 $chart_value = $this->profile_completion_manager->getProfileProgress($this->
user->getId(), $p->getId());
1335 $prof_item = $this->ui_fac->item()->standard($link)
1336 ->withDescription($p->getDescription())
1337 ->withLeadImage($image)
1338 ->withProgress($this->ui_fac->chart()->progressMeter()->standard(100, $chart_value));
1340 $prof_items[] = $prof_item;
1343 $prof_list = $this->ui_fac->panel()->listing()->standard(
"", array(
1344 $this->ui_fac->item()->group(
"", $prof_items)
1352 if (!empty($this->cont_profiles)) {
1353 $link = $this->ui_fac->link()->standard(
1354 $this->
lng->txt(
"skmg_open_all_assigned_profiles"),
1355 $this->
ctrl->getLinkTargetByClass([
"ilDashboardGUI",
"ilAchievementsGUI",
"ilPersonalSkillsGUI"])
1357 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info"))->withLinks([$link]);
1359 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info_empty"));
1362 return $this->ui_ren->render($box);
1367 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_records_info_empty"));
1369 return $this->ui_ren->render($box);
1374 $this->gap_mode =
"max_per_type";
1375 $this->gap_mode_type = $a_type;
1376 $this->gap_cat_title = $a_cat_title;
1377 $this->mode =
"gap";
1382 $this->gap_mode =
"max_per_object";
1383 $this->gap_mode_obj_id = $a_obj_id;
1384 $this->gap_cat_title = $a_cat_title;
1385 $this->mode =
"gap";
1388 public function getGapAnalysisHTML(
int $a_user_id = 0, ?array $a_skills =
null):
string 1395 if ($a_skills ==
null) {
1397 $a_skills[] = array(
1398 "base_skill_id" => $s->getBaseSkillId(),
1399 "tref_id" => $s->getTrefId()
1406 if ($a_user_id == 0) {
1414 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
1418 $vtree = $this->tree_service->getGlobalVirtualSkillTree();
1419 $a_skills = $vtree->getOrderedNodeset($a_skills,
"base_skill_id",
"tref_id");
1421 foreach ($a_skills as $s) {
1423 $skills[] = $this->cont_factory_service->containerSkill()->skill(
1424 (
int) $s[
"base_skill_id"],
1432 $this->actual_levels = $this->profile_completion_manager->getLastLevelPerObjectAndTriggerUser(
1435 $this->gap_mode_obj_id,
1439 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
1443 $this->gap_mode_type,
1444 $this->gap_mode_obj_id
1446 $this->next_level_fuls = $this->profile_completion_manager->getActualNextLevelFulfilments(
1450 $this->gap_mode_type,
1451 $this->gap_mode_obj_id
1457 $not_all_self_evaluated =
false;
1459 foreach ($skills as $s) {
1460 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
1462 $not_all_self_evaluated =
true;
1465 $path = $this->tree_service->getSkillTreePath($s->getBaseSkillId());
1468 foreach (
$path as $p) {
1477 if ($not_all_self_evaluated) {
1478 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
1479 $html = $this->ui_ren->render($box) . $html;
1483 $all_chart_html = $this->getBarChartHTML($bc_skills);
1485 if (!empty($all_chart_html)) {
1486 $pan = $this->ui_fac->panel()->standard(
1487 $lng->
txt(
"skmg_bar_charts"),
1488 $this->ui_fac->legacy()->content($all_chart_html)
1490 $all_chart_html = $this->ui_ren->render($pan);
1495 return $all_chart_html . $html;
1501 protected function getBarChartHTML(array $skills):
string 1506 $target_dim = $lng->
txt(
"skmg_target_level");
1507 $eval_dim = $lng->
txt(
"skmg_eval_type_1");
1508 if ($this->gap_cat_title !=
"") {
1510 } elseif ($this->gap_mode ==
"max_per_type") {
1511 $eval_dim = $lng->
txt(
"objs_" . $this->gap_mode_type);
1512 } elseif ($this->gap_mode ==
"max_per_object") {
1515 $self_eval_dim = $lng->
txt(
"skmg_self_evaluation");
1517 $incl_self_eval =
false;
1520 $incl_self_eval =
true;
1527 $all_chart_data = [];
1528 $render_eval_dim =
false;
1529 foreach ($skills as $l) {
1533 if (empty($levels)) {
1540 $labels = [0 =>
""];
1541 foreach ($levels as $lv) {
1544 $labels[] = $lv[
"title"];
1546 if ($l->getLevelId() == $lv[
"id"]) {
1547 $points[$target_dim] = [$cnt - 0.01, $cnt];
1548 $tooltips[$target_dim] = $lv[
"title"];
1550 $points[$target_dim] = $points[$target_dim] ??
null;
1551 $tooltips[$target_dim] = $tooltips[$target_dim] ??
null;
1554 if ($this->actual_levels[$l->getBaseSkillId()][$l->getTrefId()] == $lv[
"id"]) {
1555 $perc = $this->next_level_fuls[$l->getBaseSkillId()][$l->getTrefId()] ?? 0.0;
1556 $points[$eval_dim] = $cnt + $perc;
1557 $tooltips[$eval_dim] =
null;
1559 $tooltips[$eval_dim] = $lv[
"title"] .
" + " . $perc * 100 .
"%";
1561 $render_eval_dim =
true;
1563 $points[$eval_dim] = $points[$eval_dim] ??
null;
1564 $tooltips[$eval_dim] = $tooltips[$eval_dim] ??
null;
1565 if (!is_null($points[$eval_dim])) {
1566 $render_eval_dim =
true;
1569 if ($incl_self_eval) {
1570 if (($self_vals[$l->getBaseSkillId()][$l->getTrefId()] ?? 0) == $lv[
"id"]) {
1571 $points[$self_eval_dim] = $cnt;
1572 $tooltips[$self_eval_dim] =
null;
1574 $points[$self_eval_dim] = $points[$self_eval_dim] ??
null;
1575 $tooltips[$self_eval_dim] = $tooltips[$self_eval_dim] ??
null;
1581 if (!$render_eval_dim) {
1582 unset($points[$eval_dim]);
1583 unset($tooltips[$eval_dim]);
1590 if (!empty($tmp_labels) && $tmp_labels !== $labels) {
1594 $tmp_labels = $labels;
1597 $l->getBaseSkillId(),
1600 $all_chart_data[$chart_counter][$bar_counter][
"levels"] = $labels;
1601 $all_chart_data[$chart_counter][$bar_counter][
"points"] = $points;
1602 $all_chart_data[$chart_counter][$bar_counter][
"tooltips"] = $tooltips;
1607 $all_chart_html =
"";
1608 foreach ($all_chart_data as $chart_data) {
1609 $c_dimension = $this->data_fac->dimension()->cardinal($chart_data[0][
"levels"]);
1610 $r_dimension = $this->data_fac->dimension()->range($c_dimension);
1618 $target_bar = $target_bar->withRelativeWidth(1.1);
1619 $target_bar = $target_bar->withColor($this->data_fac->color(
"#333333"));
1620 $ds[$target_dim] = $r_dimension;
1621 $bars[$target_dim] = $target_bar;
1624 if ($render_eval_dim) {
1626 $eval_bar = $eval_bar->withRelativeWidth(0.5);
1627 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#307C88"));
1629 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#d38000"));
1631 $ds[$eval_dim] = $c_dimension;
1632 $bars[$eval_dim] = $eval_bar;
1635 if ($incl_self_eval) {
1637 $self_eval_bar = $self_eval_bar->withRelativeWidth(0.5);
1638 $self_eval_bar = $self_eval_bar->withColor($this->data_fac->color(
"#557b2e"));
1639 $ds[$self_eval_dim] = $c_dimension;
1640 $bars[$self_eval_dim] = $self_eval_bar;
1643 $dataset = $this->data_fac->dataset($ds);
1645 $render_chart =
false;
1646 foreach ($chart_data as
$a) {
1647 if ($render_eval_dim && !isset($a[
"points"][$eval_dim])) {
1648 $a[
"points"][$eval_dim] =
null;
1649 $a[
"tooltips"][$eval_dim] =
null;
1651 $dataset = $dataset->withPoint($a[
"item_title"], $a[
"points"]);
1652 $dataset = $dataset->withAlternativeInformation($a[
"item_title"], $a[
"tooltips"]);
1653 foreach ($a[
"points"] as $dim => $p) {
1655 if (!is_null($p) && $dim != $target_dim) {
1656 $render_chart =
true;
1661 if ($render_chart) {
1662 $bar_chart = $this->ui_fac->chart()->bar()->horizontal(
1668 $x_axis =
new XAxis();
1669 $x_axis = $x_axis->withMaxValue(count($chart_data[0][
"levels"]) - 1);
1671 $bar_chart = $bar_chart->withCustomXAxis($x_axis);
1672 $bar_chart = $bar_chart->withTitleVisible(
false);
1674 $all_chart_html .= $this->ui_ren->render($bar_chart);
1678 return $all_chart_html;
1686 if ($a_user_id == 0) {
1687 $a_user_id = $ilUser->getId();
1692 foreach ($a_levels as $v) {
1693 $mat_cnt = $this->assigned_material_manager->countAssignedMaterials(
1707 foreach ($a_levels as $k => $v) {
1710 foreach ($this->assigned_material_manager->getAssignedMaterials(
1715 $mat_data = $this->
getMaterialInfo($item->getWorkspaceId(), $a_user_id);
1716 $title = $mat_data[0];
1717 $icon = $this->ui_fac->symbol()->icon()->standard(
1721 $link = $this->ui_fac->link()->standard($title, $mat_data[1]);
1722 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
1726 $item_groups[] = $this->ui_fac->item()->group($v[
"title"], $items);
1729 $mat_panel = $this->ui_fac->panel()->sub(
1730 $lng->
txt(
"skmg_materials"),
1741 $profile_levels = $this->profile_manager->getSkillLevels($a_profile_id);
1743 $a_activated_levels = [];
1745 foreach ($a_levels as $k => $v) {
1746 foreach ($profile_levels as $pl) {
1747 if ($pl->getLevelId() == $v[
"id"] &&
1748 $pl->getBaseSkillId() == $v[
"skill_id"] &&
1749 $a_tref_id == $pl->getTrefId()) {
1750 $a_activated_levels[] = $pl->getLevelId();
1755 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1768 $a_activated_levels = [];
1769 foreach ($a_levels as $k => $v) {
1770 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1771 $a_activated_levels[] = $v[
"id"];
1775 if (empty($a_activated_levels)) {
1780 if ($this->gap_cat_title !=
"") {
1782 } elseif ($this->gap_mode ==
"max_per_type") {
1783 $title = $lng->
txt(
"objs_" . $this->gap_mode_type);
1784 } elseif ($this->gap_mode ==
"max_per_object") {
1788 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1792 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1798 if ($title != $lng->
txt(
"skmg_eval_type_" . $type)) {
1810 if (empty($self_vals)) {
1814 $a_activated_levels = [];
1815 foreach ($a_levels as $k => $v) {
1816 if (isset($self_vals[$v[
"skill_id"]][$a_tref_id]) &&
1817 $self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1818 $a_activated_levels[] = $v[
"id"];
1822 if (empty($a_activated_levels)) {
1826 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1830 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1844 public function getScaleBar(array $a_levels, $a_activated_levels): string
1848 if (!is_array($a_activated_levels)) {
1849 $a_activated_levels = array($a_activated_levels);
1852 foreach ($a_levels as $level) {
1853 $vals[$level[
"title"]] = (in_array($level[
"id"], $a_activated_levels));
1855 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1857 return $this->ui_ren->render($scale_bar);
1860 public function getEvalItem(array $a_levels, array $a_level_entry,
bool $is_latest =
false): string
1865 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1868 $type = Personal\SkillEval::TYPE_APPRAISAL;
1870 if ($a_level_entry[
"self_eval"] == 1) {
1871 $type = Personal\SkillEval::TYPE_SELF_EVAL;
1874 if ($a_level_entry[
"trigger_obj_type"] ==
"tst") {
1875 $type = Personal\SkillEval::TYPE_MEASUREMENT;
1880 if ($a_level_entry[
"trigger_obj_id"] > 0) {
1884 $title = $del_data[
"title"];
1886 $title = ($a_level_entry[
"trigger_title"]) ??
"";
1890 if ($a_level_entry[
"trigger_ref_id"] > 0
1891 && $ilAccess->checkAccess(
"read",
"", $a_level_entry[
"trigger_ref_id"])) {
1892 $title =
"<a href='" . ilLink::_getLink($a_level_entry[
"trigger_ref_id"]) .
"'>" . $title .
"</a>";
1896 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1925 $tpl =
new ilTemplate(
"tpl.skill_entries_latest.html",
true,
true,
"components/ILIAS/Skill");
1927 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1940 $latest_entries_html =
"";
1941 foreach ($latest_entries as $entry) {
1942 $latest_entries_html .= $this->ui_ren->render(
1943 $this->ui_fac->legacy()->content($this->
getEvalItem($level_data, $entry,
true))
1947 if (!empty($latest_entries_html)) {
1948 $tpl->
setVariable(
"SKILL_ENTRIES", $latest_entries_html);
1950 if (count($user_entries_filtered) != count($latest_entries)) {
1952 $show_all_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_all"),
"#")
1954 return "$('#$id').on('click', function() {SkillEntries.showNonLatest($id); return false;})";
1956 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_all_button));
1975 $tpl =
new ilTemplate(
"tpl.skill_entries_non_latest.html",
true,
true,
"components/ILIAS/Skill");
1976 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1989 $non_latest_entries_filtered_html =
"";
1990 foreach ($non_latest_entries as $entry) {
1991 $non_latest_entries_filtered_html .= $this->ui_ren->render(
1992 $this->ui_fac->legacy()->content($this->
getEvalItem($level_data, $entry,
false))
1996 if (!empty($non_latest_entries_filtered_html)) {
1997 $tpl->
setVariable(
"SKILL_ENTRIES", $non_latest_entries_filtered_html);
1999 $show_latest_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_latest_entries"),
"#")
2001 return "$('#$id').on('click', function() {SkillEntries.hideNonLatest($id); return false;})";
2003 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_latest_button));
2018 $se_date = $this->self_evaluation_manager->getSelfEvaluationDate($user->
getId(), $top_skill_id, $bs[
"tref"], $bs[
"id"]);
2019 $se_rendered = $se_date ==
"";
2020 $filtered_entries = [];
2021 foreach ($entries as $level_entry) {
2030 if ($se_date > $level_entry[
"status_date"] && !$se_rendered) {
2031 $se_rendered =
true;
2033 if ($this->
getFilter()->isInRange($level_entry)) {
2034 $filtered_entries[] = $level_entry;
2038 return $filtered_entries;
2043 if (!empty($entries)) {
2044 $last_entry[] = $entries[0];
2053 if (count($entries) > 1) {
2054 array_shift($entries);
2063 $first_self_added =
false;
2064 $first_measurement_added =
false;
2065 $first_appraisal_added =
false;
2066 $latest_entries = [];
2067 foreach ($entries as $entry) {
2068 if (!$first_self_added && $entry[
"self_eval"] == 1) {
2069 $latest_entries[] = $entry;
2070 $first_self_added =
true;
2073 if (!$first_measurement_added && $entry[
"trigger_obj_type"] ==
"tst") {
2074 $latest_entries[] = $entry;
2075 $first_measurement_added =
true;
2078 if (!$first_appraisal_added && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2079 $latest_entries[] = $entry;
2080 $first_appraisal_added =
true;
2084 return $latest_entries;
2089 $first_self_filtered =
false;
2090 $first_measurement_filtered =
false;
2091 $first_appraisal_filtered =
false;
2092 $non_latest_entries = [];
2093 foreach ($entries as $entry) {
2094 if (!$first_self_filtered && $entry[
"self_eval"] == 1) {
2095 $first_self_filtered =
true;
2098 if (!$first_measurement_filtered && $entry[
"trigger_obj_type"] ==
"tst") {
2099 $first_measurement_filtered =
true;
2102 if (!$first_appraisal_filtered && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2103 $first_appraisal_filtered =
true;
2106 $non_latest_entries[] = $entry;
2109 return $non_latest_entries;
2114 $tpl =
new ilTemplate(
"tpl.skill_entries_header.html",
true,
true,
"components/ILIAS/Skill");
2117 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_self_evaluation"));
2119 $tpl->
setVariable(
"BYLINE", $this->
lng->txt(
"skmg_self_evaluation_byline"));
2123 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_skill_profile_records"));
2132 $tpl =
new ilTemplate(
"tpl.skill_description_category.html",
true,
true,
"components/ILIAS/Skill");
2148 $tpl =
new ilTemplate(
"tpl.skill_description_basic.html",
true,
true,
"components/ILIAS/Skill");
2150 if (!empty($description)) {
2152 $tpl->
setVariable(
"DESCRIPTION_BASIC", $description);
2161 $level_data = $skill->getLevelData();
2162 $tpl =
new ilTemplate(
"tpl.skill_desc.html",
true,
true,
"components/ILIAS/Skill");
2164 $desc_exists =
false;
2165 foreach ($level_data as $l) {
2166 if ($l[
"description"] !=
"") {
2167 $desc_exists =
true;
2172 foreach ($level_data as $l) {
2175 $tpl->
setVariable(
"LEVEL_DESC", nl2br($l[
"description"]));
2187 int $gap_mode_obj_id = 0
2192 if ($gap_mode_obj_id > 0 && !$this->obj_definition->isContainer($gap_mode_obj_type)) {
2197 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2199 $sec_panel_content = $this->ui_fac->legacy()->content($lng->
txt(
"skmg_skill_needs_self_eval"));
2200 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2205 if ($this->resource_manager->isLevelTooLow($a_tref_id, $a_levels, $this->profile_levels, $this->actual_levels)) {
2206 $imp_resources = $this->resource_manager->getSuggestedResources(
2210 $this->profile_levels
2212 $info = $this->ui_fac->item()->standard($lng->
txt(
"skmg_recommended_learning_material_info"));
2213 $item_groups[] = $this->ui_fac->item()->group(
"", [
$info]);
2215 $at_least_one_item =
false;
2216 $highlighted_level =
false;
2219 $is_container =
false;
2220 if ($gap_mode_obj_id > 0 && $this->obj_definition->isContainer($gap_mode_obj_type)) {
2221 $is_container =
true;
2222 $sub_objects = $this->tree->getSubTree(
2228 foreach ($imp_resources as $order_level_id =>
$resources) {
2229 $level_id = (
int) substr(strrchr($order_level_id,
'_'), 1);
2231 if ($level_id <= $this->actual_levels[$a_base_skill][$a_tref_id]) {
2234 if ($level_id === $this->resource_manager->determineCurrentTargetLevel($a_levels, $this->profile_levels)) {
2235 $highlighted_level =
true;
2237 $level_title = $this->level_repo->lookupLevelTitle($level_id);
2242 if ($is_container && !in_array(
$ref_id, $sub_objects)) {
2247 $icon = $this->ui_fac->symbol()->icon()->standard(
2251 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2252 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2253 $at_least_one_item =
true;
2255 $item_groups[] = $this->ui_fac->item()->group(
2257 ?
"<strong>" . $level_title .
" (" . $lng->
txt(
"skmg_target_level") .
")</strong>" 2262 if ($at_least_one_item) {
2263 switch ($gap_mode_obj_type) {
2265 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_crs");
2268 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_grp");
2271 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_global");
2274 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2279 $sec_panel_content = $this->ui_fac->legacy()->content($lng->
txt(
"skmg_skill_needs_impr_no_res"));
2280 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2283 $sec_panel_content = $this->ui_fac->legacy()->content($lng->
txt(
"skmg_skill_no_needs_impr_info"));
2284 $sec_panel = $this->ui_fac->panel()->secondary()->legacy($lng->
txt(
"skmg_skill_no_needs_impr"), $sec_panel_content);
2296 $res = $this->resource_manager->getResources($a_base_skill, $a_tref_id);
2299 foreach (
$res as $level) {
2303 foreach ($level as
$r) {
2304 if ($r->getImparting()) {
2308 $icon = $this->ui_fac->symbol()->icon()->standard(
2312 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2313 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2316 $cl = $r->getLevelId();
2324 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2325 $lng->
txt(
"skmg_suggested_resources"),
2336 if (empty($this->user_profiles)) {
2337 $this->
ctrl->redirect($this,
"listSkills");
2344 $this->tpl->setContent($this->ui_ren->render($prof_list));
2354 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"components/ILIAS/Skill");
2356 $this->
tabs->clearTargets();
2357 $this->
tabs->setBackTarget(
2358 $this->
lng->txt(
"back"),
2359 $ilCtrl->getLinkTarget($this,
"listallassignedprofiles")
2363 $main_tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
2366 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
2367 $this->
getFilter()->addToToolbar($filter_toolbar,
true);
2371 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
2375 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
2376 $this->
user->getId(),
2385 $not_all_self_evaluated =
false;
2386 foreach ($skills as $s) {
2387 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2389 $not_all_self_evaluated =
true;
2393 $html .= $this->
getSkillHTML($s->getBaseSkillId(), 0,
true, $s->getTrefId());
2397 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilterAssignedProfiles");
2399 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
2401 $html = $tpl->
get() . $html;
2404 if ($not_all_self_evaluated) {
2405 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
2406 $html = $this->ui_ren->render($box) . $html;
2409 $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
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setGapAnalysisSelfEvalLevels(array $a_val)
setObjectSkills(int $a_obj_id, array $a_skills)
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
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
touchBlock(string $block)
overwrites ITX::touchBlock.
hideSkill(int $a_skill_id, int $a_tref_id=0)
Table TableManager $table_manager
Skill management settings.
Profile SkillProfileManager $profile_manager
Interface Observer Contains several chained tasks and infos about them.
Interface ilSkillLevelRepository.
ServerRequestInterface $request
setTypeWhiteList(array $a_val)
Set type white list.
static _getAllReferences(int $id)
get all reference ids for object ID
Resource SkillResourcesManager $resource_manager
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
Explorer for selecting a personal skill.
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...
string $requested_table_assign_materials_action
setContent(string $a_html)
Sets content for standard template.
int $requested_table_assign_materials_wsp_id
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
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)
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)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static _lookupType(int $a_obj_id)
getProfileTargetItem(int $a_profile_id, array $a_levels, int $a_tref_id=0)
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...
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
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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.
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)
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
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
Service SkillInternalManagerService $internal_manager
string $requested_list_mode
ilGlobalTemplateInterface $tpl
listAllAssignedProfiles()
array $requested_table_assign_materials_level_ids
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
A node in the skill tree.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
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.
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)
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...
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.