ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillProfileGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
13{
17 protected $ctrl;
18
22 protected $lng;
23
27 protected $tabs;
28
32 protected $tpl;
33
37 protected $help;
38
42 protected $toolbar;
43
44 protected $profile = null;
48 public $access;
52 public $ref_id;
56 public $local_context = false;
57
61 public function __construct()
62 {
63 global $DIC;
64
65 $this->ctrl = $DIC->ctrl();
66 $this->lng = $DIC->language();
67 $this->tabs = $DIC->tabs();
68 $this->tpl = $DIC["tpl"];
69 $this->help = $DIC["ilHelp"];
70 $this->toolbar = $DIC->toolbar();
71 $ilCtrl = $DIC->ctrl();
72 $ilAccess = $DIC->access();
73
74 $ilCtrl->saveParameter($this, ["sprof_id", "local_context"]);
75 $this->access = $ilAccess;
76 $this->ref_id = (int) $_GET["ref_id"];
77
78 if ((int) $_GET["sprof_id"] > 0) {
79 $this->id = (int) $_GET["sprof_id"];
80 }
81
82 if ($this->id > 0) {
83 $this->profile = new ilSkillProfile($this->id);
84 if ($this->profile->getRefId() > 0 && (bool) $_GET["local_context"]) {
85 $this->local_context = true;
86 }
87 }
88 }
89
96 public function checkPermissionBool($a_perm)
97 {
98 return $this->access->checkAccess($a_perm, "", $this->ref_id);
99 }
100
104 public function executeCommand()
105 {
106 $ilCtrl = $this->ctrl;
108
109 $cmd = $ilCtrl->getCmd("listProfiles");
110 $next_class = $ilCtrl->getNextClass();
111 switch ($next_class) {
112 case 'ilrepositorysearchgui':
113 $user_search = new ilRepositorySearchGUI();
114 $user_search->setTitle($lng->txt('skmg_add_user_to_profile'));
115 $user_search->setCallback($this, 'assignUser');
116 $user_search->setRoleCallback($this, 'assignRole');
117
118 // Set tabs
119 //$this->tabs_gui->setTabActive('user_assignment');
120 $ilCtrl->setReturn($this, 'showUsers');
121 $ret = $ilCtrl->forwardCommand($user_search);
122 break;
123
124 default:
125 if (in_array($cmd, array("listProfiles", "create", "edit", "save", "update",
126 "confirmDeleteProfiles", "deleteProfiles", "showLevels", "assignLevel",
127 "assignLevelSelectSkill", "assignLevelToProfile",
128 "confirmLevelAssignmentRemoval", "removeLevelAssignments",
129 "showUsers", "assignUser", "assignRole",
130 "confirmUserRemoval", "removeUsers", "exportProfiles", "showImportForm",
131 "importProfiles", "saveLevelOrder", "createLocal", "saveLocal",
132 "listLocalProfiles", "showLevelsWithLocalContext", "showObjects"))) {
133 $this->$cmd();
134 }
135 break;
136 }
137 }
138
145 public function setTabs($a_active)
146 {
147 $ilTabs = $this->tabs;
149 $ilCtrl = $this->ctrl;
151 $ilHelp = $this->help;
152
153 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
154 $this->profile->getTitle());
155 $tpl->setDescription("");
156
157 $ilTabs->clearTargets();
158 $ilHelp->setScreenIdComponent("skmg_prof");
159
160 $ilTabs->setBackTarget(
161 $lng->txt("back"),
162 $ilCtrl->getLinkTarget($this, "")
163 );
164
165 // levels
166 $ilTabs->addTab(
167 "levels",
168 $lng->txt("skmg_assigned_skill_levels"),
169 $ilCtrl->getLinkTarget($this, "showLevels")
170 );
171
172 // users
173 $ilTabs->addTab(
174 "users",
175 $lng->txt("skmg_assigned_users"),
176 $ilCtrl->getLinkTarget($this, "showUsers")
177 );
178
179 // objects
180 $ilTabs->addTab(
181 "objects",
182 $lng->txt("skmg_assigned_objects"),
183 $ilCtrl->getLinkTarget($this, "showObjects")
184 );
185
186 // settings
187 $ilTabs->addTab(
188 "settings",
189 $lng->txt("settings"),
190 $ilCtrl->getLinkTarget($this, "edit")
191 );
192
193 $ilTabs->activateTab($a_active);
194 }
195
196
200 public function listProfiles()
201 {
203 $ilToolbar = $this->toolbar;
205 $ilCtrl = $this->ctrl;
206
207 if ($this->checkPermissionBool("write")) {
208 $ilToolbar->addButton(
209 $lng->txt("skmg_add_profile"),
210 $ilCtrl->getLinkTarget($this, "create")
211 );
212
213 $ilToolbar->addButton(
214 $lng->txt("import"),
215 $ilCtrl->getLinkTarget($this, "showImportForm")
216 );
217 }
218
219 $tab = new ilSkillProfileTableGUI($this, "listProfiles", $this->checkPermissionBool("write"));
220
221 $tpl->setContent($tab->getHTML());
222 }
223
224 public function listLocalProfiles()
225 {
226 $ilCtrl = $this->ctrl;
227
228 $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
229 }
230
234 public function create()
235 {
237
238 $form = $this->initProfileForm("create");
239 $tpl->setContent($form->getHTML());
240 }
241
242 public function createLocal()
243 {
248
249 $tabs->clearTargets();
250 $tabs->setBackTarget(
251 $lng->txt("back_to_course"),
252 $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
253 );
254
255 $form = $this->initProfileForm("createLocal");
256 $tpl->setContent($form->getHTML());
257 }
258
262 public function edit()
263 {
265
266 $this->setTabs("settings");
267 $form = $this->initProfileForm("edit");
268 $tpl->setContent($form->getHTML());
269 }
270
271
277 public function initProfileForm($a_mode = "edit")
278 {
280 $ilCtrl = $this->ctrl;
281
282 $form = new ilPropertyFormGUI();
283
284 // title
285 $ti = new ilTextInputGUI($lng->txt("title"), "title");
286 $ti->setMaxLength(200);
287 $ti->setSize(40);
288 $ti->setRequired(true);
289 $form->addItem($ti);
290
291 // description
292 $desc = new ilTextAreaInputGUI($lng->txt("description"), "description");
293 $desc->setCols(40);
294 $desc->setRows(4);
295 $form->addItem($desc);
296
297 // save and cancel commands
298 if ($this->checkPermissionBool("write")) {
299 if ($a_mode == "create") {
300 $form->addCommandButton("save", $lng->txt("save"));
301 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
302 $form->setTitle($lng->txt("skmg_add_profile"));
303 } elseif ($a_mode == "createLocal") {
304 $form->addCommandButton("saveLocal", $lng->txt("save"));
305 $form->addCommandButton("listLocalProfiles", $lng->txt("cancel"));
306 $form->setTitle($lng->txt("skmg_add_local_profile"));
307 } else {
308 // set values
309 $ti->setValue($this->profile->getTitle());
310 $desc->setValue($this->profile->getDescription());
311
312 $form->addCommandButton("update", $lng->txt("save"));
313 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
314 $form->setTitle($lng->txt("skmg_edit_profile"));
315 }
316 }
317
318 $form->setFormAction($ilCtrl->getFormAction($this));
319
320 return $form;
321 }
322
326 public function save()
327 {
330 $ilCtrl = $this->ctrl;
331
332 if (!$this->checkPermissionBool("write")) {
333 return;
334 }
335
336 $form = $this->initProfileForm("create");
337 if ($form->checkInput()) {
338 $prof = new ilSkillProfile();
339 $prof->setTitle($form->getInput("title"));
340 $prof->setDescription($form->getInput("description"));
341 $prof->create();
342 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
343 $ilCtrl->redirect($this, "listProfiles");
344 } else {
345 $form->setValuesByPost();
346 $tpl->setContent($form->getHtml());
347 }
348 }
349
350 public function saveLocal()
351 {
354 $ilCtrl = $this->ctrl;
355
356 if (!$this->checkPermissionBool("write")) {
357 return;
358 }
359
360 $form = $this->initProfileForm("createLocal");
361 if ($form->checkInput()) {
362 $prof = new ilSkillProfile();
363 $prof->setTitle($form->getInput("title"));
364 $prof->setDescription($form->getInput("description"));
365 $prof->setRefId($this->ref_id);
366 $prof->create();
367 $prof->addRoleToProfile(ilParticipants::getDefaultMemberRole($this->ref_id));
368 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
369 $ilCtrl->redirectByClass("ilcontskilladmingui", "listProfiles");
370 } else {
371 $form->setValuesByPost();
372 $tpl->setContent($form->getHtml());
373 }
374 }
375
379 public function update()
380 {
382 $ilCtrl = $this->ctrl;
384
385 if (!$this->checkPermissionBool("write")) {
386 return;
387 }
388
389 $form = $this->initProfileForm("edit");
390 if ($form->checkInput()) {
391 $this->profile->setTitle($form->getInput("title"));
392 $this->profile->setDescription($form->getInput("description"));
393 $this->profile->update();
394
395 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
396 $ilCtrl->redirect($this, "listProfiles");
397 } else {
398 $form->setValuesByPost();
399 $tpl->setContent($form->getHtml());
400 }
401 }
402
406 public function confirmDeleteProfiles()
407 {
408 $ilCtrl = $this->ctrl;
411
412 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
413 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
414 $ilCtrl->redirect($this, "listProfiles");
415 } else {
416 $cgui = new ilConfirmationGUI();
417 $cgui->setFormAction($ilCtrl->getFormAction($this));
418 $cgui->setHeaderText($lng->txt("skmg_delete_profiles"));
419 $cgui->setCancel($lng->txt("cancel"), "listProfiles");
420 $cgui->setConfirm($lng->txt("delete"), "deleteProfiles");
421
422 foreach ($_POST["id"] as $i) {
423 $cgui->addItem("id[]", $i, ilSkillProfile::lookupTitle($i));
424 }
425
426 $tpl->setContent($cgui->getHTML());
427 }
428 }
429
433 public function deleteProfiles()
434 {
435 $ilCtrl = $this->ctrl;
438
439 if (!$this->checkPermissionBool("write")) {
440 return;
441 }
442
443 if (is_array($_POST["id"])) {
444 foreach ($_POST["id"] as $i) {
445 $prof = new ilSkillProfile($i);
446 $prof->delete();
447 }
448 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
449 }
450
451 $ilCtrl->redirect($this, "listProfiles");
452 }
453
457
464 public function showLevels()
465 {
467 $ilCtrl = $this->ctrl;
469 $ilToolbar = $this->toolbar;
470
471 $this->setTabs("levels");
472
473 if ($this->checkPermissionBool("write")) {
474 $ilToolbar->addButton(
475 $lng->txt("skmg_assign_level"),
476 $ilCtrl->getLinkTarget($this, "assignLevel")
477 );
478 }
479
481 $this,
482 "showLevels",
483 $this->profile,
484 $this->checkPermissionBool("write")
485 );
486 $tpl->setContent($tab->getHTML());
487 }
488
490 {
496
497 $tabs->clearTargets();
498 $tabs->setBackTarget(
499 $lng->txt("back_to_course"),
500 $ctrl->getLinkTargetByClass("ilcontskilladmingui", "listProfiles")
501 );
502
503 if ($this->checkPermissionBool("write")) {
504 $toolbar->addButton(
505 $lng->txt("skmg_assign_level"),
506 $ctrl->getLinkTarget($this, "assignLevel")
507 );
508 }
509
511 $this,
512 "showLevelsWithLocalContext",
513 $this->profile,
514 $this->checkPermissionBool("write")
515 );
516 $tpl->setContent($tab->getHTML());
517 }
518
522 public function assignLevel()
523 {
525 $ilTabs = $this->tabs;
526 $ilCtrl = $this->ctrl;
528 $local = $this->local_context;
529
530 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
531 $this->profile->getTitle());
532 $tpl->setDescription("");
533
534 //$this->setTabs("levels");
535
536 ilUtil::sendInfo($lng->txt("skmg_select_skill_level_assign"));
537
538 $ilTabs->clearTargets();
539 if ($local) {
540 $ilTabs->setBackTarget(
541 $lng->txt("back"),
542 $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
543 );
544 } else {
545 $ilTabs->setBackTarget(
546 $lng->txt("back"),
547 $ilCtrl->getLinkTarget($this, "showLevels")
548 );
549 }
550
551
552 $exp = new ilSkillSelectorGUI($this, "assignLevel", $this, "assignLevelSelectSkill", "cskill_id");
553 if (!$exp->handleCommand()) {
554 $tpl->setContent($exp->getHTML());
555 }
556 }
557
561 public function assignLevelSelectSkill()
562 {
565 $ilCtrl = $this->ctrl;
566 $ilTabs = $this->tabs;
567 $local = $this->local_context;
568
569 $ilCtrl->saveParameter($this, "cskill_id");
570
571 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
572 $this->profile->getTitle());
573 $tpl->setDescription("");
574
575 $ilTabs->clearTargets();
576 if ($local) {
577 $ilTabs->setBackTarget(
578 $lng->txt("back"),
579 $ilCtrl->getLinkTarget($this, "showLevelsWithLocalContext")
580 );
581 } else {
582 $ilTabs->setBackTarget(
583 $lng->txt("back"),
584 $ilCtrl->getLinkTarget($this, "showLevels")
585 );
586 }
587
589 $this,
590 "assignLevelSelectSkill",
591 $_GET["cskill_id"]
592 );
593 $tpl->setContent($tab->getHTML());
594 }
595
599 public function assignLevelToProfile()
600 {
601 $ilCtrl = $this->ctrl;
603 $local = $this->local_context;
604
605 if (!$this->checkPermissionBool("write")) {
606 return;
607 }
608
609
610 $parts = explode(":", $_GET["cskill_id"]);
611
612 $this->profile->addSkillLevel(
613 (int) $parts[0],
614 (int) $parts[1],
615 (int) $_GET["level_id"],
616 (int) $this->profile->getMaxLevelOrderNr() + 10
617 );
618 $this->profile->update();
619
620 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
621 if ($local) {
622 $ilCtrl->redirect($this, "showLevelsWithLocalContext");
623 }
624 $ilCtrl->redirect($this, "showLevels");
625 }
626
631 {
632 $ilCtrl = $this->ctrl;
636 $local = $this->local_context;
637
638 if ($local) {
639 $tabs->clearTargets();
640 } else {
641 $this->setTabs("levels");
642 }
643
644 if (!is_array($_POST["ass_id"]) || count($_POST["ass_id"]) == 0) {
645 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
646 if ($local) {
647 $ilCtrl->redirect($this, "showLevelsWithLocalContext");
648 }
649 $ilCtrl->redirect($this, "showLevels");
650 } else {
651 $cgui = new ilConfirmationGUI();
652 $cgui->setFormAction($ilCtrl->getFormAction($this));
653 $cgui->setHeaderText($lng->txt("skmg_confirm_remove_level_ass"));
654 if ($local) {
655 $cgui->setCancel($lng->txt("cancel"), "showLevelsWithLocalContext");
656 } else {
657 $cgui->setCancel($lng->txt("cancel"), "showLevels");
658 }
659 $cgui->setConfirm($lng->txt("remove"), "removeLevelAssignments");
660
661 foreach ($_POST["ass_id"] as $i) {
662 $id_arr = explode(":", $i);
663 $cgui->addItem(
664 "ass_id[]",
665 $i,
666 ilBasicSkill::_lookupTitle($id_arr[0]) . ": " .
668 );
669 }
670
671 $tpl->setContent($cgui->getHTML());
672 }
673 }
674
681 public function removeLevelAssignments()
682 {
683 $ilCtrl = $this->ctrl;
684 $local = $this->local_context;
685
686 if (!$this->checkPermissionBool("write")) {
687 return;
688 }
689
690 if (is_array($_POST["ass_id"])) {
691 foreach ($_POST["ass_id"] as $i) {
692 $id_arr = explode(":", $i);
693 $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2], $id_arr[3]);
694 }
695 $this->profile->update();
696 $this->profile->fixSkillOrderNumbering();
697 }
698
699 if ($local) {
700 $ilCtrl->redirect($this, "showLevelsWithLocalContext");
701 }
702 $ilCtrl->redirect($this, "showLevels");
703 }
704
708 public function saveLevelOrder()
709 {
711 $ilCtrl = $this->ctrl;
712 $local = $this->local_context;
713
714 if (!$this->checkPermissionBool("write")) {
715 return;
716 }
717
718 $order = ilUtil::stripSlashesArray($_POST["order"]);
719 $this->profile->updateSkillOrder($order);
720
721 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
722 if ($local) {
723 $ilCtrl->redirect($this, "showLevelsWithLocalContext");
724 }
725 $ilCtrl->redirect($this, "showLevels");
726 }
727
731 public function showUsers()
732 {
735 $ilToolbar = $this->toolbar;
736
737 // add member
738 if ($this->checkPermissionBool("write") && !$this->profile->getRefId() > 0) {
740 $this,
741 $ilToolbar,
742 array(
743 'auto_complete_name' => $lng->txt('user'),
744 'submit_name' => $lng->txt('skmg_assign_user')
745 )
746 );
747
748 $ilToolbar->addSeparator();
749
750 $button = ilLinkButton::getInstance();
751 $button->setCaption("skmg_add_assignment");
752 $button->setUrl($this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start'));
753 $ilToolbar->addButtonInstance($button);
754 }
755
756 $this->setTabs("users");
757
759 $this,
760 "showUsers",
761 $this->profile,
762 $this->checkPermissionBool("write")
763 );
764 $tpl->setContent($tab->getHTML());
765 }
766
773 public function assignUser()
774 {
775 $ilCtrl = $this->ctrl;
777
778 if (!$this->checkPermissionBool("write")) {
779 return;
780 }
781
782 // user assignment with toolbar
783 $user_id = ilObjUser::_lookupId(ilUtil::stripSlashes($_POST["user_login"]));
784 if ($user_id > 0) {
785 $this->profile->addUserToProfile($user_id);
786 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
787 }
788
789 // user assignment with ilRepositorySearchGUI
790 $users = $_POST['user'];
791 if (is_array($users)) {
792 foreach ($users as $id) {
793 if ($id > 0) {
794 $this->profile->addUserToProfile($id);
795 }
796 }
797 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
798 }
799
800 $ilCtrl->redirect($this, "showUsers");
801 }
802
806 public function assignRole(array $role_ids)
807 {
808 $ilCtrl = $this->ctrl;
810
811 if (!$this->checkPermissionBool("write")) {
812 return;
813 }
814
815 $success = false;
816 foreach ($role_ids as $id) {
817 if ($id > 0) {
818 $this->profile->addRoleToProfile($id);
819 $success = true;
820 }
821 }
822 if ($success) {
823 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
824 }
825
826 $ilCtrl->redirect($this, "showUsers");
827 }
828
832 public function confirmUserRemoval()
833 {
834 $ilCtrl = $this->ctrl;
837
838 if (!$this->checkPermissionBool("write")) {
839 return;
840 }
841
842 $this->setTabs("users");
843
844 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
845 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
846 $ilCtrl->redirect($this, "showUsers");
847 } else {
848 $cgui = new ilConfirmationGUI();
849 $cgui->setFormAction($ilCtrl->getFormAction($this));
850 $cgui->setHeaderText($lng->txt("skmg_confirm_user_removal"));
851 $cgui->setCancel($lng->txt("cancel"), "showUsers");
852 $cgui->setConfirm($lng->txt("remove"), "removeUsers");
853
854 foreach ($_POST["id"] as $i) {
856
857 switch ($type) {
858 case 'usr':
860 $cgui->addItem(
861 "id[]",
862 $i,
863 $usr_name
864 );
865 break;
866
867 case 'role':
868 $role_name = ilObjRole::_lookupTitle($i);
869 $cgui->addItem(
870 "id[]",
871 $i,
872 $role_name
873 );
874 break;
875
876 default:
877 echo 'not defined';
878 }
879 }
880
881 $tpl->setContent($cgui->getHTML());
882 }
883 }
884
888 public function removeUsers()
889 {
890 $ilCtrl = $this->ctrl;
892
893 if (!$this->checkPermissionBool("write")) {
894 return;
895 }
896
897 if (is_array($_POST["id"])) {
898 foreach ($_POST["id"] as $i) {
900 switch ($type) {
901 case 'usr':
902 $this->profile->removeUserFromProfile((int) $i);
903 break;
904
905 case 'role':
906 $this->profile->removeRoleFromProfile((int) $i);
907 break;
908
909 default:
910 echo 'not deleted';
911 }
912 }
913 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
914 }
915 $ilCtrl->redirect($this, "showUsers");
916 }
917
921 public function showObjects()
922 {
924
925 $this->setTabs("objects");
926
927 $usage_info = new ilSkillUsage();
928 $objects = $usage_info->getAssignedObjectsForSkillProfile($this->profile->getId());
929
931 $this,
932 "showObjects",
933 $objects
934 );
935 $tpl->setContent($tab->getHTML());
936 }
937
944 public function exportProfiles()
945 {
946 $ilCtrl = $this->ctrl;
948
949 if (!$this->checkPermissionBool("write")) {
950 return;
951 }
952
953 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
954 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
955 $ilCtrl->redirect($this, "");
956 }
957
958 $exp = new ilExport();
959 $conf = $exp->getConfig("Services/Skill");
961 $conf->setSelectedProfiles($_POST["id"]);
962 $exp->exportObject("skmg", ilObject::_lookupObjId((int) $_GET["ref_id"]));
963
964 //ilExport::_createExportDirectory(0, "xml", "");
965 //$export_dir = ilExport::_getExportDirectory($a_id, "xml", $a_type);
966 //$exp->exportEntity("skprof", $_POST["id"], "", "Services/Skill", $a_title, $a_export_dir, "skprof");
967
968 $ilCtrl->redirectByClass(array("iladministrationgui", "ilobjskillmanagementgui", "ilexportgui"), "");
969 }
970
974 public function showImportForm()
975 {
977 $ilTabs = $this->tabs;
978
979 $tpl->setContent($this->initInputForm()->getHTML());
980 }
981
985 public function initInputForm()
986 {
988 $ilCtrl = $this->ctrl;
989
990 $form = new ilPropertyFormGUI();
991
992 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
993 $fi->setSuffixes(array("zip"));
994 $fi->setRequired(true);
995 $form->addItem($fi);
996
997 // save and cancel commands
998 $form->addCommandButton("importProfiles", $lng->txt("import"));
999 $form->addCommandButton("", $lng->txt("cancel"));
1000
1001 $form->setTitle($lng->txt("import"));
1002 $form->setFormAction($ilCtrl->getFormAction($this));
1003
1004 return $form;
1005 }
1006
1010 public function importProfiles()
1011 {
1012 $tpl = $this->tpl;
1013 $lng = $this->lng;
1014 $ilCtrl = $this->ctrl;
1015
1016 $form = $this->initInputForm();
1017 if ($form->checkInput()) {
1018 $imp = new ilImport();
1019 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
1020
1021 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1022 $ilCtrl->redirect($this, "");
1023 } else {
1024 $form->setValuesByPost();
1025 $tpl->setContent($form->getHtml());
1026 }
1027 }
1028}
$success
Definition: Utf8Test.php:86
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
static lookupLevelTitle(int $a_id)
Confirmation screen class.
This class represents a file property in a property form.
Import class.
static getInstance()
Factory.
static _lookupId($a_user_str)
Lookup id by login.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static getDefaultMemberRole($a_ref_id)
This class represents a property form user interface.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
TableGUI class for assigned objects of skills.
TableGUI class for skill profile skill level assignment.
Skill profile GUI class.
confirmLevelAssignmentRemoval()
Confirm level assignment removal.
importProfiles()
Import profiles.
deleteProfiles()
Delete profiles.
executeCommand()
Execute command.
showImportForm()
Show import form.
save()
Save profile form.
assignRole(array $role_ids)
Assign role.
initInputForm()
Init input form.
assignLevelToProfile()
Assign level to profile.
removeLevelAssignments()
Remove level assignment.
checkPermissionBool($a_perm)
Check permission pool.
confirmDeleteProfiles()
Confirm profile deletion.
exportProfiles()
Export profiles.
assignLevelSelectSkill()
Output level table for profile assignment.
confirmUserRemoval()
Confirm user removal.
saveLevelOrder()
Save level order.
showObjects()
Show assigned objects.
showLevels()
Show skill levels.
initProfileForm($a_mode="edit")
Init profile form.
setTabs($a_active)
Set tabs.
TableGUI class for skill profile levels.
TableGUI class for skill profiles.
TableGUI class for skill profile user assignment.
static lookupTitle($a_id)
Lookup title.
Explorer class that works on tree objects (Services/Tree)
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
$i
Definition: metadata.php:24
$ret
Definition: parser.php:6
$type