ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilSkillProfileGUI Class Reference

Skill profile GUI class. More...

+ Collaboration diagram for ilSkillProfileGUI:

Public Member Functions

 __construct (SkillTreeAccess $skill_tree_access_manager, int $skill_tree_id=0)
 
 executeCommand ()
 
 setTabs (string $a_active)
 
 listProfiles ()
 
 listLocalProfiles ()
 
 create ()
 
 createLocal ()
 
 edit ()
 
 initProfileForm (string $a_mode="edit")
 
 save ()
 
 saveLocal ()
 
 update ()
 
 deleteProfiles ()
 
 showLevels ()
 
 showLevelsWithLocalContext ()
 
 assignLevel ()
 
 assignLevelSelectSkill (bool $update=false)
 Output level table for profile assignment. More...
 
 updateLevelOfSelectedSkill ()
 
 assignLevelToProfile (?Profile\SkillProfileLevel $level=null)
 
 updateLevelOfProfile ()
 
 confirmLevelAssignmentRemoval ()
 
 removeLevelAssignments ()
 
 saveLevelOrder ()
 
 showUsers ()
 
 assignUser ()
 
 assignRole (array $role_ids)
 
 removeUsers ()
 
 showObjects ()
 
 showImportForm ()
 
 initInputForm ()
 
 importProfiles ()
 

Protected Attributes

ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ilGlobalTemplateInterface $tpl
 
ilHelpGUI $help
 
ilToolbarGUI $toolbar
 
UI Factory $ui_fac
 
UI Renderer $ui_ren
 
ILIAS Data Factory $df
 
ServerRequestInterface $request
 
ArrayBasedRequestWrapper $query
 
int $id = 0
 
Profile SkillProfile $profile = null
 
SkillTreeService $tree_service
 
SkillTreeAccess $skill_tree_access_manager
 
int $skill_tree_id = 0
 
SkillAdminGUIRequest $admin_gui_request
 
int $requested_ref_id = 0
 
int $requested_sprof_id = 0
 
SkillInternalFactoryService $skill_factory
 
Profile SkillProfileManager $profile_manager
 
Profile SkillProfileCompletionManager $profile_completion_manager
 
Table TableManager $table_manager
 
Usage SkillUsageManager $usage_manager
 
DataFactory $data_factory
 
ExportFactoryInterface $export_factory
 
ilObjUser $usr
 
array $requested_profile_ids = []
 
bool $requested_local_context = false
 
string $requested_cskill_id = ""
 
array $requested_level_ass_ids = []
 
array $requested_level_order = []
 
string $requested_user_login = ""
 
array $requested_users = []
 
array $requested_user_ids = []
 
string $requested_table_profile_action = ""
 
array $requested_table_profile_ids = []
 
int $requested_level_id = 0
 
bool $local_context = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSkillProfileGUI::__construct ( SkillTreeAccess  $skill_tree_access_manager,
int  $skill_tree_id = 0 
)

Definition at line 109 of file class.ilSkillProfileGUI.php.

References $DIC, $requested_local_context, $requested_sprof_id, $skill_tree_access_manager, $skill_tree_id, ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\profile(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

110  {
111  global $DIC;
112 
113  $this->data_factory = new DataFactory();
114  $this->export_factory = new ExportFactory();
115  $this->usr = $DIC->user();
116  $this->ctrl = $DIC->ctrl();
117  $this->lng = $DIC->language();
118  $this->tabs = $DIC->tabs();
119  $this->tpl = $DIC["tpl"];
120  $this->help = $DIC["ilHelp"];
121  $this->toolbar = $DIC->toolbar();
122  $this->ui_fac = $DIC->ui()->factory();
123  $this->ui_ren = $DIC->ui()->renderer();
124  $this->df = new \ILIAS\Data\Factory();
125  $this->request = $DIC->http()->request();
126  $this->query = $DIC->http()->wrapper()->query();
127  $this->tree_service = $DIC->skills()->tree();
128  $this->skill_tree_access_manager = $skill_tree_access_manager;
129  $this->skill_tree_id = $skill_tree_id;
130  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
131  $this->skill_factory = $DIC->skills()->internal()->factory();
132  $this->profile_manager = $DIC->skills()->internal()->manager()->getProfileManager();
133  $this->profile_completion_manager = $DIC->skills()->internal()->manager()->getProfileCompletionManager();
134  $this->table_manager = $DIC->skills()->internal()->manager()->getTableManager();
135  $this->usage_manager = $DIC->skills()->internal()->manager()->getUsageManager();
136 
137  $this->ctrl->saveParameter($this, ["sprof_id", "local_context"]);
138 
139  $this->requested_ref_id = $this->admin_gui_request->getRefId();
140  $this->requested_sprof_id = $this->admin_gui_request->getSkillProfileId();
141  $this->requested_profile_ids = $this->admin_gui_request->getProfileIds();
142  $this->requested_local_context = $this->admin_gui_request->getLocalContext();
143  $this->requested_cskill_id = $this->admin_gui_request->getCombinedSkillId();
144  $this->requested_level_ass_ids = $this->admin_gui_request->getAssignedLevelIds();
145  $this->requested_level_order = $this->admin_gui_request->getOrder();
146  $this->requested_user_login = $this->admin_gui_request->getUserLogin();
147  $this->requested_users = $this->admin_gui_request->getUsers();
148  $this->requested_user_ids = $this->admin_gui_request->getUserIds();
149  $this->requested_table_profile_action = $this->admin_gui_request->getTableProfileAction();
150  $this->requested_table_profile_ids = $this->admin_gui_request->getTableProfileIds();
151  $this->requested_level_id = $this->admin_gui_request->getLevelId();
152 
153  if ($this->requested_sprof_id > 0) {
154  $this->id = $this->requested_sprof_id;
155  }
156 
157  if ($this->id > 0) {
158  $this->profile = $this->profile_manager->getProfile($this->id);
159  if ($this->skill_tree_id == 0) {
160  $this->skill_tree_id = $this->profile->getSkillTreeId();
161  }
162  if ($this->profile->getRefId() > 0 && $this->requested_local_context) {
163  $this->local_context = true;
164  }
165  }
166  }
SkillTreeAccess $skill_tree_access_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ assignLevel()

ilSkillProfileGUI::assignLevel ( )

Definition at line 584 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $local_context, $tabs, $tpl, ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\UICore\GlobalTemplate\setDescription(), ILIAS\UICore\GlobalTemplate\setTitle(), and ilLanguage\txt().

584  : void
585  {
586  $lng = $this->lng;
587  $ilTabs = $this->tabs;
588  $ilCtrl = $this->ctrl;
589  $tpl = $this->tpl;
590  $local = $this->local_context;
591 
592  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
593  $this->profile->getTitle());
594  $tpl->setDescription("");
595 
596  //$this->setTabs("levels");
597 
598  $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_select_skill_level_assign"));
599 
600  $ilTabs->clearTargets();
601  if ($local) {
602  $ilTabs->setBackTarget(
603  $lng->txt("back"),
604  $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
605  );
606  } else {
607  $ilTabs->setBackTarget(
608  $lng->txt("back"),
609  $ilCtrl->getLinkTarget($this, "showLevels")
610  );
611  }
612 
613 
614  $exp = new ilSkillSelectorGUI(
615  $this,
616  "assignLevel",
617  $this,
618  "assignLevelSelectSkill",
619  "cskill_id",
620  $this->skill_tree_id
621  );
622  if (!$exp->handleCommand()) {
623  $tpl->setContent($exp->getHTML());
624  }
625  }
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...
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
ilGlobalTemplateInterface $tpl
Explorer class that works on tree objects (Services/Tree)
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:

◆ assignLevelSelectSkill()

ilSkillProfileGUI::assignLevelSelectSkill ( bool  $update = false)

Output level table for profile assignment.

Definition at line 630 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $local_context, $tabs, $tpl, ILIAS\Repository\int(), ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\UICore\GlobalTemplate\setDescription(), ILIAS\UICore\GlobalTemplate\setTitle(), and ilLanguage\txt().

Referenced by updateLevelOfSelectedSkill().

630  : void
631  {
632  $tpl = $this->tpl;
633  $lng = $this->lng;
634  $ilCtrl = $this->ctrl;
635  $ilTabs = $this->tabs;
636  $local = $this->local_context;
637 
638  $ilCtrl->saveParameter($this, "cskill_id");
639 
640  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
641  $this->profile->getTitle());
642  $tpl->setDescription("");
643 
644  $ilTabs->clearTargets();
645  if ($local) {
646  $ilTabs->setBackTarget(
647  $lng->txt("back"),
648  $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
649  );
650  } else {
651  $ilTabs->setBackTarget(
652  $lng->txt("back"),
653  $ilCtrl->getLinkTarget($this, "showLevels")
654  );
655  }
656 
657  $id_parts = explode(":", $this->requested_cskill_id);
658  $skill_id = (int) $id_parts[0];
659  $skill = new ilBasicSkill($skill_id);
660  $level_data = $skill->getLevelData();
661 
662  $items = [];
663  foreach ($level_data as $levels) {
664  $ilCtrl->setParameterByClass(self::class, "level_id", $levels["id"]);
665  $items[] = $this->ui_fac->item()->standard($levels["title"])->withMainAction(
666  $this->ui_fac->link()->standard(
667  $lng->txt("skmg_assign_level"),
668  $ilCtrl->getLinkTarget($this, $update ? "updateLevelOfProfile" : "assignLevelToProfile")
669  )
670  );
671  $ilCtrl->clearParameterByClass(self::class, "level_id");
672  }
673 
674  $list = $this->ui_fac->panel()->listing()->standard(
675  $skill->getTitle() . ", " . $lng->txt("skmg_skill_levels"),
676  [
677  $this->ui_fac->item()->group("", $items)
678  ]
679  );
680 
681  $tpl->setContent($this->ui_ren->render($list));
682  }
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...
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
ilGlobalTemplateInterface $tpl
setDescription(string $a_descr)
Sets description below title in standard template.
Basic Skill.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignLevelToProfile()

ilSkillProfileGUI::assignLevelToProfile ( ?Profile\SkillProfileLevel  $level = null)

Definition at line 689 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $local_context, $parts, $requested_level_id, ILIAS\Repository\int(), ILIAS\Repository\profile(), and ilLanguage\txt().

Referenced by updateLevelOfProfile().

689  : void
690  {
691  $ilCtrl = $this->ctrl;
692  $lng = $this->lng;
693  $local = $this->local_context;
694 
695  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
696  return;
697  }
698 
699  if ($level) {
700  $this->profile_manager->updateSkillLevel($level);
701  } else {
702  $parts = explode(":", $this->requested_cskill_id);
703  $level = $this->skill_factory->profile()->profileLevel(
704  $this->profile->getId(),
705  (int) $parts[0],
706  (int) $parts[1],
708  $this->profile_manager->getMaxLevelOrderNr($this->profile->getId()) + 10
709  );
710  $this->profile_manager->addSkillLevel($level);
711  }
712 
713  // profile completion check because of profile editing
714  $this->profile_completion_manager->writeCompletionEntryForAllAssignedUsersOfProfile($this->profile->getId());
715 
716  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
717  if ($local) {
718  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
719  }
720  $ilCtrl->redirect($this, "showLevels");
721  }
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...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignRole()

ilSkillProfileGUI::assignRole ( array  $role_ids)

Definition at line 904 of file class.ilSkillProfileGUI.php.

References $ctrl, $id, $lng, ILIAS\Repository\profile(), and ilLanguage\txt().

904  : void
905  {
906  $ilCtrl = $this->ctrl;
907  $lng = $this->lng;
908 
909  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
910  return;
911  }
912 
913  $success = false;
914  foreach ($role_ids as $id) {
915  if ($id > 0) {
916  $this->profile_manager->addRoleToProfile($this->profile->getId(), $id);
917  $this->profile_completion_manager->writeCompletionEntryForRole($id, $this->profile->getId());
918  $success = true;
919  }
920  }
921  if ($success) {
922  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
923  }
924 
925  $ilCtrl->redirect($this, "showUsers");
926  }
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...
+ Here is the call graph for this function:

◆ assignUser()

ilSkillProfileGUI::assignUser ( )

Definition at line 870 of file class.ilSkillProfileGUI.php.

References $ctrl, $id, $lng, $requested_users, $user_id, ilObjUser\_lookupId(), ILIAS\Repository\profile(), and ilLanguage\txt().

870  : void
871  {
872  $ilCtrl = $this->ctrl;
873  $lng = $this->lng;
874 
875  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
876  return;
877  }
878 
879  // user assignment with toolbar
880  $user_id = ilObjUser::_lookupId($this->requested_user_login);
881  if ($user_id > 0) {
882  $this->profile_manager->addUserToProfile($this->profile->getId(), $user_id);
883  // profile completion check for added user
884  $this->profile_completion_manager->writeCompletionEntryForSingleProfileOfUser($user_id, $this->profile->getId());
885  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
886  }
887 
888  // user assignment with ilRepositorySearchGUI
889  $users = $this->requested_users;
890  if (!empty($users)) {
891  foreach ($users as $id) {
892  if ($id > 0) {
893  $this->profile_manager->addUserToProfile($this->profile->getId(), $id);
894  // profile completion check for added user
895  $this->profile_completion_manager->writeCompletionEntryForSingleProfileOfUser($id, $this->profile->getId());
896  }
897  }
898  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
899  }
900 
901  $ilCtrl->redirect($this, "showUsers");
902  }
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...
static _lookupId($a_user_str)
+ Here is the call graph for this function:

◆ confirmLevelAssignmentRemoval()

ilSkillProfileGUI::confirmLevelAssignmentRemoval ( )

Definition at line 737 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $local_context, $tabs, $tpl, ilSkillTreeNode\_lookupTitle(), ilTabsGUI\clearTargets(), ilBasicSkill\lookupLevelTitle(), ILIAS\UICore\GlobalTemplate\setContent(), setTabs(), and ilLanguage\txt().

737  : void
738  {
739  $ilCtrl = $this->ctrl;
740  $tpl = $this->tpl;
741  $lng = $this->lng;
742  $tabs = $this->tabs;
743  $local = $this->local_context;
744 
745  if ($local) {
746  $tabs->clearTargets();
747  } else {
748  $this->setTabs("levels");
749  }
750 
751  if (empty($this->requested_level_ass_ids)) {
752  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
753  if ($local) {
754  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
755  }
756  $ilCtrl->redirect($this, "showLevels");
757  } else {
758  $cgui = new ilConfirmationGUI();
759  $cgui->setFormAction($ilCtrl->getFormAction($this));
760  $cgui->setHeaderText($lng->txt("skmg_confirm_remove_level_ass"));
761  if ($local) {
762  $cgui->setCancel($lng->txt("cancel"), "showLevelsWithLocalContext");
763  } else {
764  $cgui->setCancel($lng->txt("cancel"), "showLevels");
765  }
766  $cgui->setConfirm($lng->txt("remove"), "removeLevelAssignments");
767 
768  foreach ($this->requested_level_ass_ids as $i) {
769  $id_arr = explode(":", $i);
770  $cgui->addItem(
771  "ass_id[]",
772  $i,
773  ilBasicSkill::_lookupTitle((int) $id_arr[0]) . ": " .
774  ilBasicSkill::lookupLevelTitle((int) $id_arr[2])
775  );
776  }
777 
778  $tpl->setContent($cgui->getHTML());
779  }
780  }
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...
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
setContent(string $a_html)
Sets content for standard template.
static lookupLevelTitle(int $a_id)
ilGlobalTemplateInterface $tpl
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ create()

ilSkillProfileGUI::create ( )

Definition at line 290 of file class.ilSkillProfileGUI.php.

References $tpl, initProfileForm(), and ILIAS\UICore\GlobalTemplate\setContent().

290  : void
291  {
292  $tpl = $this->tpl;
293 
294  $form = $this->initProfileForm("create");
295  $tpl->setContent($this->ui_ren->render($form));
296  }
setContent(string $a_html)
Sets content for standard template.
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ createLocal()

ilSkillProfileGUI::createLocal ( )

Definition at line 298 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tabs, $tpl, ilTabsGUI\clearTargets(), ilCtrl\getLinkTargetByClass(), initProfileForm(), ilTabsGUI\setBackTarget(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

298  : void
299  {
300  $tpl = $this->tpl;
301  $lng = $this->lng;
302  $ctrl = $this->ctrl;
303  $tabs = $this->tabs;
304 
305  $tabs->clearTargets();
307  $lng->txt("back_to_course"),
308  $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
309  );
310 
311  $form = $this->initProfileForm("createLocal");
312  $tpl->setContent($this->ui_ren->render($form));
313  }
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...
setContent(string $a_html)
Sets content for standard template.
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:

◆ deleteProfiles()

ilSkillProfileGUI::deleteProfiles ( )

Definition at line 506 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, and ilLanguage\txt().

506  : void
507  {
508  $ilCtrl = $this->ctrl;
509  $tpl = $this->tpl;
510  $lng = $this->lng;
511 
512  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
513  return;
514  }
515 
516  if (!empty($this->requested_profile_ids)) {
517  foreach ($this->requested_profile_ids as $i) {
518  $this->profile_manager->delete($i);
519  $this->profile_completion_manager->deleteEntriesForProfile($i);
520  }
521  $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
522  }
523 
524  $ilCtrl->redirect($this, "listProfiles");
525  }
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...
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ edit()

ilSkillProfileGUI::edit ( )

Definition at line 315 of file class.ilSkillProfileGUI.php.

References $tpl, initProfileForm(), ILIAS\UICore\GlobalTemplate\setContent(), and setTabs().

315  : void
316  {
317  $tpl = $this->tpl;
318 
319  $this->setTabs("settings");
320  $form = $this->initProfileForm("edit");
321  $tpl->setContent($this->ui_ren->render($form));
322  }
setContent(string $a_html)
Sets content for standard template.
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ executeCommand()

ilSkillProfileGUI::executeCommand ( )

Definition at line 168 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, and ilLanguage\txt().

168  : void
169  {
170  $ilCtrl = $this->ctrl;
171  $lng = $this->lng;
172 
173  $cmd = $ilCtrl->getCmd("listProfiles");
174  $next_class = $ilCtrl->getNextClass();
175  switch ($next_class) {
176  case 'ilrepositorysearchgui':
177  $user_search = new ilRepositorySearchGUI();
178  $user_search->setTitle($lng->txt('skmg_add_user_to_profile'));
179  $user_search->setCallback($this, 'assignUser');
180  $user_search->setRoleCallback($this, 'assignRole');
181 
182  // Set tabs
183  //$this->tabs_gui->setTabActive('user_assignment');
184  $ilCtrl->setReturn($this, 'showUsers');
185  $ret = $ilCtrl->forwardCommand($user_search);
186  break;
187 
188  default:
189  if (in_array($cmd, array("listProfiles", "create", "edit", "save", "update",
190  "deleteProfiles", "showLevels", "assignLevel",
191  "assignLevelSelectSkill", "updateLevelOfSelectedSkill",
192  "assignLevelToProfile", "updateLevelOfProfile",
193  "confirmLevelAssignmentRemoval", "removeLevelAssignments",
194  "showUsers", "assignUser", "assignRole",
195  "confirmUserRemoval", "removeUsers", "exportProfiles", "showImportForm",
196  "importProfiles", "saveLevelOrder", "createLocal", "saveLocal",
197  "listLocalProfiles", "showLevelsWithLocalContext", "showObjects"))) {
198  $this->$cmd();
199  }
200  break;
201  }
202  }
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...
+ Here is the call graph for this function:

◆ importProfiles()

ilSkillProfileGUI::importProfiles ( )

Definition at line 1056 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, initInputForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

1056  : void
1057  {
1058  $tpl = $this->tpl;
1059  $lng = $this->lng;
1060  $ilCtrl = $this->ctrl;
1061 
1062  $form = $this->initInputForm();
1063  if ($form->checkInput()) {
1064  $imp = new ilImport();
1065  $conf = $imp->getConfig("components/ILIAS/Skill");
1066  $conf->setSkillTreeId($this->skill_tree_id);
1067  $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "components/ILIAS/Skill");
1068 
1069  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1070  $ilCtrl->redirect($this, "");
1071  } else {
1072  $form->setValuesByPost();
1073  $tpl->setContent($form->getHTML());
1074  }
1075  }
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...
Import class.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillProfileGUI::initInputForm ( )

Definition at line 1034 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, ilFileInputGUI\setSuffixes(), and ilLanguage\txt().

Referenced by importProfiles(), and showImportForm().

1035  {
1036  $lng = $this->lng;
1037  $ilCtrl = $this->ctrl;
1038 
1039  $form = new ilPropertyFormGUI();
1040 
1041  $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
1042  $fi->setSuffixes(array("zip"));
1043  $fi->setRequired(true);
1044  $form->addItem($fi);
1045 
1046  // save and cancel commands
1047  $form->addCommandButton("importProfiles", $lng->txt("import"));
1048  $form->addCommandButton("", $lng->txt("cancel"));
1049 
1050  $form->setTitle($lng->txt("import"));
1051  $form->setFormAction($ilCtrl->getFormAction($this));
1052 
1053  return $form;
1054  }
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...
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initProfileForm()

ilSkillProfileGUI::initProfileForm ( string  $a_mode = "edit")

Definition at line 324 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, null, ILIAS\Repository\profile(), ilCtrl\setParameter(), and ilLanguage\txt().

Referenced by create(), createLocal(), edit(), save(), saveLocal(), and update().

324  : \ILIAS\UI\Component\Input\Container\Form\Form
325  {
326  $lng = $this->lng;
327  $ilCtrl = $this->ctrl;
328 
329  $ilCtrl->setParameter(
330  $this,
331  "profile",
332  "profile_settings"
333  );
334 
335  // title
336  $ti = $this->ui_fac->input()->field()->text($lng->txt("title"))
337  ->withRequired(true);
338 
339  // description
340  $desc = $this->ui_fac->input()->field()->textarea($lng->txt("description"));
341 
342  // skill trees (if local profile)
343  $se = null;
344  if ($a_mode == "createLocal") {
345  $options = [];
346  $trees = $this->tree_service->getObjSkillTrees();
347  foreach ($trees as $tree) {
348  $options[$tree->getId()] = $tree->getTitle();
349  }
350  $se = $this->ui_fac->input()->field()->select($lng->txt("skmg_skill_tree"), $options)->withRequired(true);
351  }
352 
353  // image
354  $img = $this->ui_fac->input()->field()->file(new ilSkillProfileUploadHandlerGUI(), $lng->txt("image"))
355  ->withAcceptedMimeTypes([MimeType::IMAGE__PNG, MimeType::IMAGE__JPEG]);
356 
357  // save commands
358  $sec_des = "";
359  $form_action = "";
360  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
361  if ($a_mode == "create") {
362  $sec_des = $lng->txt("skmg_add_profile");
363  $form_action = $ilCtrl->getFormAction($this, "save");
364  } elseif ($a_mode == "createLocal") {
365  $sec_des = $lng->txt("skmg_add_local_profile");
366  $form_action = $ilCtrl->getFormAction($this, "saveLocal");
367  } else {
368  // set values
369  $ti = $ti->withValue($this->profile->getTitle());
370  $desc = $desc->withValue($this->profile->getDescription());
371  $img = $this->profile->getImageId() ? $img->withValue([$this->profile->getImageId()]) : $img;
372 
373  $sec_des = $lng->txt("skmg_edit_profile");
374  $form_action = $ilCtrl->getFormAction($this, "update");
375  }
376  }
377 
378  if (is_null($se)) {
379  $section_basic = $this->ui_fac->input()->field()->section(
380  ["title" => $ti, "description" => $desc],
381  $sec_des
382  );
383  } else {
384  $section_basic = $this->ui_fac->input()->field()->section(
385  ["title" => $ti, "description" => $desc, "skill_tree" => $se],
386  $sec_des
387  );
388  }
389  $section_advanced = $this->ui_fac->input()->field()->section(["image" => $img], $lng->txt("skmg_form_presentation"));
390 
391  $form = $this->ui_fac->input()->container()->form()->standard(
392  $form_action,
393  ["section_basic" => $section_basic, "section_advanced" => $section_advanced]
394  );
395 
396  return $form;
397  }
Class ilSkillProfileUploadHandlerGUI.
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...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listLocalProfiles()

ilSkillProfileGUI::listLocalProfiles ( )

Definition at line 283 of file class.ilSkillProfileGUI.php.

References $ctrl, and ilCtrl\redirectByClass().

283  : void
284  {
285  $ilCtrl = $this->ctrl;
286 
287  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
288  }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ listProfiles()

ilSkillProfileGUI::listProfiles ( )

Definition at line 259 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $toolbar, $tpl, ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

259  : void
260  {
261  $tpl = $this->tpl;
262  $ilToolbar = $this->toolbar;
263  $lng = $this->lng;
264  $ilCtrl = $this->ctrl;
265 
266  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
267  $ilToolbar->addButton(
268  $lng->txt("skmg_add_profile"),
269  $ilCtrl->getLinkTarget($this, "create")
270  );
271 
272  $ilToolbar->addButton(
273  $lng->txt("import"),
274  $ilCtrl->getLinkTarget($this, "showImportForm")
275  );
276  }
277 
278  $table = $this->table_manager->getProfileTable($this->requested_ref_id, $this->skill_tree_id)->getComponent();
279 
280  $tpl->setContent($this->ui_ren->render($table));
281  }
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...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ removeLevelAssignments()

ilSkillProfileGUI::removeLevelAssignments ( )

Definition at line 782 of file class.ilSkillProfileGUI.php.

References $ctrl, $local_context, ILIAS\Repository\int(), and ILIAS\Repository\profile().

782  : void
783  {
784  $ilCtrl = $this->ctrl;
785  $local = $this->local_context;
786 
787  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
788  return;
789  }
790 
791  if (!empty($this->requested_level_ass_ids)) {
792  foreach ($this->requested_level_ass_ids as $i) {
793  $id_arr = explode(":", $i);
794  $level = $this->skill_factory->profile()->profileLevel(
795  $this->profile->getId(),
796  (int) $id_arr[0],
797  (int) $id_arr[1],
798  (int) $id_arr[2],
799  (int) $id_arr[3]
800  );
801  $this->profile_manager->removeSkillLevel($level);
802  }
803  $this->profile_manager->fixSkillOrderNumbering($this->profile->getId());
804  }
805 
806  // profile completion check because of profile editing
807  $this->profile_completion_manager->writeCompletionEntryForAllAssignedUsersOfProfile($this->profile->getId());
808 
809  if ($local) {
810  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
811  }
812  $ilCtrl->redirect($this, "showLevels");
813  }
+ Here is the call graph for this function:

◆ removeUsers()

ilSkillProfileGUI::removeUsers ( )

Definition at line 928 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, ilObject\_lookupType(), ILIAS\Repository\profile(), and ilLanguage\txt().

928  : void
929  {
930  $ilCtrl = $this->ctrl;
931  $lng = $this->lng;
932 
933  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
934  return;
935  }
936 
937  if (!empty($this->requested_user_ids)) {
938  foreach ($this->requested_user_ids as $i) {
939  $type = ilObject::_lookupType($i);
940  switch ($type) {
941  case "usr":
942  $this->profile_manager->removeUserFromProfile($this->profile->getId(), $i);
943  break;
944 
945  case "role":
946  $this->profile_manager->removeRoleFromProfile($this->profile->getId(), $i);
947  break;
948 
949  default:
950  echo "not deleted";
951  }
952  }
953  $this->tpl->setOnScreenMessage("success", $lng->txt("msg_obj_modified"), true);
954  }
955  $ilCtrl->redirect($this, "showUsers");
956  }
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...
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ save()

ilSkillProfileGUI::save ( )

Definition at line 399 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, initProfileForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

399  : void
400  {
401  $tpl = $this->tpl;
402  $lng = $this->lng;
403  $ilCtrl = $this->ctrl;
404 
405  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
406  return;
407  }
408 
409  $form = $this->initProfileForm("create");
410  if ($this->request->getMethod() == "POST"
411  && $this->request->getQueryParams()["profile"] == "profile_settings") {
412  $form = $form->withRequest($this->request);
413  $result = $form->getData();
414  if (is_null($result)) {
415  $tpl->setContent($this->ui_ren->render($form));
416  return;
417  }
418  $profile = $this->skill_factory->profile()->profile(
419  0,
420  $result["section_basic"]["title"],
421  $result["section_basic"]["description"],
422  $this->skill_tree_id,
423  $result["section_advanced"]["image"][0] ?? ""
424  );
425  $this->profile_manager->createProfile($profile);
426 
427  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
428  $ilCtrl->redirect($this, "listProfiles");
429  }
430  $ilCtrl->redirect($this, "listProfiles");
431  }
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...
Profile SkillProfile $profile
setContent(string $a_html)
Sets content for standard template.
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ saveLevelOrder()

ilSkillProfileGUI::saveLevelOrder ( )

Definition at line 815 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $local_context, ILIAS\Repository\profile(), ilArrayUtil\stripSlashesArray(), and ilLanguage\txt().

815  : void
816  {
817  $lng = $this->lng;
818  $ilCtrl = $this->ctrl;
819  $local = $this->local_context;
820 
821  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
822  return;
823  }
824 
825  $order = ilArrayUtil::stripSlashesArray($this->requested_level_order);
826  $this->profile_manager->updateSkillOrder($this->profile->getId(), $order);
827 
828  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
829  if ($local) {
830  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
831  }
832  $ilCtrl->redirect($this, "showLevels");
833  }
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...
static stripSlashesArray(array $a_arr, bool $a_strip_html=true, string $a_allow="")
+ Here is the call graph for this function:

◆ saveLocal()

ilSkillProfileGUI::saveLocal ( )

Definition at line 433 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, ilParticipants\getDefaultMemberRole(), initProfileForm(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

433  : void
434  {
435  $tpl = $this->tpl;
436  $lng = $this->lng;
437  $ilCtrl = $this->ctrl;
438 
439  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
440  return;
441  }
442 
443  $form = $this->initProfileForm("createLocal");
444  if ($this->request->getMethod() == "POST"
445  && $this->request->getQueryParams()["profile"] == "profile_settings") {
446  $form = $form->withRequest($this->request);
447  $result = $form->getData();
448  if (is_null($result)) {
449  $tpl->setContent($this->ui_ren->render($form));
450  return;
451  }
452  $profile = $this->skill_factory->profile()->profile(
453  0,
454  $result["section_basic"]["title"],
455  $result["section_basic"]["description"],
456  (int) $result["section_basic"]["skill_tree"],
457  $result["section_advanced"]["image"][0] ?? "",
458  $this->requested_ref_id
459  );
460  $new_profile = $this->profile_manager->createProfile($profile);
461  $this->profile_manager->addRoleToProfile(
462  $new_profile->getId(),
463  ilParticipants::getDefaultMemberRole($this->requested_ref_id)
464  );
465  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
466  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
467  }
468  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
469  }
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...
Profile SkillProfile $profile
setContent(string $a_html)
Sets content for standard template.
static getDefaultMemberRole(int $a_ref_id)
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ setTabs()

ilSkillProfileGUI::setTabs ( string  $a_active)

Definition at line 204 of file class.ilSkillProfileGUI.php.

References $ctrl, $help, $lng, $tabs, $tpl, ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setDescription(), ILIAS\UICore\GlobalTemplate\setTitle(), and ilLanguage\txt().

Referenced by confirmLevelAssignmentRemoval(), edit(), showLevels(), showObjects(), and showUsers().

204  : void
205  {
206  $ilTabs = $this->tabs;
207  $lng = $this->lng;
208  $ilCtrl = $this->ctrl;
209  $tpl = $this->tpl;
210  $ilHelp = $this->help;
211 
212  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
213  $this->profile->getTitle());
214  $tpl->setDescription($this->profile->getDescription());
215 
216  $ilTabs->clearTargets();
217  $ilHelp->setScreenIdComponent("skmg_prof");
218 
219  $ilCtrl->clearParameterByClass(self::class, "sprof_id");
220  $ilTabs->setBackTarget(
221  $lng->txt("skmg_skill_profiles"),
222  $ilCtrl->getLinkTarget($this, "")
223  );
224  $ilCtrl->setParameter($this, "sprof_id", $this->requested_sprof_id);
225 
226  // levels
227  $ilTabs->addTab(
228  "levels",
229  $lng->txt("skmg_assigned_skill_levels"),
230  $ilCtrl->getLinkTarget($this, "showLevels")
231  );
232 
233  // users
234  $ilTabs->addTab(
235  "users",
236  $lng->txt("skmg_assigned_users"),
237  $ilCtrl->getLinkTarget($this, "showUsers")
238  );
239 
240  // objects
241  $ilTabs->addTab(
242  "objects",
243  $lng->txt("skmg_assigned_objects"),
244  $ilCtrl->getLinkTarget($this, "showObjects")
245  );
246 
247  // settings
248  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
249  $ilTabs->addTab(
250  "settings",
251  $lng->txt("settings"),
252  $ilCtrl->getLinkTarget($this, "edit")
253  );
254  }
255 
256  $ilTabs->activateTab($a_active);
257  }
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...
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
ilGlobalTemplateInterface $tpl
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showImportForm()

ilSkillProfileGUI::showImportForm ( )

Definition at line 1026 of file class.ilSkillProfileGUI.php.

References $tabs, $tpl, initInputForm(), and ILIAS\UICore\GlobalTemplate\setContent().

1026  : void
1027  {
1028  $tpl = $this->tpl;
1029  $ilTabs = $this->tabs;
1030 
1031  $tpl->setContent($this->initInputForm()->getHTML());
1032  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ showLevels()

ilSkillProfileGUI::showLevels ( )

Definition at line 531 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $toolbar, $tpl, ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), setTabs(), and ilLanguage\txt().

531  : void
532  {
533  $tpl = $this->tpl;
534  $ilCtrl = $this->ctrl;
535  $lng = $this->lng;
536  $ilToolbar = $this->toolbar;
537 
538  $this->setTabs("levels");
539 
540  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
541  $ilToolbar->addButton(
542  $lng->txt("skmg_assign_level"),
543  $ilCtrl->getLinkTarget($this, "assignLevel")
544  );
545  }
546 
547  $tab = new ilSkillProfileLevelsTableGUI(
548  $this,
549  "showLevels",
550  $this->profile
551  );
552  $tpl->setContent($tab->getHTML());
553  }
TableGUI class for skill profile levels.
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...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ showLevelsWithLocalContext()

ilSkillProfileGUI::showLevelsWithLocalContext ( )

Definition at line 555 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tabs, $toolbar, $tpl, ilToolbarGUI\addButton(), ilTabsGUI\clearTargets(), ilCtrl\getLinkTarget(), ilCtrl\getLinkTargetByClass(), ILIAS\Repository\profile(), ilTabsGUI\setBackTarget(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

555  : void
556  {
557  $tpl = $this->tpl;
558  $lng = $this->lng;
559  $ctrl = $this->ctrl;
560  $tabs = $this->tabs;
562 
563  $tabs->clearTargets();
565  $lng->txt("back_to_course"),
566  $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
567  );
568 
569  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
571  $lng->txt("skmg_assign_level"),
572  $ctrl->getLinkTarget($this, "assignLevel")
573  );
574  }
575 
576  $tab = new ilSkillProfileLevelsTableGUI(
577  $this,
578  "showLevelsWithLocalContext",
579  $this->profile
580  );
581  $tpl->setContent($tab->getHTML());
582  }
TableGUI class for skill profile levels.
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...
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
addButton(string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:

◆ showObjects()

ilSkillProfileGUI::showObjects ( )

Definition at line 958 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, ilSkillExportConfig\MODE_PROFILES, ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), setTabs(), and ilLanguage\txt().

958  : void
959  {
960  $tpl = $this->tpl;
961 
962  $this->setTabs("objects");
963 
964  $objects = $this->usage_manager->getAssignedObjectsForSkillProfile($this->profile->getId());
965 
966  $table = $this->table_manager->getAssignedObjectsTable(
967  $this,
968  $objects,
969  0,
970  0,
971  $this->profile->getId()
972  )->getComponent();
973  $tpl->setContent($this->ui_ren->render($table));
974  }
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ showUsers()

ilSkillProfileGUI::showUsers ( )

Definition at line 835 of file class.ilSkillProfileGUI.php.

References $lng, $toolbar, $tpl, ILIAS\Repository\ctrl(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ILIAS\Repository\lng(), ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), setTabs(), and ilLanguage\txt().

835  : void
836  {
837  $lng = $this->lng;
838  $tpl = $this->tpl;
839  $ilToolbar = $this->toolbar;
840 
841  // add member
842  if ($this->skill_tree_access_manager->hasManageProfilesPermission() && !$this->profile->getRefId() > 0) {
844  $this,
845  $ilToolbar,
846  array(
847  'auto_complete_name' => $lng->txt('user'),
848  'submit_name' => $lng->txt('skmg_assign_user')
849  )
850  );
851 
852  $ilToolbar->addSeparator();
853 
854  $button = $this->ui_fac->button()->standard(
855  $this->lng->txt("skmg_add_assignment"),
856  $this->ctrl->getLinkTargetByClass("ilRepositorySearchGUI", "start")
857  );
858  $ilToolbar->addComponent($button);
859  }
860 
861  $this->setTabs("users");
862 
863  $table = $this->table_manager->getProfileUserAssignmentTable(
864  $this->profile,
865  $this->skill_tree_access_manager
866  )->getComponent();
867  $tpl->setContent($this->ui_ren->render($table));
868  }
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...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
static fillAutoCompleteToolbar(object $parent_object, ?ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
+ Here is the call graph for this function:

◆ update()

ilSkillProfileGUI::update ( )

Definition at line 471 of file class.ilSkillProfileGUI.php.

References $ctrl, $lng, $tpl, initProfileForm(), ILIAS\Repository\profile(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

471  : void
472  {
473  $lng = $this->lng;
474  $ilCtrl = $this->ctrl;
475  $tpl = $this->tpl;
476 
477  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
478  return;
479  }
480 
481  $form = $this->initProfileForm("edit");
482  if ($this->request->getMethod() == "POST"
483  && $this->request->getQueryParams()["profile"] == "profile_settings") {
484  $form = $form->withRequest($this->request);
485  $result = $form->getData();
486  if (is_null($result)) {
487  $tpl->setContent($this->ui_ren->render($form));
488  return;
489  }
490  $profile = $this->skill_factory->profile()->profile(
491  $this->profile->getId(),
492  $result["section_basic"]["title"],
493  $result["section_basic"]["description"],
494  $this->profile->getSkillTreeId(),
495  $result["section_advanced"]["image"][0] ?? "",
496  $this->profile->getRefId()
497  );
498  $this->profile_manager->updateProfile($profile);
499 
500  $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
501  $ilCtrl->redirect($this, "edit");
502  }
503  $ilCtrl->redirect($this, "listProfiles");
504  }
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...
Profile SkillProfile $profile
setContent(string $a_html)
Sets content for standard template.
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ updateLevelOfProfile()

ilSkillProfileGUI::updateLevelOfProfile ( )

Definition at line 723 of file class.ilSkillProfileGUI.php.

References $parts, $requested_level_id, assignLevelToProfile(), ILIAS\Repository\int(), and ILIAS\Repository\profile().

723  : void
724  {
725  $parts = explode(":", $this->requested_cskill_id);
726  $level = $this->profile_manager->getSkillLevel($this->profile->getId(), (int) $parts[0], (int) $parts[1]);
727  $level_updated = $this->skill_factory->profile()->profileLevel(
728  $level->getProfileId(),
729  $level->getBaseSkillId(),
730  $level->getTrefId(),
732  $level->getOrderNr()
733  );
734  $this->assignLevelToProfile($level_updated);
735  }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61
assignLevelToProfile(?Profile\SkillProfileLevel $level=null)
+ Here is the call graph for this function:

◆ updateLevelOfSelectedSkill()

ilSkillProfileGUI::updateLevelOfSelectedSkill ( )

Definition at line 684 of file class.ilSkillProfileGUI.php.

References assignLevelSelectSkill().

684  : void
685  {
686  $this->assignLevelSelectSkill(true);
687  }
assignLevelSelectSkill(bool $update=false)
Output level table for profile assignment.
+ Here is the call graph for this function:

Field Documentation

◆ $admin_gui_request

SkillAdminGUIRequest ilSkillProfileGUI::$admin_gui_request
protected

Definition at line 61 of file class.ilSkillProfileGUI.php.

◆ $ctrl

◆ $data_factory

DataFactory ilSkillProfileGUI::$data_factory
protected

Definition at line 69 of file class.ilSkillProfileGUI.php.

◆ $df

ILIAS Data Factory ilSkillProfileGUI::$df
protected

Definition at line 53 of file class.ilSkillProfileGUI.php.

◆ $export_factory

ExportFactoryInterface ilSkillProfileGUI::$export_factory
protected

Definition at line 70 of file class.ilSkillProfileGUI.php.

◆ $help

ilHelpGUI ilSkillProfileGUI::$help
protected

Definition at line 49 of file class.ilSkillProfileGUI.php.

Referenced by setTabs().

◆ $id

int ilSkillProfileGUI::$id = 0
protected

Definition at line 56 of file class.ilSkillProfileGUI.php.

Referenced by assignRole(), and assignUser().

◆ $lng

◆ $local_context

bool ilSkillProfileGUI::$local_context = false
protected

◆ $profile

Profile SkillProfile ilSkillProfileGUI::$profile = null
protected

Definition at line 57 of file class.ilSkillProfileGUI.php.

◆ $profile_completion_manager

Profile SkillProfileCompletionManager ilSkillProfileGUI::$profile_completion_manager
protected

Definition at line 66 of file class.ilSkillProfileGUI.php.

◆ $profile_manager

Profile SkillProfileManager ilSkillProfileGUI::$profile_manager
protected

Definition at line 65 of file class.ilSkillProfileGUI.php.

◆ $query

ArrayBasedRequestWrapper ilSkillProfileGUI::$query
protected

Definition at line 55 of file class.ilSkillProfileGUI.php.

◆ $request

ServerRequestInterface ilSkillProfileGUI::$request
protected

Definition at line 54 of file class.ilSkillProfileGUI.php.

◆ $requested_cskill_id

string ilSkillProfileGUI::$requested_cskill_id = ""
protected

Definition at line 78 of file class.ilSkillProfileGUI.php.

◆ $requested_level_ass_ids

array ilSkillProfileGUI::$requested_level_ass_ids = []
protected

Definition at line 83 of file class.ilSkillProfileGUI.php.

◆ $requested_level_id

int ilSkillProfileGUI::$requested_level_id = 0
protected

Definition at line 106 of file class.ilSkillProfileGUI.php.

Referenced by assignLevelToProfile(), and updateLevelOfProfile().

◆ $requested_level_order

array ilSkillProfileGUI::$requested_level_order = []
protected

Definition at line 88 of file class.ilSkillProfileGUI.php.

◆ $requested_local_context

bool ilSkillProfileGUI::$requested_local_context = false
protected

Definition at line 77 of file class.ilSkillProfileGUI.php.

Referenced by __construct().

◆ $requested_profile_ids

array ilSkillProfileGUI::$requested_profile_ids = []
protected

Definition at line 76 of file class.ilSkillProfileGUI.php.

◆ $requested_ref_id

int ilSkillProfileGUI::$requested_ref_id = 0
protected

Definition at line 62 of file class.ilSkillProfileGUI.php.

◆ $requested_sprof_id

int ilSkillProfileGUI::$requested_sprof_id = 0
protected

Definition at line 63 of file class.ilSkillProfileGUI.php.

Referenced by __construct().

◆ $requested_table_profile_action

string ilSkillProfileGUI::$requested_table_profile_action = ""
protected

Definition at line 100 of file class.ilSkillProfileGUI.php.

◆ $requested_table_profile_ids

array ilSkillProfileGUI::$requested_table_profile_ids = []
protected

Definition at line 105 of file class.ilSkillProfileGUI.php.

◆ $requested_user_ids

array ilSkillProfileGUI::$requested_user_ids = []
protected

Definition at line 99 of file class.ilSkillProfileGUI.php.

◆ $requested_user_login

string ilSkillProfileGUI::$requested_user_login = ""
protected

Definition at line 89 of file class.ilSkillProfileGUI.php.

◆ $requested_users

array ilSkillProfileGUI::$requested_users = []
protected

Definition at line 94 of file class.ilSkillProfileGUI.php.

Referenced by assignUser().

◆ $skill_factory

SkillInternalFactoryService ilSkillProfileGUI::$skill_factory
protected

Definition at line 64 of file class.ilSkillProfileGUI.php.

◆ $skill_tree_access_manager

SkillTreeAccess ilSkillProfileGUI::$skill_tree_access_manager
protected

Definition at line 59 of file class.ilSkillProfileGUI.php.

Referenced by __construct().

◆ $skill_tree_id

int ilSkillProfileGUI::$skill_tree_id = 0
protected

Definition at line 60 of file class.ilSkillProfileGUI.php.

Referenced by __construct().

◆ $table_manager

Table TableManager ilSkillProfileGUI::$table_manager
protected

Definition at line 67 of file class.ilSkillProfileGUI.php.

◆ $tabs

◆ $toolbar

ilToolbarGUI ilSkillProfileGUI::$toolbar
protected

◆ $tpl

◆ $tree_service

SkillTreeService ilSkillProfileGUI::$tree_service
protected

Definition at line 58 of file class.ilSkillProfileGUI.php.

◆ $ui_fac

UI Factory ilSkillProfileGUI::$ui_fac
protected

Definition at line 51 of file class.ilSkillProfileGUI.php.

◆ $ui_ren

UI Renderer ilSkillProfileGUI::$ui_ren
protected

Definition at line 52 of file class.ilSkillProfileGUI.php.

◆ $usage_manager

Usage SkillUsageManager ilSkillProfileGUI::$usage_manager
protected

Definition at line 68 of file class.ilSkillProfileGUI.php.

◆ $usr

ilObjUser ilSkillProfileGUI::$usr
protected

Definition at line 71 of file class.ilSkillProfileGUI.php.


The documentation for this class was generated from the following file: