19 declare(strict_types=1);
172 $this->
ctrl = $DIC->ctrl();
173 $this->
lng = $DIC->language();
174 $this->
help = $DIC[
"ilHelp"];
175 $this->setting = $DIC[
"ilSetting"];
176 $this->
user = $DIC->user();
177 $this->tpl = $DIC[
"tpl"];
178 $this->
tabs = $DIC->tabs();
179 $this->
toolbar = $DIC->toolbar();
180 $this->
access = $DIC->access();
181 $this->ui_fac = $DIC->ui()->factory();
182 $this->ui_ren = $DIC->ui()->renderer();
183 $this->request = $DIC->http()->request();
184 $this->
ui = $DIC->ui();
185 $this->storage = $DIC->resourceStorage();
186 $this->data_fac = new \ILIAS\Data\Factory();
187 $this->tree = $DIC->repositoryTree();
188 $this->obj_definition = $DIC[
"objDefinition"];
189 $this->personal_gui_request = $DIC->skills()->internal()->gui()->personal_request();
190 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
191 $this->level_repo = $DIC->skills()->internal()->repo()->getLevelRepo();
192 $this->tree_service = $DIC->skills()->tree();
193 $this->internal_manager = $DIC->skills()->internal()->manager();
194 $this->profile_manager = $this->internal_manager->getProfileManager();
195 $this->profile_completion_manager = $this->internal_manager->getProfileCompletionManager();
196 $this->personal_manager = $this->internal_manager->getPersonalSkillManager();
197 $this->assigned_material_manager = $this->internal_manager->getAssignedMaterialManager();
198 $this->self_evaluation_manager = $this->internal_manager->getSelfEvaluationManager();
199 $this->resource_manager = $this->internal_manager->getResourceManager();
200 $this->table_manager = $this->internal_manager->getTableManager();
201 $this->cont_factory_service = $DIC->skills()->internalContainer()->factory();
210 $ilHelp->setScreenIdComponent(
"skill");
212 $ilCtrl->saveParameter($this,
"skill_id");
213 $ilCtrl->saveParameter($this,
"tref_id");
214 $ilCtrl->saveParameter($this,
"profile_id");
215 $ilCtrl->saveParameter($this,
"list_mode");
217 $this->requested_list_mode = $this->personal_gui_request->getListMode();
218 $this->requested_node_id = $this->personal_gui_request->getNodeId();
219 $this->requested_profile_id = $this->personal_gui_request->getProfileId();
220 $this->requested_skill_id = $this->personal_gui_request->getSkillId();
221 $this->requested_skill_ids = $this->personal_gui_request->getSkillIds();
222 $this->requested_basic_skill_id = $this->personal_gui_request->getBasicSkillId();
223 $this->requested_tref_id = $this->personal_gui_request->getTrefId();
224 $this->requested_level_id = $this->personal_gui_request->getLevelId();
225 $this->requested_wsp_ids = $this->personal_gui_request->getWorkspaceIds();
226 $this->requested_table_assign_materials_action = $this->personal_gui_request->getTableAssignMaterialsAction();
227 $this->requested_table_assign_materials_level_ids = $this->personal_gui_request->getTableAssignMaterialsLevelIds();
228 $this->requested_table_assign_materials_wsp_id = $this->personal_gui_request->getTableAssignMaterialsWorkspaceId();
230 $this->user_profiles = $this->profile_manager->getProfilesOfUser($this->
user->getId());
231 $this->cont_profiles = [];
233 $this->use_materials = !
$ilSetting->get(
"disable_personal_workspace");
247 $this->profile_id = $a_val;
260 $this->gap_self_eval_levels = $a_val;
273 $this->history_view = $a_val;
283 return ($this->mode ==
"gap" && !$this->history_view);
312 public function hideSkill(
int $a_skill_id,
int $a_tref_id = 0): void
314 $this->hidden_skills[] = $a_skill_id .
":" . $a_tref_id;
335 $this->obj_id = $a_obj_id;
336 $this->obj_skills = $a_skills;
340 int $cont_member_role_id
342 $this->cont_profiles = $this->profile_manager->getAllProfilesOfRole($cont_member_role_id);
352 $next_class = $ilCtrl->getNextClass($this);
355 $cmd = $ilCtrl->getCmd(
"render");
360 switch ($next_class) {
367 public function setTabs(
string $a_activate): void
373 if (!empty($this->user_profiles)) {
374 $ilCtrl->setParameter($this,
"list_mode", self::LIST_PROFILES);
377 $lng->
txt(
"skmg_assigned_profiles"),
378 $ilCtrl->getLinkTarget($this,
"render")
383 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
386 $lng->
txt(
"skmg_selected_skills"),
387 $ilCtrl->getLinkTarget($this,
"render")
390 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
394 $ilTabs->activateTab($a_activate);
399 $this->offline_mode = $a_file_path;
409 if ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles)) {
424 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"components/ILIAS/Skill");
429 $ilToolbar->addFormButton(
430 $lng->
txt(
"skmg_add_skill"),
433 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
436 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
437 $this->
getFilter()->addToToolbar($filter_toolbar,
false);
439 $skills = $this->personal_manager->getSelectedUserSkills($ilUser->getId());
441 foreach ($skills as $s) {
442 $path = $this->tree_service->getSkillTreePath($s->getSkillNodeId());
445 foreach (
$path as $p) {
450 $html .= $this->
getSkillHTML($s->getSkillNodeId(), 0,
true);
456 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilter");
457 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
458 $html = $tpl->
get() . $html;
460 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_no_skills_selected_info"));
461 $html = $this->ui_ren->render($box);
464 $main_tpl->setContent($html);
470 $this->
ctrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
471 $this->
ctrl->redirect($this,
"listSkills");
480 $this->
ctrl->redirect($this,
"listAssignedProfile");
495 bool $a_edit =
false,
502 "components/ILIAS/Skill",
503 "personal_skill_html",
504 array(
"personal_skills_gui" => $this,
"top_skill_id" => $a_top_skill_id,
"user_id" => $a_user_id,
505 "edit" => $a_edit,
"tref_id" => $a_tref_id)
508 if (!$uip->replaced()) {
509 $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
511 $skill_html = $uip->getHTML($skill_html);
512 $main_tpl->addJavaScript(
"assets/js/SkillEntries.js");
520 bool $a_edit =
false,
529 if ($a_user_id == 0) {
535 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"components/ILIAS/Skill");
537 $vtree = $this->tree_repo->getVirtualTreeForNodeId($a_top_skill_id);
538 $tref_id = $a_tref_id;
539 $skill_id = $a_top_skill_id;
541 $tref_id = $a_top_skill_id;
544 $b_skills = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
546 foreach ($b_skills as $bs) {
547 $bs[
"id"] = (
int) $bs[
"skill_id"];
548 $bs[
"tref"] = (
int) $bs[
"tref_id"];
550 $path = $this->tree_service->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
556 foreach (
$path as $p) {
564 $level_data = $skill->getLevelData();
570 foreach (
$path as $p) {
572 $title .= $sep . $p[
"title"];
574 $description = $p[
"description"];
576 if ($a_top_skill_id == $p[
"child"]) {
581 $title = $lng->
txt(
"skmg_skill_overview");
590 if (!empty($skl_lvl_desc)) {
593 $acc->addItem($lng->
txt(
'skmg_skill_levels'), $skl_lvl_desc);
594 $panel_comps[] = $this->ui_fac->legacy()->content($acc->getHTML());
597 $prof_comp_head_rendered =
false;
598 $has_at_least_one_entry =
false;
601 if (!empty($self_eval_gap_item_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
603 $has_at_least_one_entry =
true;
605 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_gap_item_prof);
625 if (!empty($self_eval_entries_latest)) {
627 $has_at_least_one_entry =
true;
629 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_entries_latest);
630 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_entries_non_latest);
633 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
635 if ($this->
getFilter()->showTargetLevel()) {
637 $prof_comp_head_rendered =
true;
644 if (!empty($actual_gap_item = $this->
getActualGapItem($level_data, $bs[
"tref"]))) {
645 $panel_comps[] = $this->ui_fac->legacy()->content($actual_gap_item);
646 $has_at_least_one_entry =
true;
649 if (!empty($self_eval_gap_item_non_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
650 $panel_comps[] = $this->ui_fac->legacy()->content($self_eval_gap_item_non_prof);
651 $has_at_least_one_entry =
true;
674 if (!empty($object_entries_latest) && !$prof_comp_head_rendered) {
677 if (!empty($object_entries_latest)) {
678 $has_at_least_one_entry =
true;
680 $panel_comps[] = $this->ui_fac->legacy()->content($object_entries_latest);
681 $panel_comps[] = $this->ui_fac->legacy()->content($object_entries_non_latest);
701 if (!empty($all_entries_latest) && !$prof_comp_head_rendered) {
704 if (!empty($all_entries_latest)) {
705 $has_at_least_one_entry =
true;
707 $panel_comps[] = $this->ui_fac->legacy()->content($all_entries_latest);
708 $panel_comps[] = $this->ui_fac->legacy()->content($all_entries_non_latest);
712 if (!$has_at_least_one_entry) {
713 $panel_comps[] = $this->ui_fac->legacy()->content(
"<br/>" . $lng->
txt(
"skmg_no_skill_entries"));
718 $sub = $this->ui_fac->panel()->sub($title, $panel_comps);
721 $sub = $sub->withFurtherInformation(
$res);
722 } elseif ($this->
getFilter()->showMaterialsRessources() && $this->
getProfileId() == 0 && !$this->gap_mode_obj_id) {
726 $sub = $sub->withFurtherInformation($sugg);
731 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
732 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
733 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
734 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"list_mode", $this->requested_list_mode);
735 if ($this->use_materials) {
736 $actions[] = $this->ui_fac->button()->shy(
737 $lng->
txt(
'skmg_assign_materials'),
738 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials")
741 $actions[] = $this->ui_fac->button()->shy(
742 $lng->
txt(
'skmg_self_evaluation'),
743 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation")
745 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
748 $sub_panels[] = $sub;
754 $sub_panels[] = $mat;
764 $sub_panels = $this->ui_fac->legacy()->content($des . $this->ui_ren->render($sub_panels));
766 $panel = $this->ui_fac->panel()->standard(
774 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
775 $actions[] = $this->ui_fac->button()->shy(
776 $lng->
txt(
'skmg_remove_skill'),
777 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove")
780 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
783 return $this->ui_ren->render($panel);
795 $obj_id = $ws_tree->lookupObjectId($a_wsp_id);
799 $url = $ws_access->getGotoLink($a_wsp_id, $obj_id);
807 $url .= $obj->getOfflineFilename();
812 $url .= $obj->getOfflineFilename();
817 $url .= $obj->getOfflineFilename();
822 $url .= $obj->getOfflineFilename();
827 $url .= $obj->getOfflineFilename();
832 $url .= $obj->getOfflineFilename();
837 $url .= $file->getFileName();
842 return array($caption,
$url, $obj_id);
853 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
854 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
855 $ilCtrl->redirect($this,
"listSkills");
864 if ($this->requested_skill_id > 0) {
867 if (empty($this->requested_skill_ids)) {
868 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"no_checkbox"),
true);
869 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
870 $ilCtrl->redirect($this,
"listSkills");
873 $cgui->setFormAction($ilCtrl->getFormAction($this));
874 $cgui->setHeaderText($lng->
txt(
"skmg_really_remove_skills"));
875 $cgui->setCancel($lng->
txt(
"cancel"),
"listSkills");
876 $cgui->setConfirm($lng->
txt(
"remove"),
"removeSkills");
878 foreach ($this->requested_skill_ids as $i) {
892 if (!empty($this->requested_skill_ids)) {
893 foreach ($this->requested_skill_ids as $n_id) {
894 $this->personal_manager->removePersonalSkill($ilUser->getId(), $n_id);
898 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
899 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
900 $ilCtrl->redirect($this,
"listSkills");
919 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
921 :
"listAssignedProfile";
924 $ilCtrl->getLinkTarget($this, $cmd)
927 $ilCtrl->saveParameter($this,
"skill_id");
928 $ilCtrl->saveParameter($this,
"basic_skill_id");
929 $ilCtrl->saveParameter($this,
"tref_id");
937 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
944 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
947 foreach ($bs as
$b) {
951 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
952 ? $this->requested_basic_skill_id
955 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
957 if (count($options) > 1) {
960 $si->setValue($cur_basic_skill_id);
961 $ilToolbar->addInputItem($si,
true);
962 $ilToolbar->addFormButton(
967 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
970 $table = $this->table_manager->getAssignMaterialsTable(
971 $this->requested_skill_id,
972 $this->requested_tref_id,
976 $tpl->
setContent($this->ui_ren->render($table));
994 if (!
$ilSetting->get(
"disable_personal_workspace")) {
995 $url =
'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
996 $mbox = $ui->
factory()->messageBox()->info($lng->
txt(
"skmg_ass_materials_from_workspace"))
997 ->withLinks([$ui->
factory()->link()->standard(
998 $lng->
txt(
"personal_resources"),
1004 if ($this->requested_table_assign_materials_action ===
"assignMaterials" 1005 && !empty($this->requested_table_assign_materials_level_ids)) {
1006 $ilCtrl->setParameter($this,
"level_id", $this->requested_table_assign_materials_level_ids[0]);
1008 $ilCtrl->saveParameter($this,
"skill_id");
1009 $ilCtrl->saveParameter($this,
"level_id");
1010 $ilCtrl->saveParameter($this,
"tref_id");
1011 $ilCtrl->saveParameter($this,
"basic_skill_id");
1013 $ilTabs->setBackTarget(
1015 $ilCtrl->getLinkTarget($this,
"assignMaterials")
1020 $exp->
setTypeWhiteList(array(
"blog",
"wsrt",
"wfld",
"file",
"tstv",
"excv"));
1021 $exp->setSelectableTypes(array(
"file",
"tstv",
"excv"));
1022 $exp->setSelectMode(
"wsp_ids",
true);
1023 if ($exp->handleCommand()) {
1028 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"components/ILIAS/Skill");
1029 $mtpl->setVariable(
"EXP", $exp->getHTML());
1034 $lng->
txt(
"select"),
1037 $tb->setFormAction($ilCtrl->getFormAction($this));
1038 $tb->setOpenFormTag(
true);
1039 $tb->setCloseFormTag(
false);
1040 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
1041 $tb->setOpenFormTag(
false);
1042 $tb->setCloseFormTag(
true);
1043 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
1055 if (!empty($this->requested_wsp_ids)) {
1056 foreach ($this->requested_wsp_ids as $w) {
1057 $this->assigned_material_manager->assignMaterial(
1066 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1069 $ilCtrl->saveParameter($this,
"skill_id");
1070 $ilCtrl->saveParameter($this,
"level_id");
1071 $ilCtrl->saveParameter($this,
"tref_id");
1072 $ilCtrl->saveParameter($this,
"basic_skill_id");
1074 $ilCtrl->redirect($this,
"assignMaterials");
1083 if ($this->requested_table_assign_materials_action ===
"removeMaterial" 1084 && !empty($this->requested_table_assign_materials_level_ids)
1085 && $this->requested_table_assign_materials_wsp_id !== 0) {
1086 $this->assigned_material_manager->removeAssignedMaterial(
1089 (
int) $this->requested_table_assign_materials_level_ids[0],
1090 $this->requested_table_assign_materials_wsp_id
1092 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1094 $ilCtrl->redirect($this,
"assignMaterials");
1110 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1112 :
"listAssignedProfile";
1115 $ilCtrl->getLinkTarget($this, $cmd)
1118 $ilCtrl->saveParameter($this,
"skill_id");
1119 $ilCtrl->saveParameter($this,
"basic_skill_id");
1120 $ilCtrl->saveParameter($this,
"tref_id");
1128 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
1135 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
1139 foreach ($bs as
$b) {
1143 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
1144 ? $this->requested_basic_skill_id
1147 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
1149 if (count($options) > 1) {
1152 $si->setValue($cur_basic_skill_id);
1153 $ilToolbar->addInputItem($si,
true);
1154 $ilToolbar->addFormButton(
1155 $lng->
txt(
"select"),
1159 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1163 $tpl->
setContent($this->ui_ren->render($form));
1170 $basic_skill_id = $cur_basic_skill_id;
1172 $self_eval = $this->ui_fac->input()->field()->radio($this->
lng->txt(
"skmg_self_evaluation"))
1173 ->withRequired(
true);
1175 $current_level_id = $this->self_evaluation_manager->getSelfEvaluation(
1176 $this->
user->getId(),
1182 foreach ($skill->getLevelData() as $level) {
1183 $self_eval = $self_eval->withOption((
string) $level[
"id"], $level[
"title"], $level[
"description"]);
1184 if ($current_level_id == $level[
"id"]) {
1185 $self_eval = $self_eval->withValue($level[
"id"]);
1189 $tree_id = $this->tree_repo->getTreeIdForNodeId($basic_skill_id);
1190 $node_manager = $this->internal_manager->getTreeNodeManager($tree_id);
1191 $section_title = $node_manager->getWrittenPath($basic_skill_id);
1192 $section_inputs = [
"self_eval" => $self_eval];
1193 $section = $this->ui_fac->input()->field()->section(
1198 $form_action = $this->
ctrl->getFormAction($this,
"saveSelfEvaluation");
1199 return $this->ui_fac->input()->container()->form()->standard($form_action, [
"section" => $section]);
1208 $ilCtrl->setParameter($this,
"basic_skill_id", $this->requested_basic_skill_id);
1210 $ilCtrl->clearParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id");
1211 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1212 ?
"render" :
"listAssignedProfile";
1214 if ($this->request->getMethod() ===
"POST") {
1215 $form = $form->withRequest($this->request);
1216 $data = $form->getData();
1217 if (isset(
$data[
"section"]) && is_array(
$data[
"section"]) && !empty(
$data[
"section"][
"self_eval"])) {
1218 $this->self_evaluation_manager->saveSelfEvaluation(
1223 (
int)
$data[
"section"][
"self_eval"]
1225 $this->tpl->setOnScreenMessage(
"success", $lng->
txt(
"msg_obj_modified"),
true);
1227 $this->tpl->setContent($this->ui_ren->render($form));
1232 $this->
tabs->clearTargets();
1233 $this->
tabs->setBackTarget(
1235 $ilCtrl->getLinkTarget($this, $cmd)
1241 $ilCtrl->redirect($this, $cmd);
1252 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
1255 $ilCtrl->getLinkTarget($this,
"render")
1257 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
1260 if ($exp->getHasSelectableNodes()) {
1261 if (!$exp->handleCommand()) {
1264 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_select_skill"));
1266 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_no_nodes_selectable"));
1272 $this->
ctrl->redirectByClass(
"ilContSkillPresentationGUI",
"showProfiles");
1277 if (empty($this->cont_profiles)) {
1285 $this->tpl->setContent($html);
1292 $this->
tabs->clearTargets();
1293 $this->
tabs->setBackTarget(
1294 $this->
lng->txt(
"back"),
1295 $this->
ctrl->getLinkTarget($this,
"showProfiles")
1299 $this->tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
1301 $this->tpl->setContent($this->getGapAnalysisHTML());
1311 $this->tpl->setContent($this->getGapAnalysisHTML());
1321 foreach ($profiles as $p) {
1322 $image_id = $p->getImageId();
1324 $identification = $this->storage->manage()->find($image_id);
1325 $src = $this->storage->consume()->src($identification);
1326 $image = $this->ui_fac->image()->responsive($src->getSrc(), $this->
lng->txt(
"skmg_custom_image_alt"));
1328 $image = $this->ui_fac->image()->responsive(
1329 "./assets/images/logo/ilias_logo_72x72.png",
1334 $this->
ctrl->setParameter($this,
"profile_id", $p->getId());
1335 $link = $this->ui_fac->link()->standard(
1337 $this->
ctrl->getLinkTarget($this, $gap_mode ?
"listProfileForGap" :
"listAssignedProfile")
1339 $this->
ctrl->setParameter($this,
"profile_id",
"");
1341 $chart_value = $this->profile_completion_manager->getProfileProgress($this->
user->getId(), $p->getId());
1342 $prof_item = $this->ui_fac->item()->standard($link)
1343 ->withDescription($p->getDescription())
1344 ->withLeadImage($image)
1345 ->withProgress($this->ui_fac->chart()->progressMeter()->standard(100, $chart_value));
1347 $prof_items[] = $prof_item;
1350 $prof_list = $this->ui_fac->panel()->listing()->standard(
"", array(
1351 $this->ui_fac->item()->group(
"", $prof_items)
1359 if (!empty($this->cont_profiles)) {
1360 $link = $this->ui_fac->link()->standard(
1361 $this->
lng->txt(
"skmg_open_all_assigned_profiles"),
1362 $this->
ctrl->getLinkTargetByClass([
"ilDashboardGUI",
"ilAchievementsGUI",
"ilPersonalSkillsGUI"])
1364 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info"))->withLinks([$link]);
1366 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info_empty"));
1369 return $this->ui_ren->render($box);
1374 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_records_info_empty"));
1376 return $this->ui_ren->render($box);
1381 $this->gap_mode =
"max_per_type";
1382 $this->gap_mode_type = $a_type;
1383 $this->gap_cat_title = $a_cat_title;
1384 $this->mode =
"gap";
1389 $this->gap_mode =
"max_per_object";
1390 $this->gap_mode_obj_id = $a_obj_id;
1391 $this->gap_cat_title = $a_cat_title;
1392 $this->mode =
"gap";
1395 public function getGapAnalysisHTML(
int $a_user_id = 0, ?array $a_skills =
null):
string 1403 if ($a_skills ==
null) {
1405 $a_skills[] = array(
1406 "base_skill_id" => $s->getBaseSkillId(),
1407 "tref_id" => $s->getTrefId()
1414 if ($a_user_id == 0) {
1422 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
1426 $vtree = $this->tree_service->getGlobalVirtualSkillTree();
1427 $a_skills = $vtree->getOrderedNodeset($a_skills,
"base_skill_id",
"tref_id");
1429 foreach ($a_skills as $s) {
1431 $skills[] = $this->cont_factory_service->containerSkill()->skill(
1432 (
int) $s[
"base_skill_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
1456 $not_all_self_evaluated =
false;
1458 foreach ($skills as $s) {
1459 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
1461 $not_all_self_evaluated =
true;
1464 $path = $this->tree_service->getSkillTreePath($s->getBaseSkillId());
1467 foreach (
$path as $p) {
1476 if ($not_all_self_evaluated) {
1477 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
1478 $html = $this->ui_ren->render($box) . $html;
1482 $all_chart_html = $this->getBarChartHTML($bc_skills);
1484 if (!empty($all_chart_html)) {
1485 $pan = $this->ui_fac->panel()->standard(
1486 $lng->
txt(
"skmg_bar_charts"),
1487 $this->ui_fac->legacy()->content($all_chart_html)
1489 $all_chart_html = $this->ui_ren->render($pan);
1494 return $all_chart_html . $html;
1500 protected function getBarChartHTML(array $skills):
string 1505 $target_dim = $lng->
txt(
"skmg_target_level");
1506 $eval_dim = $lng->
txt(
"skmg_eval_type_1");
1507 if ($this->gap_cat_title !=
"") {
1509 } elseif ($this->gap_mode ==
"max_per_type") {
1510 $eval_dim = $lng->
txt(
"objs_" . $this->gap_mode_type);
1511 } elseif ($this->gap_mode ==
"max_per_object") {
1514 $self_eval_dim = $lng->
txt(
"skmg_self_evaluation");
1516 $incl_self_eval =
false;
1519 $incl_self_eval =
true;
1526 $all_chart_data = [];
1527 $render_eval_dim =
false;
1528 foreach ($skills as $l) {
1532 if (empty($levels)) {
1539 $labels = [0 =>
""];
1540 foreach ($levels as $lv) {
1543 $labels[] = $lv[
"title"];
1545 if ($l->getLevelId() == $lv[
"id"]) {
1546 $points[$target_dim] = [$cnt - 0.01, $cnt];
1547 $tooltips[$target_dim] = $lv[
"title"];
1549 $points[$target_dim] = $points[$target_dim] ??
null;
1550 $tooltips[$target_dim] = $tooltips[$target_dim] ??
null;
1553 if ($this->actual_levels[$l->getBaseSkillId()][$l->getTrefId()] == $lv[
"id"]) {
1554 $perc = $this->next_level_fuls[$l->getBaseSkillId()][$l->getTrefId()];
1555 $points[$eval_dim] = $cnt + $perc;
1556 $tooltips[$eval_dim] =
null;
1558 $tooltips[$eval_dim] = $lv[
"title"] .
" + " . $perc * 100 .
"%";
1560 $render_eval_dim =
true;
1562 $points[$eval_dim] = $points[$eval_dim] ??
null;
1563 $tooltips[$eval_dim] = $tooltips[$eval_dim] ??
null;
1564 if (!is_null($points[$eval_dim])) {
1565 $render_eval_dim =
true;
1568 if ($incl_self_eval) {
1569 if (($self_vals[$l->getBaseSkillId()][$l->getTrefId()] ?? 0) == $lv[
"id"]) {
1570 $points[$self_eval_dim] = $cnt;
1571 $tooltips[$self_eval_dim] =
null;
1573 $points[$self_eval_dim] = $points[$self_eval_dim] ??
null;
1574 $tooltips[$self_eval_dim] = $tooltips[$self_eval_dim] ??
null;
1580 if (!$render_eval_dim) {
1581 unset($points[$eval_dim]);
1582 unset($tooltips[$eval_dim]);
1589 if (!empty($tmp_labels) && $tmp_labels !== $labels) {
1593 $tmp_labels = $labels;
1596 $l->getBaseSkillId(),
1599 $all_chart_data[$chart_counter][$bar_counter][
"levels"] = $labels;
1600 $all_chart_data[$chart_counter][$bar_counter][
"points"] = $points;
1601 $all_chart_data[$chart_counter][$bar_counter][
"tooltips"] = $tooltips;
1606 $all_chart_html =
"";
1607 foreach ($all_chart_data as $chart_data) {
1608 $c_dimension = $this->data_fac->dimension()->cardinal($chart_data[0][
"levels"]);
1609 $r_dimension = $this->data_fac->dimension()->range($c_dimension);
1617 $target_bar = $target_bar->withRelativeWidth(1.1);
1618 $target_bar = $target_bar->withColor($this->data_fac->color(
"#333333"));
1619 $ds[$target_dim] = $r_dimension;
1620 $bars[$target_dim] = $target_bar;
1623 if ($render_eval_dim) {
1625 $eval_bar = $eval_bar->withRelativeWidth(0.5);
1626 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#307C88"));
1628 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#d38000"));
1630 $ds[$eval_dim] = $c_dimension;
1631 $bars[$eval_dim] = $eval_bar;
1634 if ($incl_self_eval) {
1636 $self_eval_bar = $self_eval_bar->withRelativeWidth(0.5);
1637 $self_eval_bar = $self_eval_bar->withColor($this->data_fac->color(
"#557b2e"));
1638 $ds[$self_eval_dim] = $c_dimension;
1639 $bars[$self_eval_dim] = $self_eval_bar;
1642 $dataset = $this->data_fac->dataset($ds);
1644 $render_chart =
false;
1645 foreach ($chart_data as
$a) {
1646 if ($render_eval_dim && !isset($a[
"points"][$eval_dim])) {
1647 $a[
"points"][$eval_dim] =
null;
1648 $a[
"tooltips"][$eval_dim] =
null;
1650 $dataset = $dataset->withPoint($a[
"item_title"], $a[
"points"]);
1651 $dataset = $dataset->withAlternativeInformation($a[
"item_title"], $a[
"tooltips"]);
1652 foreach ($a[
"points"] as $dim => $p) {
1654 if (!is_null($p) && $dim != $target_dim) {
1655 $render_chart =
true;
1660 if ($render_chart) {
1661 $bar_chart = $this->ui_fac->chart()->bar()->horizontal(
1667 $x_axis =
new XAxis();
1668 $x_axis = $x_axis->withMaxValue(count($chart_data[0][
"levels"]) - 1);
1670 $bar_chart = $bar_chart->withCustomXAxis($x_axis);
1671 $bar_chart = $bar_chart->withTitleVisible(
false);
1673 $all_chart_html .= $this->ui_ren->render($bar_chart);
1677 return $all_chart_html;
1685 if ($a_user_id == 0) {
1686 $a_user_id = $ilUser->getId();
1691 foreach ($a_levels as $v) {
1692 $mat_cnt = $this->assigned_material_manager->countAssignedMaterials(
1706 foreach ($a_levels as $k => $v) {
1709 foreach ($this->assigned_material_manager->getAssignedMaterials(
1714 $mat_data = $this->
getMaterialInfo($item->getWorkspaceId(), $a_user_id);
1715 $title = $mat_data[0];
1716 $icon = $this->ui_fac->symbol()->icon()->standard(
1720 $link = $this->ui_fac->link()->standard($title, $mat_data[1]);
1721 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
1725 $item_groups[] = $this->ui_fac->item()->group($v[
"title"], $items);
1728 $mat_panel = $this->ui_fac->panel()->sub(
1729 $lng->
txt(
"skmg_materials"),
1740 $profile_levels = $this->profile_manager->getSkillLevels($a_profile_id);
1742 $a_activated_levels = [];
1744 foreach ($a_levels as $k => $v) {
1745 foreach ($profile_levels as $pl) {
1746 if ($pl->getLevelId() == $v[
"id"] &&
1747 $pl->getBaseSkillId() == $v[
"skill_id"] &&
1748 $a_tref_id == $pl->getTrefId()) {
1749 $a_activated_levels[] = $pl->getLevelId();
1754 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1767 $a_activated_levels = [];
1768 foreach ($a_levels as $k => $v) {
1769 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1770 $a_activated_levels[] = $v[
"id"];
1774 if (empty($a_activated_levels)) {
1779 if ($this->gap_cat_title !=
"") {
1781 } elseif ($this->gap_mode ==
"max_per_type") {
1782 $title = $lng->
txt(
"objs_" . $this->gap_mode_type);
1783 } elseif ($this->gap_mode ==
"max_per_object") {
1787 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1791 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1797 if ($title != $lng->
txt(
"skmg_eval_type_" . $type)) {
1809 if (empty($self_vals)) {
1813 $a_activated_levels = [];
1814 foreach ($a_levels as $k => $v) {
1815 if (isset($self_vals[$v[
"skill_id"]][$a_tref_id]) &&
1816 $self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1817 $a_activated_levels[] = $v[
"id"];
1821 if (empty($a_activated_levels)) {
1825 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1829 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1843 public function getScaleBar(array $a_levels, $a_activated_levels): string
1847 if (!is_array($a_activated_levels)) {
1848 $a_activated_levels = array($a_activated_levels);
1851 foreach ($a_levels as $level) {
1852 $vals[$level[
"title"]] = (in_array($level[
"id"], $a_activated_levels));
1854 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1856 return $this->ui_ren->render($scale_bar);
1859 public function getEvalItem(array $a_levels, array $a_level_entry,
bool $is_latest =
false): string
1864 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"components/ILIAS/Skill");
1867 $type = Personal\SkillEval::TYPE_APPRAISAL;
1869 if ($a_level_entry[
"self_eval"] == 1) {
1870 $type = Personal\SkillEval::TYPE_SELF_EVAL;
1873 if ($a_level_entry[
"trigger_obj_type"] ==
"tst") {
1874 $type = Personal\SkillEval::TYPE_MEASUREMENT;
1879 if ($a_level_entry[
"trigger_obj_id"] > 0) {
1883 $title = $del_data[
"title"];
1885 $title = ($a_level_entry[
"trigger_title"]) ??
"";
1889 if ($a_level_entry[
"trigger_ref_id"] > 0
1890 && $ilAccess->checkAccess(
"read",
"", $a_level_entry[
"trigger_ref_id"])) {
1891 $title =
"<a href='" . ilLink::_getLink($a_level_entry[
"trigger_ref_id"]) .
"'>" . $title .
"</a>";
1895 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1924 $tpl =
new ilTemplate(
"tpl.skill_entries_latest.html",
true,
true,
"components/ILIAS/Skill");
1926 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1939 $latest_entries_html =
"";
1940 foreach ($latest_entries as $entry) {
1941 $latest_entries_html .= $this->ui_ren->render(
1942 $this->ui_fac->legacy()->content($this->
getEvalItem($level_data, $entry,
true))
1946 if (!empty($latest_entries_html)) {
1947 $tpl->
setVariable(
"SKILL_ENTRIES", $latest_entries_html);
1949 if (count($user_entries_filtered) != count($latest_entries)) {
1951 $show_all_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_all"),
"#")
1953 return "$('#$id').on('click', function() {SkillEntries.showNonLatest($id); return false;})";
1955 $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");
1977 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1990 $non_latest_entries_filtered_html =
"";
1991 foreach ($non_latest_entries as $entry) {
1992 $non_latest_entries_filtered_html .= $this->ui_ren->render(
1993 $this->ui_fac->legacy()->content($this->
getEvalItem($level_data, $entry,
false))
1997 if (!empty($non_latest_entries_filtered_html)) {
1998 $tpl->
setVariable(
"SKILL_ENTRIES", $non_latest_entries_filtered_html);
2000 $show_latest_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_latest_entries"),
"#")
2002 return "$('#$id').on('click', function() {SkillEntries.hideNonLatest($id); return false;})";
2004 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_latest_button));
2019 $se_date = $this->self_evaluation_manager->getSelfEvaluationDate($user->
getId(), $top_skill_id, $bs[
"tref"], $bs[
"id"]);
2020 $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()->content($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()->content($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()->content($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
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setGapAnalysisSelfEvalLevels(array $a_val)
setObjectSkills(int $a_obj_id, array $a_skills)
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
array $trigger_user_filter
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
setTriggerUserFilter(array $trigger_user_filter)
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)
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.