3 declare(strict_types=1);
174 $this->
ctrl = $DIC->ctrl();
175 $this->
lng = $DIC->language();
176 $this->
help = $DIC[
"ilHelp"];
177 $this->setting = $DIC[
"ilSetting"];
178 $this->
user = $DIC->user();
179 $this->tpl = $DIC[
"tpl"];
180 $this->
tabs = $DIC->tabs();
181 $this->
toolbar = $DIC->toolbar();
182 $this->
access = $DIC->access();
183 $this->ui_fac = $DIC->ui()->factory();
184 $this->ui_ren = $DIC->ui()->renderer();
185 $this->request = $DIC->http()->request();
186 $this->
ui = $DIC->ui();
187 $this->storage = $DIC->resourceStorage();
188 $this->data_fac = new \ILIAS\Data\Factory();
189 $this->tree = $DIC->repositoryTree();
190 $this->obj_definition = $DIC[
"objDefinition"];
191 $this->personal_gui_request = $DIC->skills()->internal()->gui()->personal_request();
192 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
193 $this->level_repo = $DIC->skills()->internal()->repo()->getLevelRepo();
194 $this->tree_service = $DIC->skills()->tree();
195 $this->internal_manager = $DIC->skills()->internal()->manager();
196 $this->profile_manager = $this->internal_manager->getProfileManager();
197 $this->profile_completion_manager = $this->internal_manager->getProfileCompletionManager();
198 $this->personal_manager = $this->internal_manager->getPersonalSkillManager();
199 $this->assigned_material_manager = $this->internal_manager->getAssignedMaterialManager();
200 $this->self_evaluation_manager = $this->internal_manager->getSelfEvaluationManager();
201 $this->resource_manager = $this->internal_manager->getResourceManager();
202 $this->table_manager = $this->internal_manager->getTableManager();
203 $this->cont_factory_service = $DIC->skills()->internalContainer()->factory();
212 $ilHelp->setScreenIdComponent(
"skill");
214 $ilCtrl->saveParameter($this,
"skill_id");
215 $ilCtrl->saveParameter($this,
"tref_id");
216 $ilCtrl->saveParameter($this,
"profile_id");
217 $ilCtrl->saveParameter($this,
"list_mode");
219 $this->requested_list_mode = $this->personal_gui_request->getListMode();
220 $this->requested_node_id = $this->personal_gui_request->getNodeId();
221 $this->requested_profile_id = $this->personal_gui_request->getProfileId();
222 $this->requested_skill_id = $this->personal_gui_request->getSkillId();
223 $this->requested_skill_ids = $this->personal_gui_request->getSkillIds();
224 $this->requested_basic_skill_id = $this->personal_gui_request->getBasicSkillId();
225 $this->requested_tref_id = $this->personal_gui_request->getTrefId();
226 $this->requested_level_id = $this->personal_gui_request->getLevelId();
227 $this->requested_wsp_ids = $this->personal_gui_request->getWorkspaceIds();
228 $this->requested_table_assign_materials_action = $this->personal_gui_request->getTableAssignMaterialsAction();
229 $this->requested_table_assign_materials_level_ids = $this->personal_gui_request->getTableAssignMaterialsLevelIds();
230 $this->requested_table_assign_materials_wsp_id = $this->personal_gui_request->getTableAssignMaterialsWorkspaceId();
232 $this->user_profiles = $this->profile_manager->getProfilesOfUser($this->
user->getId());
233 $this->cont_profiles = [];
235 $this->use_materials = !
$ilSetting->get(
"disable_personal_workspace");
249 $this->profile_id = $a_val;
262 $this->gap_self_eval_levels = $a_val;
275 $this->history_view = $a_val;
285 return ($this->mode ==
"gap" && !$this->history_view);
300 $this->intro_text = $a_val;
324 public function hideSkill(
int $a_skill_id,
int $a_tref_id = 0): void
326 $this->hidden_skills[] = $a_skill_id .
":" . $a_tref_id;
347 $this->obj_id = $a_obj_id;
348 $this->obj_skills = $a_skills;
352 int $cont_member_role_id
354 $this->cont_profiles = $this->profile_manager->getAllProfilesOfRole($cont_member_role_id);
364 $next_class = $ilCtrl->getNextClass($this);
367 $cmd = $ilCtrl->getCmd(
"render");
372 switch ($next_class) {
379 public function setTabs(
string $a_activate): void
385 if (!empty($this->user_profiles)) {
386 $ilCtrl->setParameter($this,
"list_mode", self::LIST_PROFILES);
389 $lng->
txt(
"skmg_assigned_profiles"),
390 $ilCtrl->getLinkTarget($this,
"render")
395 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
398 $lng->
txt(
"skmg_selected_skills"),
399 $ilCtrl->getLinkTarget($this,
"render")
402 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
406 $ilTabs->activateTab($a_activate);
411 $this->offline_mode = $a_file_path;
421 if ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles)) {
436 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"Services/Skill");
441 $ilToolbar->addFormButton(
442 $lng->
txt(
"skmg_add_skill"),
445 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
448 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
449 $this->
getFilter()->addToToolbar($filter_toolbar,
false);
451 $skills = $this->personal_manager->getSelectedUserSkills($ilUser->getId());
453 foreach ($skills as $s) {
454 $path = $this->tree_service->getSkillTreePath($s->getSkillNodeId());
457 foreach (
$path as $p) {
462 $html .= $this->
getSkillHTML($s->getSkillNodeId(), 0,
true);
468 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilter");
469 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
470 $html = $tpl->
get() . $html;
472 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_no_skills_selected_info"));
473 $html = $this->ui_ren->render($box);
476 $main_tpl->setContent($html);
482 $this->
ctrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
483 $this->
ctrl->redirect($this,
"listSkills");
492 $this->
ctrl->redirect($this,
"listAssignedProfile");
507 bool $a_edit =
false,
515 "personal_skill_html",
516 array(
"personal_skills_gui" => $this,
"top_skill_id" => $a_top_skill_id,
"user_id" => $a_user_id,
517 "edit" => $a_edit,
"tref_id" => $a_tref_id)
520 if (!$uip->replaced()) {
521 $skill_html = $this->
renderSkillHTML($a_top_skill_id, $a_user_id, $a_edit, $a_tref_id);
523 $skill_html = $uip->getHTML($skill_html);
524 $main_tpl->addJavaScript(
"./Services/Skill/js/SkillEntries.js");
532 bool $a_edit =
false,
541 if ($a_user_id == 0) {
547 $tpl =
new ilTemplate(
"tpl.skill_pres.html",
true,
true,
"Services/Skill");
549 $vtree = $this->tree_repo->getVirtualTreeForNodeId($a_top_skill_id);
550 $tref_id = $a_tref_id;
551 $skill_id = $a_top_skill_id;
553 $tref_id = $a_top_skill_id;
556 $b_skills = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
558 foreach ($b_skills as $bs) {
559 $bs[
"id"] = (
int) $bs[
"skill_id"];
560 $bs[
"tref"] = (
int) $bs[
"tref_id"];
562 $path = $this->tree_service->getSkillTreePath($bs[
"id"], $bs[
"tref"]);
568 foreach (
$path as $p) {
576 $level_data = $skill->getLevelData();
582 foreach (
$path as $p) {
584 $title .= $sep . $p[
"title"];
586 $description = $p[
"description"];
588 if ($a_top_skill_id == $p[
"child"]) {
593 $title = $lng->
txt(
"skmg_skill_overview");
602 if (!empty($skl_lvl_desc)) {
605 $acc->addItem($lng->
txt(
'skmg_skill_levels'), $skl_lvl_desc);
606 $panel_comps[] = $this->ui_fac->legacy($acc->getHTML());
609 $prof_comp_head_rendered =
false;
610 $has_at_least_one_entry =
false;
613 if (!empty($self_eval_gap_item_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
615 $has_at_least_one_entry =
true;
617 $panel_comps[] = $this->ui_fac->legacy($self_eval_gap_item_prof);
637 if (!empty($self_eval_entries_latest)) {
639 $has_at_least_one_entry =
true;
641 $panel_comps[] = $this->ui_fac->legacy($self_eval_entries_latest);
642 $panel_comps[] = $this->ui_fac->legacy($self_eval_entries_non_latest);
645 if (!$this->skmg_settings->getHideProfileBeforeSelfEval() ||
647 if ($this->
getFilter()->showTargetLevel()) {
649 $prof_comp_head_rendered =
true;
656 if (!empty($actual_gap_item = $this->
getActualGapItem($level_data, $bs[
"tref"]))) {
657 $panel_comps[] = $this->ui_fac->legacy($actual_gap_item);
658 $has_at_least_one_entry =
true;
661 if (!empty($self_eval_gap_item_non_prof = $this->
getSelfEvalGapItem($level_data, $bs[
"tref"]))) {
662 $panel_comps[] = $this->ui_fac->legacy($self_eval_gap_item_non_prof);
663 $has_at_least_one_entry =
true;
686 if (!empty($object_entries_latest) && !$prof_comp_head_rendered) {
689 if (!empty($object_entries_latest)) {
690 $has_at_least_one_entry =
true;
692 $panel_comps[] = $this->ui_fac->legacy($object_entries_latest);
693 $panel_comps[] = $this->ui_fac->legacy($object_entries_non_latest);
713 if (!empty($all_entries_latest) && !$prof_comp_head_rendered) {
716 if (!empty($all_entries_latest)) {
717 $has_at_least_one_entry =
true;
719 $panel_comps[] = $this->ui_fac->legacy($all_entries_latest);
720 $panel_comps[] = $this->ui_fac->legacy($all_entries_non_latest);
724 if (!$has_at_least_one_entry) {
725 $panel_comps[] = $this->ui_fac->legacy(
"<br/>" . $lng->
txt(
"skmg_no_skill_entries"));
730 $sub = $this->ui_fac->panel()->sub($title, $panel_comps);
733 $sub = $sub->withFurtherInformation(
$res);
734 } elseif ($this->
getFilter()->showMaterialsRessources() && $this->
getProfileId() == 0 && !$this->gap_mode_obj_id) {
738 $sub = $sub->withFurtherInformation($sugg);
743 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
744 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"tref_id", $bs[
"tref"]);
745 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id", $bs[
"id"]);
746 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"list_mode", $this->requested_list_mode);
747 if ($this->use_materials) {
748 $actions[] = $this->ui_fac->button()->shy(
749 $lng->
txt(
'skmg_assign_materials'),
750 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"assignMaterials")
753 $actions[] = $this->ui_fac->button()->shy(
754 $lng->
txt(
'skmg_self_evaluation'),
755 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"selfEvaluation")
757 $sub = $sub->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
760 $sub_panels[] = $sub;
766 $sub_panels[] = $mat;
776 $sub_panels = $this->ui_fac->legacy($des . $this->ui_ren->render($sub_panels));
778 $panel = $this->ui_fac->panel()->standard(
786 $ilCtrl->setParameterByClass(
"ilpersonalskillsgui",
"skill_id", $a_top_skill_id);
787 $actions[] = $this->ui_fac->button()->shy(
788 $lng->
txt(
'skmg_remove_skill'),
789 $ilCtrl->getLinkTargetByClass(
"ilpersonalskillsgui",
"confirmSkillRemove")
792 $panel = $panel->withActions($this->ui_fac->dropdown()->standard($actions)->withLabel($lng->
txt(
"actions")));
795 return $this->ui_ren->render($panel);
807 $obj_id = $ws_tree->lookupObjectId($a_wsp_id);
811 $url = $ws_access->getGotoLink($a_wsp_id, $obj_id);
819 $url .= $obj->getOfflineFilename();
824 $url .= $obj->getOfflineFilename();
829 $url .= $obj->getOfflineFilename();
834 $url .= $obj->getOfflineFilename();
839 $url .= $obj->getOfflineFilename();
844 $url .= $obj->getOfflineFilename();
849 $url .= $file->getFileName();
854 return array($caption,
$url, $obj_id);
865 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
866 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
867 $ilCtrl->redirect($this,
"listSkills");
876 if ($this->requested_skill_id > 0) {
879 if (empty($this->requested_skill_ids)) {
880 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"no_checkbox"),
true);
881 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
882 $ilCtrl->redirect($this,
"listSkills");
885 $cgui->setFormAction($ilCtrl->getFormAction($this));
886 $cgui->setHeaderText($lng->
txt(
"skmg_really_remove_skills"));
887 $cgui->setCancel($lng->
txt(
"cancel"),
"listSkills");
888 $cgui->setConfirm($lng->
txt(
"remove"),
"removeSkills");
890 foreach ($this->requested_skill_ids as $i) {
904 if (!empty($this->requested_skill_ids)) {
905 foreach ($this->requested_skill_ids as $n_id) {
906 $this->personal_manager->removePersonalSkill($ilUser->getId(), $n_id);
910 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_object_modified"));
911 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
912 $ilCtrl->redirect($this,
"listSkills");
931 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
933 :
"listAssignedProfile";
936 $ilCtrl->getLinkTarget($this, $cmd)
939 $ilCtrl->saveParameter($this,
"skill_id");
940 $ilCtrl->saveParameter($this,
"basic_skill_id");
941 $ilCtrl->saveParameter($this,
"tref_id");
949 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
956 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
959 foreach ($bs as
$b) {
963 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
964 ? $this->requested_basic_skill_id
967 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
969 if (count($options) > 1) {
972 $si->setValue($cur_basic_skill_id);
973 $ilToolbar->addInputItem($si,
true);
974 $ilToolbar->addFormButton(
979 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
982 $table = $this->table_manager->getAssignMaterialsTable(
983 $this->requested_skill_id,
984 $this->requested_tref_id,
988 $tpl->
setContent($this->ui_ren->render($table));
1006 if (!
$ilSetting->get(
"disable_personal_workspace")) {
1007 $url =
'ilias.php?baseClass=ilDashboardGUI&cmd=jumpToWorkspace';
1008 $mbox = $ui->
factory()->messageBox()->info($lng->
txt(
"skmg_ass_materials_from_workspace"))
1009 ->withLinks([$ui->
factory()->link()->standard(
1010 $lng->
txt(
"personal_resources"),
1016 if ($this->requested_table_assign_materials_action ===
"assignMaterials" 1017 && !empty($this->requested_table_assign_materials_level_ids)) {
1018 $ilCtrl->setParameter($this,
"level_id", $this->requested_table_assign_materials_level_ids[0]);
1020 $ilCtrl->saveParameter($this,
"skill_id");
1021 $ilCtrl->saveParameter($this,
"level_id");
1022 $ilCtrl->saveParameter($this,
"tref_id");
1023 $ilCtrl->saveParameter($this,
"basic_skill_id");
1025 $ilTabs->setBackTarget(
1027 $ilCtrl->getLinkTarget($this,
"assignMaterials")
1032 $exp->
setTypeWhiteList(array(
"blog",
"wsrt",
"wfld",
"file",
"tstv",
"excv"));
1033 $exp->setSelectableTypes(array(
"file",
"tstv",
"excv"));
1034 $exp->setSelectMode(
"wsp_ids",
true);
1035 if ($exp->handleCommand()) {
1040 $mtpl =
new ilTemplate(
"tpl.materials_selection.html",
true,
true,
"Services/Skill");
1041 $mtpl->setVariable(
"EXP", $exp->getHTML());
1046 $lng->
txt(
"select"),
1049 $tb->setFormAction($ilCtrl->getFormAction($this));
1050 $tb->setOpenFormTag(
true);
1051 $tb->setCloseFormTag(
false);
1052 $mtpl->setVariable(
"TOOLBAR1", $tb->getHTML());
1053 $tb->setOpenFormTag(
false);
1054 $tb->setCloseFormTag(
true);
1055 $mtpl->setVariable(
"TOOLBAR2", $tb->getHTML());
1067 if (!empty($this->requested_wsp_ids)) {
1068 foreach ($this->requested_wsp_ids as $w) {
1069 $this->assigned_material_manager->assignMaterial(
1078 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1081 $ilCtrl->saveParameter($this,
"skill_id");
1082 $ilCtrl->saveParameter($this,
"level_id");
1083 $ilCtrl->saveParameter($this,
"tref_id");
1084 $ilCtrl->saveParameter($this,
"basic_skill_id");
1086 $ilCtrl->redirect($this,
"assignMaterials");
1095 if ($this->requested_table_assign_materials_action ===
"removeMaterial" 1096 && !empty($this->requested_table_assign_materials_level_ids)
1097 && $this->requested_table_assign_materials_wsp_id !== 0) {
1098 $this->assigned_material_manager->removeAssignedMaterial(
1101 (
int) $this->requested_table_assign_materials_level_ids[0],
1102 $this->requested_table_assign_materials_wsp_id
1104 $this->tpl->setOnScreenMessage(
'success', $lng->
txt(
"msg_obj_modified"),
true);
1106 $ilCtrl->redirect($this,
"assignMaterials");
1122 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1124 :
"listAssignedProfile";
1127 $ilCtrl->getLinkTarget($this, $cmd)
1130 $ilCtrl->saveParameter($this,
"skill_id");
1131 $ilCtrl->saveParameter($this,
"basic_skill_id");
1132 $ilCtrl->saveParameter($this,
"tref_id");
1140 $vtree = $this->tree_repo->getVirtualTreeForNodeId($this->requested_skill_id);
1147 $bs = $vtree->getSubTreeForCSkillId($skill_id .
":" . $tref_id,
true);
1151 foreach ($bs as
$b) {
1155 $cur_basic_skill_id = ($this->requested_basic_skill_id > 0)
1156 ? $this->requested_basic_skill_id
1159 $ilCtrl->setParameter($this,
"basic_skill_id", $cur_basic_skill_id);
1161 if (count($options) > 1) {
1164 $si->setValue($cur_basic_skill_id);
1165 $ilToolbar->addInputItem($si,
true);
1166 $ilToolbar->addFormButton(
1167 $lng->
txt(
"select"),
1171 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1175 $tpl->
setContent($this->ui_ren->render($form));
1182 $basic_skill_id = $cur_basic_skill_id;
1184 $self_eval = $this->ui_fac->input()->field()->radio($this->
lng->txt(
"skmg_self_evaluation"))
1185 ->withRequired(
true);
1187 $current_level_id = $this->self_evaluation_manager->getSelfEvaluation(
1188 $this->
user->getId(),
1194 foreach ($skill->getLevelData() as $level) {
1195 $self_eval = $self_eval->withOption((
string) $level[
"id"], $level[
"title"], $level[
"description"]);
1196 if ($current_level_id == $level[
"id"]) {
1197 $self_eval = $self_eval->withValue($level[
"id"]);
1201 $tree_id = $this->tree_repo->getTreeIdForNodeId($basic_skill_id);
1202 $node_manager = $this->internal_manager->getTreeNodeManager($tree_id);
1203 $section_title = $node_manager->getWrittenPath($basic_skill_id);
1204 $section_inputs = [
"self_eval" => $self_eval];
1205 $section = $this->ui_fac->input()->field()->section(
1210 $form_action = $this->
ctrl->getFormAction($this,
"saveSelfEvaluation");
1211 return $this->ui_fac->input()->container()->form()->standard($form_action, [
"section" => $section]);
1220 $ilCtrl->setParameter($this,
"basic_skill_id", $this->requested_basic_skill_id);
1222 $ilCtrl->clearParameterByClass(
"ilpersonalskillsgui",
"basic_skill_id");
1223 $cmd = ($this->requested_list_mode == self::LIST_SELECTED || empty($this->user_profiles))
1224 ?
"render" :
"listAssignedProfile";
1226 if ($this->request->getMethod() ===
"POST") {
1227 $form = $form->withRequest($this->request);
1228 $data = $form->getData();
1229 if (isset(
$data[
"section"]) && is_array(
$data[
"section"]) && !empty(
$data[
"section"][
"self_eval"])) {
1230 $this->self_evaluation_manager->saveSelfEvaluation(
1235 (
int)
$data[
"section"][
"self_eval"]
1237 $this->tpl->setOnScreenMessage(
"success", $lng->
txt(
"msg_obj_modified"),
true);
1239 $this->tpl->setContent($this->ui_ren->render($form));
1244 $this->
tabs->clearTargets();
1245 $this->
tabs->setBackTarget(
1247 $ilCtrl->getLinkTarget($this, $cmd)
1253 $ilCtrl->redirect($this, $cmd);
1264 $ilCtrl->setParameter($this,
"list_mode", self::LIST_SELECTED);
1267 $ilCtrl->getLinkTarget($this,
"render")
1269 $ilCtrl->clearParameterByClass(get_class($this),
"list_mode");
1272 if ($exp->getHasSelectableNodes()) {
1273 if (!$exp->handleCommand()) {
1276 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_select_skill"));
1278 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_no_nodes_selectable"));
1284 $this->
ctrl->redirectByClass(
"ilContSkillPresentationGUI",
"showProfiles");
1289 if (empty($this->cont_profiles)) {
1297 $this->tpl->setContent($html);
1304 $this->
tabs->clearTargets();
1305 $this->
tabs->setBackTarget(
1306 $this->
lng->txt(
"back"),
1307 $this->
ctrl->getLinkTarget($this,
"showProfiles")
1311 $this->tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
1313 $this->tpl->setContent($this->getGapAnalysisHTML());
1323 $this->tpl->setContent($this->getGapAnalysisHTML());
1333 foreach ($profiles as $p) {
1334 $image_id = $p->getImageId();
1336 $identification = $this->storage->manage()->find($image_id);
1337 $src = $this->storage->consume()->src($identification);
1338 $image = $this->ui_fac->image()->responsive($src->getSrc(), $this->
lng->txt(
"skmg_custom_image_alt"));
1340 $image = $this->ui_fac->image()->responsive(
1341 "./templates/default/images/logo/ilias_logo_72x72.png",
1346 $this->
ctrl->setParameter($this,
"profile_id", $p->getId());
1347 $link = $this->ui_fac->link()->standard(
1349 $this->
ctrl->getLinkTarget($this, $gap_mode ?
"listProfileForGap" :
"listAssignedProfile")
1351 $this->
ctrl->setParameter($this,
"profile_id",
"");
1353 $chart_value = $this->profile_completion_manager->getProfileProgress($this->
user->getId(), $p->getId());
1354 $prof_item = $this->ui_fac->item()->standard($link)
1355 ->withDescription($p->getDescription())
1356 ->withLeadImage($image)
1357 ->withProgress($this->ui_fac->chart()->progressMeter()->standard(100, $chart_value));
1359 $prof_items[] = $prof_item;
1362 $prof_list = $this->ui_fac->panel()->listing()->standard(
"", array(
1363 $this->ui_fac->item()->group(
"", $prof_items)
1371 if (!empty($this->cont_profiles)) {
1372 $link = $this->ui_fac->link()->standard(
1373 $this->
lng->txt(
"skmg_open_all_assigned_profiles"),
1374 $this->
ctrl->getLinkTargetByClass([
"ilDashboardGUI",
"ilAchievementsGUI",
"ilPersonalSkillsGUI"])
1376 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info"))->withLinks([$link]);
1378 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_profiles_info_empty"));
1381 return $this->ui_ren->render($box);
1386 $box = $this->ui_fac->messageBox()->info($this->
lng->txt(
"skmg_cont_records_info_empty"));
1388 return $this->ui_ren->render($box);
1393 $this->gap_mode =
"max_per_type";
1394 $this->gap_mode_type = $a_type;
1395 $this->gap_cat_title = $a_cat_title;
1396 $this->mode =
"gap";
1401 $this->gap_mode =
"max_per_object";
1402 $this->gap_mode_obj_id = $a_obj_id;
1403 $this->gap_cat_title = $a_cat_title;
1404 $this->mode =
"gap";
1407 public function getGapAnalysisHTML(
int $a_user_id = 0, ?array $a_skills = null):
string 1415 if ($a_skills == null) {
1417 $a_skills[] = array(
1418 "base_skill_id" => $s->getBaseSkillId(),
1419 "tref_id" => $s->getTrefId()
1429 $intro_html = $pan->getHTML();
1434 if ($a_user_id == 0) {
1435 $user_id = $ilUser->getId();
1437 $user_id = $a_user_id;
1442 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
1446 $vtree = $this->tree_service->getGlobalVirtualSkillTree();
1447 $a_skills = $vtree->getOrderedNodeset($a_skills,
"base_skill_id",
"tref_id");
1449 foreach ($a_skills as $s) {
1451 $skills[] = $this->cont_factory_service->containerSkill()->skill(
1452 (
int) $s[
"base_skill_id"],
1459 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
1463 $this->gap_mode_type,
1464 $this->gap_mode_obj_id
1466 $this->next_level_fuls = $this->profile_completion_manager->getActualNextLevelFulfilments(
1470 $this->gap_mode_type,
1471 $this->gap_mode_obj_id
1476 $not_all_self_evaluated =
false;
1478 foreach ($skills as $s) {
1479 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
1481 $not_all_self_evaluated =
true;
1484 $path = $this->tree_service->getSkillTreePath($s->getBaseSkillId());
1487 foreach (
$path as $p) {
1493 $html .= $this->
getSkillHTML($s->getBaseSkillId(), $user_id,
false, $s->getTrefId());
1496 if ($not_all_self_evaluated) {
1497 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
1498 $html = $this->ui_ren->render($box) . $html;
1502 $all_chart_html = $this->getBarChartHTML($bc_skills);
1504 if (!empty($all_chart_html)) {
1507 $pan->setBody($all_chart_html);
1508 $all_chart_html = $pan->getHTML();
1513 return $intro_html . $all_chart_html . $html;
1519 protected function getBarChartHTML(array $skills):
string 1524 $target_dim = $lng->
txt(
"skmg_target_level");
1525 $eval_dim = $lng->
txt(
"skmg_eval_type_1");
1526 if ($this->gap_cat_title !=
"") {
1528 } elseif ($this->gap_mode ==
"max_per_type") {
1529 $eval_dim = $lng->
txt(
"objs_" . $this->gap_mode_type);
1530 } elseif ($this->gap_mode ==
"max_per_object") {
1533 $self_eval_dim = $lng->
txt(
"skmg_self_evaluation");
1535 $incl_self_eval =
false;
1538 $incl_self_eval =
true;
1545 $all_chart_data = [];
1546 $render_eval_dim =
false;
1547 foreach ($skills as $l) {
1551 if (empty($levels)) {
1558 $labels = [0 =>
""];
1559 foreach ($levels as $lv) {
1562 $labels[] = $lv[
"title"];
1564 if ($l->getLevelId() == $lv[
"id"]) {
1565 $points[$target_dim] = [$cnt - 0.01, $cnt];
1566 $tooltips[$target_dim] = $lv[
"title"];
1568 $points[$target_dim] = $points[$target_dim] ?? null;
1569 $tooltips[$target_dim] = $tooltips[$target_dim] ?? null;
1572 if ($this->actual_levels[$l->getBaseSkillId()][$l->getTrefId()] == $lv[
"id"]) {
1573 $perc = $this->next_level_fuls[$l->getBaseSkillId()][$l->getTrefId()];
1574 $points[$eval_dim] = $cnt + $perc;
1575 $tooltips[$eval_dim] = null;
1577 $tooltips[$eval_dim] = $lv[
"title"] .
" + " . $perc * 100 .
"%";
1579 $render_eval_dim =
true;
1581 $points[$eval_dim] = $points[$eval_dim] ?? null;
1582 $tooltips[$eval_dim] = $tooltips[$eval_dim] ?? null;
1583 if (!is_null($points[$eval_dim])) {
1584 $render_eval_dim =
true;
1587 if ($incl_self_eval) {
1588 if (($self_vals[$l->getBaseSkillId()][$l->getTrefId()] ?? 0) == $lv[
"id"]) {
1589 $points[$self_eval_dim] = $cnt;
1590 $tooltips[$self_eval_dim] = null;
1592 $points[$self_eval_dim] = $points[$self_eval_dim] ?? null;
1593 $tooltips[$self_eval_dim] = $tooltips[$self_eval_dim] ?? null;
1599 if (!$render_eval_dim) {
1600 unset($points[$eval_dim]);
1601 unset($tooltips[$eval_dim]);
1608 if (!empty($tmp_labels) && $tmp_labels !== $labels) {
1612 $tmp_labels = $labels;
1615 $l->getBaseSkillId(),
1618 $all_chart_data[$chart_counter][$bar_counter][
"levels"] = $labels;
1619 $all_chart_data[$chart_counter][$bar_counter][
"points"] = $points;
1620 $all_chart_data[$chart_counter][$bar_counter][
"tooltips"] = $tooltips;
1625 $all_chart_html =
"";
1626 foreach ($all_chart_data as $chart_data) {
1627 $c_dimension = $this->data_fac->dimension()->cardinal($chart_data[0][
"levels"]);
1628 $r_dimension = $this->data_fac->dimension()->range($c_dimension);
1636 $target_bar = $target_bar->withRelativeWidth(1.1);
1637 $target_bar = $target_bar->withColor($this->data_fac->color(
"#333333"));
1638 $ds[$target_dim] = $r_dimension;
1639 $bars[$target_dim] = $target_bar;
1642 if ($render_eval_dim) {
1644 $eval_bar = $eval_bar->withRelativeWidth(0.5);
1645 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#307C88"));
1647 $eval_bar = $eval_bar->withColor($this->data_fac->color(
"#d38000"));
1649 $ds[$eval_dim] = $c_dimension;
1650 $bars[$eval_dim] = $eval_bar;
1653 if ($incl_self_eval) {
1655 $self_eval_bar = $self_eval_bar->withRelativeWidth(0.5);
1656 $self_eval_bar = $self_eval_bar->withColor($this->data_fac->color(
"#557b2e"));
1657 $ds[$self_eval_dim] = $c_dimension;
1658 $bars[$self_eval_dim] = $self_eval_bar;
1661 $dataset = $this->data_fac->dataset($ds);
1663 $render_chart =
false;
1664 foreach ($chart_data as
$a) {
1665 if ($render_eval_dim && !isset($a[
"points"][$eval_dim])) {
1666 $a[
"points"][$eval_dim] = null;
1667 $a[
"tooltips"][$eval_dim] = null;
1669 $dataset = $dataset->withPoint($a[
"item_title"], $a[
"points"]);
1670 $dataset = $dataset->withAlternativeInformation($a[
"item_title"], $a[
"tooltips"]);
1671 foreach ($a[
"points"] as $dim => $p) {
1673 if (!is_null($p) && $dim != $target_dim) {
1674 $render_chart =
true;
1679 if ($render_chart) {
1680 $bar_chart = $this->ui_fac->chart()->bar()->horizontal(
1686 $x_axis =
new XAxis();
1687 $x_axis = $x_axis->withMaxValue(count($chart_data[0][
"levels"]) - 1);
1689 $bar_chart = $bar_chart->withCustomXAxis($x_axis);
1690 $bar_chart = $bar_chart->withTitleVisible(
false);
1692 $all_chart_html .= $this->ui_ren->render($bar_chart);
1696 return $all_chart_html;
1704 if ($a_user_id == 0) {
1705 $a_user_id = $ilUser->getId();
1710 foreach ($a_levels as $v) {
1711 $mat_cnt = $this->assigned_material_manager->countAssignedMaterials(
1725 foreach ($a_levels as $k => $v) {
1728 foreach ($this->assigned_material_manager->getAssignedMaterials(
1733 $mat_data = $this->
getMaterialInfo($item->getWorkspaceId(), $a_user_id);
1734 $title = $mat_data[0];
1735 $icon = $this->ui_fac->symbol()->icon()->standard(
1739 $link = $this->ui_fac->link()->standard($title, $mat_data[1]);
1740 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
1744 $item_groups[] = $this->ui_fac->item()->group($v[
"title"], $items);
1747 $mat_panel = $this->ui_fac->panel()->sub(
1748 $lng->
txt(
"skmg_materials"),
1759 $profile_levels = $this->profile_manager->getSkillLevels($a_profile_id);
1761 $a_activated_levels = [];
1763 foreach ($a_levels as $k => $v) {
1764 foreach ($profile_levels as $pl) {
1765 if ($pl->getLevelId() == $v[
"id"] &&
1766 $pl->getBaseSkillId() == $v[
"skill_id"] &&
1767 $a_tref_id == $pl->getTrefId()) {
1768 $a_activated_levels[] = $pl->getLevelId();
1773 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"Services/Skill");
1786 $a_activated_levels = [];
1787 foreach ($a_levels as $k => $v) {
1788 if ($this->actual_levels[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1789 $a_activated_levels[] = $v[
"id"];
1793 if (empty($a_activated_levels)) {
1798 if ($this->gap_cat_title !=
"") {
1800 } elseif ($this->gap_mode ==
"max_per_type") {
1801 $title = $lng->
txt(
"objs_" . $this->gap_mode_type);
1802 } elseif ($this->gap_mode ==
"max_per_object") {
1806 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"Services/Skill");
1810 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1816 if ($title != $lng->
txt(
"skmg_eval_type_" . $type)) {
1828 if (empty($self_vals)) {
1832 $a_activated_levels = [];
1833 foreach ($a_levels as $k => $v) {
1834 if (isset($self_vals[$v[
"skill_id"]][$a_tref_id]) &&
1835 $self_vals[$v[
"skill_id"]][$a_tref_id] == $v[
"id"]) {
1836 $a_activated_levels[] = $v[
"id"];
1840 if (empty($a_activated_levels)) {
1844 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"Services/Skill");
1848 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1862 public function getScaleBar(array $a_levels, $a_activated_levels): string
1866 if (!is_array($a_activated_levels)) {
1867 $a_activated_levels = array($a_activated_levels);
1870 foreach ($a_levels as $level) {
1871 $vals[$level[
"title"]] = (in_array($level[
"id"], $a_activated_levels));
1873 $scale_bar = $this->ui_fac->chart()->scaleBar($vals);
1875 return $this->ui_ren->render($scale_bar);
1878 public function getEvalItem(array $a_levels, array $a_level_entry,
bool $is_latest =
false): string
1883 $tpl =
new ilTemplate(
"tpl.skill_eval_item.html",
true,
true,
"Services/Skill");
1886 $type = Personal\SkillEval::TYPE_APPRAISAL;
1888 if ($a_level_entry[
"self_eval"] == 1) {
1889 $type = Personal\SkillEval::TYPE_SELF_EVAL;
1892 if ($a_level_entry[
"trigger_obj_type"] ==
"tst") {
1893 $type = Personal\SkillEval::TYPE_MEASUREMENT;
1898 if ($a_level_entry[
"trigger_obj_id"] > 0) {
1902 $title = $del_data[
"title"];
1904 $title = ($a_level_entry[
"trigger_title"]) ??
"";
1908 if ($a_level_entry[
"trigger_ref_id"] > 0
1909 && $ilAccess->checkAccess(
"read",
"", $a_level_entry[
"trigger_ref_id"])) {
1910 $title =
"<a href='" . ilLink::_getLink($a_level_entry[
"trigger_ref_id"]) .
"'>" . $title .
"</a>";
1914 $tpl->
setVariable(
"TYPE", $lng->
txt(
"skmg_eval_type_latest_" . $type));
1943 $tpl =
new ilTemplate(
"tpl.skill_entries_latest.html",
true,
true,
"Services/Skill");
1945 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
1958 $latest_entries_html =
"";
1959 foreach ($latest_entries as $entry) {
1960 $latest_entries_html .= $this->ui_ren->render(
1961 $this->ui_fac->legacy($this->getEvalItem($level_data, $entry,
true))
1965 if (!empty($latest_entries_html)) {
1966 $tpl->
setVariable(
"SKILL_ENTRIES", $latest_entries_html);
1968 if (count($user_entries_filtered) != count($latest_entries)) {
1970 $show_all_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_all"),
"#")
1972 return "$('#$id').on('click', function() {SkillEntries.showNonLatest($id); return false;})";
1974 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_all_button));
1994 $tpl =
new ilTemplate(
"tpl.skill_entries_non_latest.html",
true,
true,
"Services/Skill");
1996 $user_entries = $skill->getAllHistoricLevelEntriesOfUser($bs[
"tref"], $user->
getId(), $eval_type);
2009 $non_latest_entries_filtered_html =
"";
2010 foreach ($non_latest_entries as $entry) {
2011 $non_latest_entries_filtered_html .= $this->ui_ren->render(
2012 $this->ui_fac->legacy($this->getEvalItem($level_data, $entry,
false))
2016 if (!empty($non_latest_entries_filtered_html)) {
2017 $tpl->
setVariable(
"SKILL_ENTRIES", $non_latest_entries_filtered_html);
2019 $show_latest_button = $this->ui_fac->button()->standard($lng->
txt(
"skmg_show_latest_entries"),
"#")
2021 return "$('#$id').on('click', function() {SkillEntries.hideNonLatest($id); return false;})";
2023 $tpl->
setVariable(
"BUTTON", $this->ui_ren->render($show_latest_button));
2038 $se_date = $this->self_evaluation_manager->getSelfEvaluationDate($user->
getId(), $top_skill_id, $bs[
"tref"], $bs[
"id"]);
2039 $se_rendered = $se_date ==
"";
2041 $filtered_entries = [];
2042 foreach ($entries as $level_entry) {
2051 if ($se_date > $level_entry[
"status_date"] && !$se_rendered) {
2052 $se_rendered =
true;
2054 if ($this->
getFilter()->isInRange($level_entry)) {
2055 $filtered_entries[] = $level_entry;
2059 return $filtered_entries;
2064 if (!empty($entries)) {
2065 $last_entry[] = $entries[0];
2074 if (count($entries) > 1) {
2075 array_shift($entries);
2084 $first_self_added =
false;
2085 $first_measurement_added =
false;
2086 $first_appraisal_added =
false;
2087 $latest_entries = [];
2088 foreach ($entries as $entry) {
2089 if (!$first_self_added && $entry[
"self_eval"] == 1) {
2090 $latest_entries[] = $entry;
2091 $first_self_added =
true;
2094 if (!$first_measurement_added && $entry[
"trigger_obj_type"] ==
"tst") {
2095 $latest_entries[] = $entry;
2096 $first_measurement_added =
true;
2099 if (!$first_appraisal_added && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2100 $latest_entries[] = $entry;
2101 $first_appraisal_added =
true;
2105 return $latest_entries;
2110 $first_self_filtered =
false;
2111 $first_measurement_filtered =
false;
2112 $first_appraisal_filtered =
false;
2113 $non_latest_entries = [];
2114 foreach ($entries as $entry) {
2115 if (!$first_self_filtered && $entry[
"self_eval"] == 1) {
2116 $first_self_filtered =
true;
2119 if (!$first_measurement_filtered && $entry[
"trigger_obj_type"] ==
"tst") {
2120 $first_measurement_filtered =
true;
2123 if (!$first_appraisal_filtered && $entry[
"self_eval"] != 1 && $entry[
"trigger_obj_type"] !=
"tst") {
2124 $first_appraisal_filtered =
true;
2127 $non_latest_entries[] = $entry;
2130 return $non_latest_entries;
2135 $tpl =
new ilTemplate(
"tpl.skill_entries_header.html",
true,
true,
"Services/Skill");
2138 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_self_evaluation"));
2140 $tpl->
setVariable(
"BYLINE", $this->
lng->txt(
"skmg_self_evaluation_byline"));
2144 $tpl->
setVariable(
"HEADING", $this->
lng->txt(
"skmg_skill_profile_records"));
2153 $tpl =
new ilTemplate(
"tpl.skill_description_category.html",
true,
true,
"Services/Skill");
2169 $tpl =
new ilTemplate(
"tpl.skill_description_basic.html",
true,
true,
"Services/Skill");
2171 if (!empty($description)) {
2173 $tpl->
setVariable(
"DESCRIPTION_BASIC", $description);
2182 $level_data = $skill->getLevelData();
2183 $tpl =
new ilTemplate(
"tpl.skill_desc.html",
true,
true,
"Services/Skill");
2185 $desc_exists =
false;
2186 foreach ($level_data as $l) {
2187 if ($l[
"description"] !=
"") {
2188 $desc_exists =
true;
2193 foreach ($level_data as $l) {
2196 $tpl->
setVariable(
"LEVEL_DESC", nl2br($l[
"description"]));
2208 int $gap_mode_obj_id = 0
2213 if ($gap_mode_obj_id > 0 && !$this->obj_definition->isContainer($gap_mode_obj_type)) {
2218 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2220 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_needs_self_eval"));
2221 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2226 if ($this->resource_manager->isLevelTooLow($a_tref_id, $a_levels, $this->profile_levels, $this->actual_levels)) {
2227 $imp_resources = $this->resource_manager->getSuggestedResources(
2231 $this->profile_levels
2233 $info = $this->ui_fac->item()->standard($lng->
txt(
"skmg_recommended_learning_material_info"));
2234 $item_groups[] = $this->ui_fac->item()->group(
"", [$info]);
2236 $at_least_one_item =
false;
2237 $highlighted_level =
false;
2240 $is_container =
false;
2241 if ($gap_mode_obj_id > 0 && $this->obj_definition->isContainer($gap_mode_obj_type)) {
2242 $is_container =
true;
2243 $sub_objects = $this->tree->getSubTree(
2249 foreach ($imp_resources as $order_level_id =>
$resources) {
2250 $level_id = (
int) substr(strrchr($order_level_id,
'_'), 1);
2252 if ($level_id <= $this->actual_levels[$a_base_skill][$a_tref_id]) {
2255 if ($level_id === $this->resource_manager->determineCurrentTargetLevel($a_levels, $this->profile_levels)) {
2256 $highlighted_level =
true;
2258 $level_title = $this->level_repo->lookupLevelTitle($level_id);
2263 if ($is_container && !in_array(
$ref_id, $sub_objects)) {
2268 $icon = $this->ui_fac->symbol()->icon()->standard(
2272 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2273 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2274 $at_least_one_item =
true;
2276 $item_groups[] = $this->ui_fac->item()->group(
2278 ?
"<strong>" . $level_title .
" (" . $lng->
txt(
"skmg_target_level") .
")</strong>" 2283 if ($at_least_one_item) {
2284 switch ($gap_mode_obj_type) {
2286 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_crs");
2289 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_grp");
2292 $sec_panel_title = $lng->
txt(
"skmg_recommended_learning_material_global");
2295 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2300 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_needs_impr_no_res"));
2301 $sec_panel = $this->ui_fac->panel()->secondary()->legacy(
"", $sec_panel_content);
2304 $sec_panel_content = $this->ui_fac->legacy($lng->
txt(
"skmg_skill_no_needs_impr_info"));
2305 $sec_panel = $this->ui_fac->panel()->secondary()->legacy($lng->
txt(
"skmg_skill_no_needs_impr"), $sec_panel_content);
2317 $res = $this->resource_manager->getResources($a_base_skill, $a_tref_id);
2320 foreach (
$res as $level) {
2324 foreach ($level as
$r) {
2325 if ($r->getImparting()) {
2329 $icon = $this->ui_fac->symbol()->icon()->standard(
2333 $link = $this->ui_fac->link()->standard($title, ilLink::_getLink(
$ref_id));
2334 $items[] = $this->ui_fac->item()->standard($link)->withLeadIcon($icon);
2337 $cl = $r->getLevelId();
2345 $sec_panel = $this->ui_fac->panel()->secondary()->listing(
2346 $lng->
txt(
"skmg_suggested_resources"),
2357 if (empty($this->user_profiles)) {
2358 $this->
ctrl->redirect($this,
"listSkills");
2365 $this->tpl->setContent($this->ui_ren->render($prof_list));
2375 $tpl =
new ilTemplate(
"tpl.skill_filter.html",
true,
true,
"Services/Skill");
2377 $this->
tabs->clearTargets();
2378 $this->
tabs->setBackTarget(
2379 $this->
lng->txt(
"back"),
2380 $ilCtrl->getLinkTarget($this,
"listallassignedprofiles")
2384 $main_tpl->setTitle($this->profile_manager->lookupTitle($this->getProfileId()));
2387 $filter_toolbar->setFormAction($ilCtrl->getFormAction($this));
2388 $this->
getFilter()->addToToolbar($filter_toolbar,
true);
2392 $this->profile_levels = $this->profile_manager->getSkillLevels($this->
getProfileId());
2396 $this->actual_levels = $this->profile_completion_manager->getActualMaxLevels(
2397 $this->
user->getId(),
2406 $not_all_self_evaluated =
false;
2407 foreach ($skills as $s) {
2408 if ($this->skmg_settings->getHideProfileBeforeSelfEval() &&
2410 $not_all_self_evaluated =
true;
2414 $html .= $this->
getSkillHTML($s->getBaseSkillId(), 0,
true, $s->getTrefId());
2418 $filter_toolbar->addFormButton($this->
lng->txt(
"skmg_refresh_view"),
"applyFilterAssignedProfiles");
2420 $tpl->
setVariable(
"FILTER", $filter_toolbar->getHTML());
2422 $html = $tpl->
get() . $html;
2425 if ($not_all_self_evaluated) {
2426 $box = $this->ui_fac->messageBox()->info($lng->
txt(
"skmg_skill_needs_self_eval_box"));
2427 $html = $this->ui_ren->render($box) . $html;
2430 $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
An entity that renders components to a string output.
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
hideSkill(int $a_skill_id, int $a_tref_id=0)
touchBlock(string $block)
overwrites ITX::touchBlock.
Table TableManager $table_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Profile SkillProfileManager $profile_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
array $trigger_user_filter
const PANEL_STYLE_PRIMARY
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ServerRequestInterface $request
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTypeWhiteList(array $a_val)
Set type white list.
static _getAllReferences(int $id)
get all reference ids for object ID
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Resource SkillResourcesManager $resource_manager
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
Explorer for selecting a personal skill.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setIntroText(string $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
string $requested_table_assign_materials_action
int $requested_table_assign_materials_wsp_id
loadLanguageModule(string $a_module)
Load language module.
getMaterialInfo(int $a_wsp_id, int $a_user_id)
Get material file name and goto url.
Filter for personal skills.
static lookupLevelTitle(int $a_id)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
Service SkillPersonalGUIRequest $personal_gui_request
renderSkillHTML(int $a_top_skill_id, int $a_user_id=0, bool $a_edit=false, int $a_tref_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $a_obj_id)
getProfileTargetItem(int $a_profile_id, array $a_levels, int $a_tref_id=0)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
array $gap_self_eval_levels
static getInstance(int $a_id=0)
setHistoryView(bool $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGapAnalysisActualStatusModePerType(string $a_type, string $a_cat_title="")
static _lookupDescription(int $a_obj_id)
getAllEntriesLatestOnly(array $entries)
withOnLoadCode(Closure $binder)
static _lookupObjId(int $ref_id)
static hasSelfEvaluated(int $a_user_id, int $a_skill_id, int $a_tref_id)
getSkillLevelDescription(ilSkillTreeNode $skill)
ilSkillManagementSettings $skmg_settings
getSkillHTML(int $a_top_skill_id, int $a_user_id=0, bool $a_edit=false, int $a_tref_id=0)
Get skill presentation HTML.
Service SkillTreeService $tree_service
assignMaterial()
Assign materials to skill level.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Personal skills GUI class.
setTabs(string $a_activate)
parses the objects.xml it handles the xml-description of all ilias objects
setTriggerObjectsFilter(array $trigger_objects_filter)
Provides fluid interface to RBAC services.
Personal SelfEvaluationManager $self_evaluation_manager
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
getSelfEvalGapItem(array $a_levels, int $a_tref_id=0)
getGapAnalysisSelfEvalLevels()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
getActualGapItem(array $a_levels, int $a_tref_id=0)
array $requested_skill_ids
setTriggerUserFilter(array $trigger_user_filter)
ilPersonalSkillsFilterGUI $filter
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.
getLevelData(int $a_id=0)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Service SkillInternalManagerService $internal_manager
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
string $requested_list_mode
ilGlobalTemplateInterface $tpl
listAllAssignedProfiles()
array $requested_table_assign_materials_level_ids
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Personal AssignedMaterialManager $assigned_material_manager
getSelfEvaluationForm(int $cur_basic_skill_id)
getNonLatestEntriesForSkillHTML(int $top_skill_id, array $bs, ilSkillTreeNode $skill, ilObjUser $user, int $eval_type, array $level_data)
assignMaterials()
Assign materials to skill levels.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getBasicSkillDescription(string $description)
getFilteredEntriesForSkill(array $entries, int $top_skill_id, array $bs, ilObjUser $user)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
getSuggestedResourcesForProfile(array $a_levels, int $a_base_skill, int $a_tref_id, int $gap_mode_obj_id=0)
getSkillEntriesHeader(int $eval_type)
setObjectSkillProfiles(int $cont_member_role_id)
factory()
Get the factory that crafts UI components.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static get(int $a_object_id)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
getAllSuggestedResources(int $a_base_skill, int $a_tref_id)
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ContainerSkills SkillInternalFactoryService $cont_factory_service
static _lookupType(int $id, bool $reference=false)
int $requested_profile_id
static setUseRelativeDates(bool $a_status)
set use relative dates
getSelfEvalEntriesWithoutLatest(array $entries)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getLatestEntriesForSkillHTML(int $top_skill_id, array $bs, ilSkillTreeNode $skill, ilObjUser $user, int $eval_type, array $level_data)
ilSkillTreeRepository $tree_repo
getSelfEvalEntriesLatestOnly(array $entries)
getScaleBar(array $a_levels, $a_activated_levels)
getAllEntriesWithoutLatest(array $entries)
addTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
Add a Tab.