ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 confirmDeleteProfiles ()
 
 deleteProfiles ()
 
 showLevels ()
 
 showLevelsWithLocalContext ()
 
 assignLevel ()
 
 assignLevelSelectSkill ()
 Output level table for profile assignment. More...
 
 assignLevelToProfile ()
 
 confirmLevelAssignmentRemoval ()
 
 removeLevelAssignments ()
 
 saveLevelOrder ()
 
 showUsers ()
 
 assignUser ()
 
 assignRole (array $role_ids)
 
 confirmUserRemoval ()
 
 removeUsers ()
 
 showObjects ()
 
 exportProfiles ()
 
 showImportForm ()
 
 initInputForm ()
 
 importProfiles ()
 

Protected Member Functions

 checkProfileCompletionForAllAssignedUsers ()
 Write completion entries for a profile for all assigned users of the profile if fulfilment status has changed. More...
 
 checkProfileCompletionForRole (int $a_role_id)
 Write completion entries for a profile for assigned users of a role if fulfilment status has changed. More...
 

Protected Attributes

ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ilGlobalTemplateInterface $tpl
 
ilHelpGUI $help
 
ilToolbarGUI $toolbar
 
Factory $ui_fac
 
Renderer $ui_ren
 
ServerRequestInterface $request
 
int $id = 0
 
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
 
SkillProfileManager $profile_manager
 
SkillProfileCompletionManager $profile_completion_manager
 
array $requested_profile_ids = []
 
bool $requested_local_context = false
 
string $requested_cskill_id = ""
 
int $requested_level_id = 0
 
array $requested_level_ass_ids = []
 
array $requested_level_order = []
 
string $requested_user_login = ""
 
array $requested_users = []
 
array $requested_user_ids = []
 
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 92 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\tabs(), and ILIAS\Repository\toolbar().

93  {
94  global $DIC;
95 
96  $this->ctrl = $DIC->ctrl();
97  $this->lng = $DIC->language();
98  $this->tabs = $DIC->tabs();
99  $this->tpl = $DIC["tpl"];
100  $this->help = $DIC["ilHelp"];
101  $this->toolbar = $DIC->toolbar();
102  $this->ui_fac = $DIC->ui()->factory();
103  $this->ui_ren = $DIC->ui()->renderer();
104  $this->request = $DIC->http()->request();
105  $this->tree_service = $DIC->skills()->tree();
106  $this->skill_tree_access_manager = $skill_tree_access_manager;
107  $this->skill_tree_id = $skill_tree_id;
108  $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
109  $this->skill_factory = $DIC->skills()->internal()->factory();
110  $this->profile_manager = $DIC->skills()->internal()->manager()->getProfileManager();
111  $this->profile_completion_manager = $DIC->skills()->internal()->manager()->getProfileCompletionManager();
112 
113  $this->ctrl->saveParameter($this, ["sprof_id", "local_context"]);
114 
115  $this->requested_ref_id = $this->admin_gui_request->getRefId();
116  $this->requested_sprof_id = $this->admin_gui_request->getSkillProfileId();
117  $this->requested_profile_ids = $this->admin_gui_request->getProfileIds();
118  $this->requested_local_context = $this->admin_gui_request->getLocalContext();
119  $this->requested_cskill_id = $this->admin_gui_request->getCombinedSkillId();
120  $this->requested_level_id = $this->admin_gui_request->getLevelId();
121  $this->requested_level_ass_ids = $this->admin_gui_request->getAssignedLevelIds();
122  $this->requested_level_order = $this->admin_gui_request->getOrder();
123  $this->requested_user_login = $this->admin_gui_request->getUserLogin();
124  $this->requested_users = $this->admin_gui_request->getUsers();
125  $this->requested_user_ids = $this->admin_gui_request->getUserIds();
126 
127  if ($this->requested_sprof_id > 0) {
128  $this->id = $this->requested_sprof_id;
129  }
130 
131  if ($this->id > 0) {
132  $this->profile = $this->profile_manager->getById($this->id);
133  if ($this->skill_tree_id == 0) {
134  $this->skill_tree_id = $this->profile->getSkillTreeId();
135  }
136  if ($this->profile->getRefId() > 0 && $this->requested_local_context) {
137  $this->local_context = true;
138  }
139  }
140  }
SkillTreeAccess $skill_tree_access_manager
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ assignLevel()

ilSkillProfileGUI::assignLevel ( )

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

References $ctrl, $lng, $local_context, $tabs, $tpl, ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), and ilLanguage\txt().

579  : void
580  {
581  $lng = $this->lng;
582  $ilTabs = $this->tabs;
583  $ilCtrl = $this->ctrl;
584  $tpl = $this->tpl;
585  $local = $this->local_context;
586 
587  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
588  $this->profile->getTitle());
589  $tpl->setDescription("");
590 
591  //$this->setTabs("levels");
592 
593  $this->tpl->setOnScreenMessage('info', $lng->txt("skmg_select_skill_level_assign"));
594 
595  $ilTabs->clearTargets();
596  if ($local) {
597  $ilTabs->setBackTarget(
598  $lng->txt("back"),
599  $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
600  );
601  } else {
602  $ilTabs->setBackTarget(
603  $lng->txt("back"),
604  $ilCtrl->getLinkTarget($this, "showLevels")
605  );
606  }
607 
608 
609  $exp = new ilSkillSelectorGUI(
610  $this,
611  "assignLevel",
612  $this,
613  "assignLevelSelectSkill",
614  "cskill_id",
615  $this->skill_tree_id
616  );
617  if (!$exp->handleCommand()) {
618  $tpl->setContent($exp->getHTML());
619  }
620  }
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
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
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 ( )

Output level table for profile assignment.

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

References $ctrl, $lng, $local_context, $tabs, $tpl, ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), and ilLanguage\txt().

625  : void
626  {
627  $tpl = $this->tpl;
628  $lng = $this->lng;
629  $ilCtrl = $this->ctrl;
630  $ilTabs = $this->tabs;
631  $local = $this->local_context;
632 
633  $ilCtrl->saveParameter($this, "cskill_id");
634 
635  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
636  $this->profile->getTitle());
637  $tpl->setDescription("");
638 
639  $ilTabs->clearTargets();
640  if ($local) {
641  $ilTabs->setBackTarget(
642  $lng->txt("back"),
643  $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
644  );
645  } else {
646  $ilTabs->setBackTarget(
647  $lng->txt("back"),
648  $ilCtrl->getLinkTarget($this, "showLevels")
649  );
650  }
651 
653  $this,
654  "assignLevelSelectSkill",
655  $this->requested_cskill_id
656  );
657  $tpl->setContent($tab->getHTML());
658  }
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
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
TableGUI class for skill profile skill level assignment.
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:

◆ assignLevelToProfile()

ilSkillProfileGUI::assignLevelToProfile ( )

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

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

660  : void
661  {
662  $ilCtrl = $this->ctrl;
663  $lng = $this->lng;
664  $local = $this->local_context;
665 
666  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
667  return;
668  }
669 
670 
671  $parts = explode(":", $this->requested_cskill_id);
672 
673  $this->profile->addSkillLevel(
674  (int) $parts[0],
675  (int) $parts[1],
676  $this->requested_level_id,
677  $this->profile_manager->getMaxLevelOrderNr($this->profile->getId()) + 10
678  );
679  $this->profile_manager->updateProfile($this->profile);
680 
681  // profile completion check because of profile editing
683 
684  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
685  if ($local) {
686  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
687  }
688  $ilCtrl->redirect($this, "showLevels");
689  }
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:64
checkProfileCompletionForAllAssignedUsers()
Write completion entries for a profile for all assigned users of the profile if fulfilment status has...
+ Here is the call graph for this function:

◆ assignRole()

ilSkillProfileGUI::assignRole ( array  $role_ids)

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

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

852  : void
853  {
854  $ilCtrl = $this->ctrl;
855  $lng = $this->lng;
856 
857  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
858  return;
859  }
860 
861  $success = false;
862  foreach ($role_ids as $id) {
863  if ($id > 0) {
864  $this->profile_manager->addRoleToProfile($this->profile->getId(), $id);
865  $this->checkProfileCompletionForRole($id);
866  $success = true;
867  }
868  }
869  if ($success) {
870  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
871  }
872 
873  $ilCtrl->redirect($this, "showUsers");
874  }
checkProfileCompletionForRole(int $a_role_id)
Write completion entries for a profile for assigned users of a role if fulfilment status has changed...
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 818 of file class.ilSkillProfileGUI.php.

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

818  : void
819  {
820  $ilCtrl = $this->ctrl;
821  $lng = $this->lng;
822 
823  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
824  return;
825  }
826 
827  // user assignment with toolbar
828  $user_id = ilObjUser::_lookupId($this->requested_user_login);
829  if ($user_id > 0) {
830  $this->profile_manager->addUserToProfile($this->profile->getId(), $user_id);
831  // profile completion check for added user
832  $this->profile_completion_manager->writeCompletionEntryForSingleProfile($user_id, $this->profile->getId());
833  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
834  }
835 
836  // user assignment with ilRepositorySearchGUI
837  $users = $this->requested_users;
838  if (!empty($users)) {
839  foreach ($users as $id) {
840  if ($id > 0) {
841  $this->profile_manager->addUserToProfile($this->profile->getId(), $id);
842  // profile completion check for added user
843  $this->profile_completion_manager->writeCompletionEntryForSingleProfile($id, $this->profile->getId());
844  }
845  }
846  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
847  }
848 
849  $ilCtrl->redirect($this, "showUsers");
850  }
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:

◆ checkProfileCompletionForAllAssignedUsers()

ilSkillProfileGUI::checkProfileCompletionForAllAssignedUsers ( )
protected

Write completion entries for a profile for all assigned users of the profile if fulfilment status has changed.

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

Referenced by assignLevelToProfile(), and removeLevelAssignments().

1058  : void
1059  {
1060  $users = $this->profile_manager->getAssignedUserIdsIncludingRoleAssignments($this->profile->getId());
1061  foreach ($users as $user_id) {
1062  $this->profile_completion_manager->writeCompletionEntryForSingleProfile($user_id, $this->profile->getId());
1063  }
1064  }
+ Here is the caller graph for this function:

◆ checkProfileCompletionForRole()

ilSkillProfileGUI::checkProfileCompletionForRole ( int  $a_role_id)
protected

Write completion entries for a profile for assigned users of a role if fulfilment status has changed.

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

Referenced by assignRole().

1069  : void
1070  {
1071  $r_users = $this->profile_manager->getAssignedUsersForRole($a_role_id);
1072  foreach ($r_users as $user_id) {
1073  $this->profile_completion_manager->writeCompletionEntryForSingleProfile($user_id, $this->profile->getId());
1074  }
1075  }
+ Here is the caller graph for this function:

◆ confirmDeleteProfiles()

ilSkillProfileGUI::confirmDeleteProfiles ( )

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

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

477  : void
478  {
479  $ilCtrl = $this->ctrl;
480  $tpl = $this->tpl;
481  $lng = $this->lng;
482 
483  if (empty($this->requested_profile_ids)) {
484  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
485  $ilCtrl->redirect($this, "listProfiles");
486  } else {
487  $cgui = new ilConfirmationGUI();
488  $cgui->setFormAction($ilCtrl->getFormAction($this));
489  $cgui->setHeaderText($lng->txt("skmg_delete_profiles"));
490  $cgui->setCancel($lng->txt("cancel"), "listProfiles");
491  $cgui->setConfirm($lng->txt("delete"), "deleteProfiles");
492 
493  foreach ($this->requested_profile_ids as $i) {
494  $cgui->addItem("id[]", $i, $this->profile_manager->lookupTitle($i));
495  }
496 
497  $tpl->setContent($cgui->getHTML());
498  }
499  }
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
setContent(string $a_html)
Sets content for standard template.
$i
Definition: metadata.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmLevelAssignmentRemoval()

ilSkillProfileGUI::confirmLevelAssignmentRemoval ( )

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

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

691  : void
692  {
693  $ilCtrl = $this->ctrl;
694  $tpl = $this->tpl;
695  $lng = $this->lng;
696  $tabs = $this->tabs;
697  $local = $this->local_context;
698 
699  if ($local) {
700  $tabs->clearTargets();
701  } else {
702  $this->setTabs("levels");
703  }
704 
705  if (empty($this->requested_level_ass_ids)) {
706  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
707  if ($local) {
708  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
709  }
710  $ilCtrl->redirect($this, "showLevels");
711  } else {
712  $cgui = new ilConfirmationGUI();
713  $cgui->setFormAction($ilCtrl->getFormAction($this));
714  $cgui->setHeaderText($lng->txt("skmg_confirm_remove_level_ass"));
715  if ($local) {
716  $cgui->setCancel($lng->txt("cancel"), "showLevelsWithLocalContext");
717  } else {
718  $cgui->setCancel($lng->txt("cancel"), "showLevels");
719  }
720  $cgui->setConfirm($lng->txt("remove"), "removeLevelAssignments");
721 
722  foreach ($this->requested_level_ass_ids as $i) {
723  $id_arr = explode(":", $i);
724  $cgui->addItem(
725  "ass_id[]",
726  $i,
727  ilBasicSkill::_lookupTitle($id_arr[0]) . ": " .
729  );
730  }
731 
732  $tpl->setContent($cgui->getHTML());
733  }
734  }
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)
static lookupLevelTitle(int $a_id)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
clearTargets()
clear all targets
$i
Definition: metadata.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ confirmUserRemoval()

ilSkillProfileGUI::confirmUserRemoval ( )

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

References $ctrl, $i, $lng, $tpl, $type, ilObject\_lookupTitle(), ilObject\_lookupType(), ilUserUtil\getNamePresentation(), ilGlobalTemplateInterface\setContent(), setTabs(), and ilLanguage\txt().

876  : void
877  {
878  $ilCtrl = $this->ctrl;
879  $tpl = $this->tpl;
880  $lng = $this->lng;
881 
882  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
883  return;
884  }
885 
886  $this->setTabs("users");
887 
888  if (empty($this->requested_user_ids)) {
889  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
890  $ilCtrl->redirect($this, "showUsers");
891  } else {
892  $cgui = new ilConfirmationGUI();
893  $cgui->setFormAction($ilCtrl->getFormAction($this));
894  $cgui->setHeaderText($lng->txt("skmg_confirm_user_removal"));
895  $cgui->setCancel($lng->txt("cancel"), "showUsers");
896  $cgui->setConfirm($lng->txt("remove"), "removeUsers");
897 
898  foreach ($this->requested_user_ids as $i) {
900 
901  switch ($type) {
902  case 'usr':
903  $usr_name = ilUserUtil::getNamePresentation($i);
904  $cgui->addItem(
905  "id[]",
906  $i,
907  $usr_name
908  );
909  break;
910 
911  case 'role':
912  $role_name = ilObjRole::_lookupTitle($i);
913  $cgui->addItem(
914  "id[]",
915  $i,
916  $role_name
917  );
918  break;
919 
920  default:
921  echo 'not defined';
922  }
923  }
924 
925  $tpl->setContent($cgui->getHTML());
926  }
927  }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
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...
$type
ilGlobalTemplateInterface $tpl
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
static _lookupType(int $id, bool $reference=false)
$i
Definition: metadata.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ create()

ilSkillProfileGUI::create ( )

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

References $tpl, initProfileForm(), and ilGlobalTemplateInterface\setContent().

261  : void
262  {
263  $tpl = $this->tpl;
264 
265  $form = $this->initProfileForm("create");
266  $tpl->setContent($this->ui_ren->render($form));
267  }
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ createLocal()

ilSkillProfileGUI::createLocal ( )

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

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

269  : void
270  {
271  $tpl = $this->tpl;
272  $lng = $this->lng;
273  $ctrl = $this->ctrl;
274  $tabs = $this->tabs;
275 
276  $tabs->clearTargets();
278  $lng->txt("back_to_course"),
279  $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
280  );
281 
282  $form = $this->initProfileForm("createLocal");
283  $tpl->setContent($this->ui_ren->render($form));
284  }
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
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...
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ deleteProfiles()

ilSkillProfileGUI::deleteProfiles ( )

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

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

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

◆ edit()

ilSkillProfileGUI::edit ( )

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

References $tpl, initProfileForm(), ilGlobalTemplateInterface\setContent(), and setTabs().

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

◆ executeCommand()

ilSkillProfileGUI::executeCommand ( )

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

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

142  : void
143  {
144  $ilCtrl = $this->ctrl;
145  $lng = $this->lng;
146 
147  $cmd = $ilCtrl->getCmd("listProfiles");
148  $next_class = $ilCtrl->getNextClass();
149  switch ($next_class) {
150  case 'ilrepositorysearchgui':
151  $user_search = new ilRepositorySearchGUI();
152  $user_search->setTitle($lng->txt('skmg_add_user_to_profile'));
153  $user_search->setCallback($this, 'assignUser');
154  $user_search->setRoleCallback($this, 'assignRole');
155 
156  // Set tabs
157  //$this->tabs_gui->setTabActive('user_assignment');
158  $ilCtrl->setReturn($this, 'showUsers');
159  $ret = $ilCtrl->forwardCommand($user_search);
160  break;
161 
162  default:
163  if (in_array($cmd, array("listProfiles", "create", "edit", "save", "update",
164  "confirmDeleteProfiles", "deleteProfiles", "showLevels", "assignLevel",
165  "assignLevelSelectSkill", "assignLevelToProfile",
166  "confirmLevelAssignmentRemoval", "removeLevelAssignments",
167  "showUsers", "assignUser", "assignRole",
168  "confirmUserRemoval", "removeUsers", "exportProfiles", "showImportForm",
169  "importProfiles", "saveLevelOrder", "createLocal", "saveLocal",
170  "listLocalProfiles", "showLevelsWithLocalContext", "showObjects"))) {
171  $this->$cmd();
172  }
173  break;
174  }
175  }
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:

◆ exportProfiles()

ilSkillProfileGUI::exportProfiles ( )

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

References $ctrl, $lng, ilObject\_lookupObjId(), ilSkillExportConfig\MODE_PROFILES, and ilLanguage\txt().

976  : void
977  {
978  $ilCtrl = $this->ctrl;
979  $lng = $this->lng;
980 
981  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
982  return;
983  }
984 
985  if (empty($this->requested_profile_ids)) {
986  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
987  $ilCtrl->redirect($this, "");
988  }
989 
990  $exp = new ilExport();
991  $conf = $exp->getConfig("Services/Skill");
992  $conf->setMode(ilSkillExportConfig::MODE_PROFILES);
993  $conf->setSelectedProfiles($this->requested_profile_ids);
994  $conf->setSkillTreeId($this->skill_tree_id);
995  $exp->exportObject("skmg", ilObject::_lookupObjId($this->requested_ref_id));
996 
997  //ilExport::_createExportDirectory(0, "xml", "");
998  //$export_dir = ilExport::_getExportDirectory($a_id, "xml", $a_type);
999  //$exp->exportEntity("skprof", $_POST["id"], "", "Services/Skill", $a_title, $a_export_dir, "skprof");
1000 
1001  $ilCtrl->redirectByClass(array("ilobjskilltreegui", "ilexportgui"), "");
1002  }
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
+ Here is the call graph for this function:

◆ importProfiles()

ilSkillProfileGUI::importProfiles ( )

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

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

1034  : void
1035  {
1036  $tpl = $this->tpl;
1037  $lng = $this->lng;
1038  $ilCtrl = $this->ctrl;
1039 
1040  $form = $this->initInputForm();
1041  if ($form->checkInput()) {
1042  $imp = new ilImport();
1043  $conf = $imp->getConfig("Services/Skill");
1044  $conf->setSkillTreeId($this->skill_tree_id);
1045  $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
1046 
1047  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1048  $ilCtrl->redirect($this, "");
1049  } else {
1050  $form->setValuesByPost();
1051  $tpl->setContent($form->getHTML());
1052  }
1053  }
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ initInputForm()

ilSkillProfileGUI::initInputForm ( )

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

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

Referenced by importProfiles(), and showImportForm().

1013  {
1014  $lng = $this->lng;
1015  $ilCtrl = $this->ctrl;
1016 
1017  $form = new ilPropertyFormGUI();
1018 
1019  $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
1020  $fi->setSuffixes(array("zip"));
1021  $fi->setRequired(true);
1022  $form->addItem($fi);
1023 
1024  // save and cancel commands
1025  $form->addCommandButton("importProfiles", $lng->txt("import"));
1026  $form->addCommandButton("", $lng->txt("cancel"));
1027 
1028  $form->setTitle($lng->txt("import"));
1029  $form->setFormAction($ilCtrl->getFormAction($this));
1030 
1031  return $form;
1032  }
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 295 of file class.ilSkillProfileGUI.php.

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

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

296  {
297  $lng = $this->lng;
298  $ilCtrl = $this->ctrl;
299 
300  $ilCtrl->setParameter(
301  $this,
302  "profile",
303  "profile_settings"
304  );
305 
306  // title
307  $ti = $this->ui_fac->input()->field()->text($lng->txt("title"))
308  ->withRequired(true);
309 
310  // description
311  $desc = $this->ui_fac->input()->field()->textarea($lng->txt("description"));
312 
313  // skill trees (if local profile)
314  $se = null;
315  if ($a_mode == "createLocal") {
316  $options = [];
317  $trees = $this->tree_service->getObjSkillTrees();
318  foreach ($trees as $tree) {
319  $options[$tree->getId()] = $tree->getTitle();
320  }
321  $se = $this->ui_fac->input()->field()->select($lng->txt("skmg_skill_tree"), $options)->withRequired(true);
322  }
323 
324  // image
325  $img = $this->ui_fac->input()->field()->file(new ilSkillProfileUploadHandlerGUI(), $lng->txt("image"))
326  ->withAcceptedMimeTypes([MimeType::IMAGE__PNG, MimeType::IMAGE__JPEG]);
327 
328  // save commands
329  $sec_des = "";
330  $form_action = "";
331  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
332  if ($a_mode == "create") {
333  $sec_des = $lng->txt("skmg_add_profile");
334  $form_action = $ilCtrl->getFormAction($this, "save");
335  } elseif ($a_mode == "createLocal") {
336  $sec_des = $lng->txt("skmg_add_local_profile");
337  $form_action = $ilCtrl->getFormAction($this, "saveLocal");
338  } else {
339  // set values
340  $ti = $ti->withValue($this->profile->getTitle());
341  $desc = $desc->withValue($this->profile->getDescription());
342  $img = $this->profile->getImageId() ? $img->withValue([$this->profile->getImageId()]) : $img;
343 
344  $sec_des = $lng->txt("skmg_edit_profile");
345  $form_action = $ilCtrl->getFormAction($this, "update");
346  }
347  }
348 
349  if (is_null($se)) {
350  $section_basic = $this->ui_fac->input()->field()->section(
351  ["title" => $ti, "description" => $desc],
352  $sec_des
353  );
354  } else {
355  $section_basic = $this->ui_fac->input()->field()->section(
356  ["title" => $ti, "description" => $desc, "skill_tree" => $se],
357  $sec_des
358  );
359  }
360  $section_advanced = $this->ui_fac->input()->field()->section(["image" => $img], $lng->txt("skmg_form_presentation"));
361 
362  $form = $this->ui_fac->input()->container()->form()->standard(
363  $form_action,
364  ["section_basic" => $section_basic, "section_advanced" => $section_advanced]
365  );
366 
367  return $form;
368  }
This describes commonalities between all forms.
Definition: Form.php:32
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...
$img
Definition: imgupload.php:83
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 254 of file class.ilSkillProfileGUI.php.

References $ctrl, and ilCtrl\redirectByClass().

254  : void
255  {
256  $ilCtrl = $this->ctrl;
257 
258  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
259  }
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 230 of file class.ilSkillProfileGUI.php.

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

230  : void
231  {
232  $tpl = $this->tpl;
233  $ilToolbar = $this->toolbar;
234  $lng = $this->lng;
235  $ilCtrl = $this->ctrl;
236 
237  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
238  $ilToolbar->addButton(
239  $lng->txt("skmg_add_profile"),
240  $ilCtrl->getLinkTarget($this, "create")
241  );
242 
243  $ilToolbar->addButton(
244  $lng->txt("import"),
245  $ilCtrl->getLinkTarget($this, "showImportForm")
246  );
247  }
248 
249  $tab = new ilSkillProfileTableGUI($this, "listProfiles", $this->skill_tree_id);
250 
251  $tpl->setContent($tab->getHTML());
252  }
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...
TableGUI class for skill profiles.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ removeLevelAssignments()

ilSkillProfileGUI::removeLevelAssignments ( )

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

References $ctrl, $i, $local_context, and checkProfileCompletionForAllAssignedUsers().

736  : void
737  {
738  $ilCtrl = $this->ctrl;
739  $local = $this->local_context;
740 
741  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
742  return;
743  }
744 
745  if (!empty($this->requested_level_ass_ids)) {
746  foreach ($this->requested_level_ass_ids as $i) {
747  $id_arr = explode(":", $i);
748  $this->profile->removeSkillLevel((int) $id_arr[0], (int) $id_arr[1], (int) $id_arr[2], (int) $id_arr[3]);
749  }
750  $this->profile_manager->updateProfile($this->profile);
751  $this->profile_manager->fixSkillOrderNumbering($this->profile->getId());
752  }
753 
754  // profile completion check because of profile editing
756 
757  if ($local) {
758  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
759  }
760  $ilCtrl->redirect($this, "showLevels");
761  }
checkProfileCompletionForAllAssignedUsers()
Write completion entries for a profile for all assigned users of the profile if fulfilment status has...
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ removeUsers()

ilSkillProfileGUI::removeUsers ( )

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

References $ctrl, $i, $lng, $type, ilObject\_lookupType(), and ilLanguage\txt().

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

◆ save()

ilSkillProfileGUI::save ( )

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

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

370  : void
371  {
372  $tpl = $this->tpl;
373  $lng = $this->lng;
374  $ilCtrl = $this->ctrl;
375 
376  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
377  return;
378  }
379 
380  $form = $this->initProfileForm("create");
381  if ($this->request->getMethod() == "POST"
382  && $this->request->getQueryParams()["profile"] == "profile_settings") {
383  $form = $form->withRequest($this->request);
384  $result = $form->getData();
385  if (is_null($result)) {
386  $tpl->setContent($this->ui_ren->render($form));
387  return;
388  }
389  $profile = $this->skill_factory->profile(
390  0,
391  $result["section_basic"]["title"],
392  $result["section_basic"]["description"],
393  $this->skill_tree_id,
394  $result["section_advanced"]["image"][0] ?? ""
395  );
396  $this->profile_manager->createProfile($profile);
397 
398  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
399  $ilCtrl->redirect($this, "listProfiles");
400  }
401  $ilCtrl->redirect($this, "listProfiles");
402  }
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...
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ saveLevelOrder()

ilSkillProfileGUI::saveLevelOrder ( )

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

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

763  : void
764  {
765  $lng = $this->lng;
766  $ilCtrl = $this->ctrl;
767  $local = $this->local_context;
768 
769  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
770  return;
771  }
772 
773  $order = ilArrayUtil::stripSlashesArray($this->requested_level_order);
774  $this->profile_manager->updateSkillOrder($this->profile->getId(), $order);
775 
776  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
777  if ($local) {
778  $ilCtrl->redirect($this, "showLevelsWithLocalContext");
779  }
780  $ilCtrl->redirect($this, "showLevels");
781  }
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 404 of file class.ilSkillProfileGUI.php.

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

404  : void
405  {
406  $tpl = $this->tpl;
407  $lng = $this->lng;
408  $ilCtrl = $this->ctrl;
409 
410  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
411  return;
412  }
413 
414  $form = $this->initProfileForm("createLocal");
415  if ($this->request->getMethod() == "POST"
416  && $this->request->getQueryParams()["profile"] == "profile_settings") {
417  $form = $form->withRequest($this->request);
418  $result = $form->getData();
419  if (is_null($result)) {
420  $tpl->setContent($this->ui_ren->render($form));
421  return;
422  }
423  $profile = $this->skill_factory->profile(
424  0,
425  $result["section_basic"]["title"],
426  $result["section_basic"]["description"],
427  $result["section_basic"]["skill_tree"],
428  $result["section_advanced"]["image"][0] ?? "",
429  $this->requested_ref_id
430  );
431  $new_profile = $this->profile_manager->createProfile($profile);
432  $this->profile_manager->addRoleToProfile(
433  $new_profile->getId(),
434  ilParticipants::getDefaultMemberRole($this->requested_ref_id)
435  );
436  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
437  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
438  }
439  $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
440  }
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 getDefaultMemberRole(int $a_ref_id)
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ setTabs()

ilSkillProfileGUI::setTabs ( string  $a_active)

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

References $ctrl, $help, $lng, $tabs, $tpl, ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), and ilLanguage\txt().

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

177  : void
178  {
179  $ilTabs = $this->tabs;
180  $lng = $this->lng;
181  $ilCtrl = $this->ctrl;
182  $tpl = $this->tpl;
183  $ilHelp = $this->help;
184 
185  $tpl->setTitle($lng->txt("skmg_profile") . ": " .
186  $this->profile->getTitle());
187  $tpl->setDescription($this->profile->getDescription());
188 
189  $ilTabs->clearTargets();
190  $ilHelp->setScreenIdComponent("skmg_prof");
191 
192  $ilTabs->setBackTarget(
193  $lng->txt("skmg_skill_profiles"),
194  $ilCtrl->getLinkTarget($this, "")
195  );
196 
197  // levels
198  $ilTabs->addTab(
199  "levels",
200  $lng->txt("skmg_assigned_skill_levels"),
201  $ilCtrl->getLinkTarget($this, "showLevels")
202  );
203 
204  // users
205  $ilTabs->addTab(
206  "users",
207  $lng->txt("skmg_assigned_users"),
208  $ilCtrl->getLinkTarget($this, "showUsers")
209  );
210 
211  // objects
212  $ilTabs->addTab(
213  "objects",
214  $lng->txt("skmg_assigned_objects"),
215  $ilCtrl->getLinkTarget($this, "showObjects")
216  );
217 
218  // settings
219  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
220  $ilTabs->addTab(
221  "settings",
222  $lng->txt("settings"),
223  $ilCtrl->getLinkTarget($this, "edit")
224  );
225  }
226 
227  $ilTabs->activateTab($a_active);
228  }
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
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
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 1004 of file class.ilSkillProfileGUI.php.

References $tabs, $tpl, initInputForm(), and ilGlobalTemplateInterface\setContent().

1004  : void
1005  {
1006  $tpl = $this->tpl;
1007  $ilTabs = $this->tabs;
1008 
1009  $tpl->setContent($this->initInputForm()->getHTML());
1010  }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ showLevels()

ilSkillProfileGUI::showLevels ( )

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

References $ctrl, $lng, $toolbar, $tpl, ilGlobalTemplateInterface\setContent(), setTabs(), and ilLanguage\txt().

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

◆ showLevelsWithLocalContext()

ilSkillProfileGUI::showLevelsWithLocalContext ( )

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

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

550  : void
551  {
552  $tpl = $this->tpl;
553  $lng = $this->lng;
554  $ctrl = $this->ctrl;
555  $tabs = $this->tabs;
557 
558  $tabs->clearTargets();
560  $lng->txt("back_to_course"),
561  $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
562  );
563 
564  if ($this->skill_tree_access_manager->hasManageProfilesPermission()) {
566  $lng->txt("skmg_assign_level"),
567  $ctrl->getLinkTarget($this, "assignLevel")
568  );
569  }
570 
571  $tab = new ilSkillProfileLevelsTableGUI(
572  $this,
573  "showLevelsWithLocalContext",
574  $this->profile
575  );
576  $tpl->setContent($tab->getHTML());
577  }
TableGUI class for skill profile levels.
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
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
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')
setContent(string $a_html)
Sets content for standard template.
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
getLinkTarget(object $a_gui_obj, 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 959 of file class.ilSkillProfileGUI.php.

References $tpl, ilGlobalTemplateInterface\setContent(), and setTabs().

959  : void
960  {
961  $tpl = $this->tpl;
962 
963  $this->setTabs("objects");
964 
965  $usage_info = new ilSkillUsage();
966  $objects = $usage_info->getAssignedObjectsForSkillProfile($this->profile->getId());
967 
969  $this,
970  "showObjects",
971  $objects
972  );
973  $tpl->setContent($tab->getHTML());
974  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
Skill usage.
+ Here is the call graph for this function:

◆ showUsers()

ilSkillProfileGUI::showUsers ( )

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

References $lng, $toolbar, $tpl, ILIAS\Repository\ctrl(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilLinkButton\getInstance(), ilGlobalTemplateInterface\setContent(), setTabs(), and ilLanguage\txt().

783  : void
784  {
785  $lng = $this->lng;
786  $tpl = $this->tpl;
787  $ilToolbar = $this->toolbar;
788 
789  // add member
790  if ($this->skill_tree_access_manager->hasManageProfilesPermission() && !$this->profile->getRefId() > 0) {
792  $this,
793  $ilToolbar,
794  array(
795  'auto_complete_name' => $lng->txt('user'),
796  'submit_name' => $lng->txt('skmg_assign_user')
797  )
798  );
799 
800  $ilToolbar->addSeparator();
801 
802  $button = ilLinkButton::getInstance();
803  $button->setCaption("skmg_add_assignment");
804  $button->setUrl($this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start'));
805  $ilToolbar->addButtonInstance($button);
806  }
807 
808  $this->setTabs("users");
809 
810  $tab = new ilSkillProfileUserTableGUI(
811  $this,
812  "showUsers",
813  $this->profile
814  );
815  $tpl->setContent($tab->getHTML());
816  }
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...
TableGUI class for skill profile user assignment.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
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 442 of file class.ilSkillProfileGUI.php.

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

442  : void
443  {
444  $lng = $this->lng;
445  $ilCtrl = $this->ctrl;
446  $tpl = $this->tpl;
447 
448  if (!$this->skill_tree_access_manager->hasManageProfilesPermission()) {
449  return;
450  }
451 
452  $form = $this->initProfileForm("edit");
453  if ($this->request->getMethod() == "POST"
454  && $this->request->getQueryParams()["profile"] == "profile_settings") {
455  $form = $form->withRequest($this->request);
456  $result = $form->getData();
457  if (is_null($result)) {
458  $tpl->setContent($this->ui_ren->render($form));
459  return;
460  }
461  $profile = $this->skill_factory->profile(
462  $this->profile->getId(),
463  $result["section_basic"]["title"],
464  $result["section_basic"]["description"],
465  $this->profile->getSkillTreeId(),
466  $result["section_advanced"]["image"][0] ?? "",
467  $this->profile->getRefId()
468  );
469  $this->profile_manager->updateProfile($profile);
470 
471  $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
472  $ilCtrl->redirect($this, "edit");
473  }
474  $ilCtrl->redirect($this, "listProfiles");
475  }
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...
initProfileForm(string $a_mode="edit")
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

Field Documentation

◆ $admin_gui_request

SkillAdminGUIRequest ilSkillProfileGUI::$admin_gui_request
protected

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

◆ $ctrl

◆ $help

ilHelpGUI ilSkillProfileGUI::$help
protected

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

Referenced by setTabs().

◆ $id

int ilSkillProfileGUI::$id = 0
protected

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

Referenced by assignRole(), and assignUser().

◆ $lng

◆ $local_context

bool ilSkillProfileGUI::$local_context = false
protected

◆ $profile

SkillProfile ilSkillProfileGUI::$profile = null
protected

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

◆ $profile_completion_manager

SkillProfileCompletionManager ilSkillProfileGUI::$profile_completion_manager
protected

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

◆ $profile_manager

SkillProfileManager ilSkillProfileGUI::$profile_manager
protected

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

◆ $request

ServerRequestInterface ilSkillProfileGUI::$request
protected

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

◆ $requested_cskill_id

string ilSkillProfileGUI::$requested_cskill_id = ""
protected

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

◆ $requested_level_ass_ids

array ilSkillProfileGUI::$requested_level_ass_ids = []
protected

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

◆ $requested_level_id

int ilSkillProfileGUI::$requested_level_id = 0
protected

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

◆ $requested_level_order

array ilSkillProfileGUI::$requested_level_order = []
protected

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

◆ $requested_local_context

bool ilSkillProfileGUI::$requested_local_context = false
protected

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

Referenced by __construct().

◆ $requested_profile_ids

array ilSkillProfileGUI::$requested_profile_ids = []
protected

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

◆ $requested_ref_id

int ilSkillProfileGUI::$requested_ref_id = 0
protected

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

◆ $requested_sprof_id

int ilSkillProfileGUI::$requested_sprof_id = 0
protected

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

Referenced by __construct().

◆ $requested_user_ids

array ilSkillProfileGUI::$requested_user_ids = []
protected

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

◆ $requested_user_login

string ilSkillProfileGUI::$requested_user_login = ""
protected

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

◆ $requested_users

array ilSkillProfileGUI::$requested_users = []
protected

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

Referenced by assignUser().

◆ $skill_factory

SkillInternalFactoryService ilSkillProfileGUI::$skill_factory
protected

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

◆ $skill_tree_access_manager

SkillTreeAccess ilSkillProfileGUI::$skill_tree_access_manager
protected

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

Referenced by __construct().

◆ $skill_tree_id

int ilSkillProfileGUI::$skill_tree_id = 0
protected

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

Referenced by __construct().

◆ $tabs

◆ $toolbar

ilToolbarGUI ilSkillProfileGUI::$toolbar
protected

◆ $tpl

◆ $tree_service

SkillTreeService ilSkillProfileGUI::$tree_service
protected

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

◆ $ui_fac

Factory ilSkillProfileGUI::$ui_fac
protected

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

◆ $ui_ren

Renderer ilSkillProfileGUI::$ui_ren
protected

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


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