ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSkillProfileGUI Class Reference

Skill profile GUI class. More...

+ Collaboration diagram for ilSkillProfileGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 checkPermissionBool ($a_perm)
 Check permission pool. More...
 
 executeCommand ()
 Execute command. More...
 
 setTabs ($a_active)
 Set tabs. More...
 
 listProfiles ()
 List profiles. More...
 
 create ()
 Create. More...
 
 edit ()
 Edit. More...
 
 initProfileForm ($a_mode="edit")
 Init profile form. More...
 
 save ()
 Save profile form. More...
 
 update ()
 Update. More...
 
 confirmDeleteProfiles ()
 Confirm profile deletion. More...
 
 deleteProfiles ()
 Delete profiles. More...
 
 showLevels ()
 Show skill levels. More...
 
 assignLevel ()
 Assign Level. More...
 
 assignLevelSelectSkill ()
 Output level table for profile assignment. More...
 
 assignLevelToProfile ()
 Assign level to profile. More...
 
 confirmLevelAssignmentRemoval ()
 Confirm level assignment removal. More...
 
 removeLevelAssignments ()
 Remove level assignment. More...
 
 showUsers ()
 Show users. More...
 
 assignUser ()
 Assign user. More...
 
 confirmUserRemoval ()
 Confirm user removal. More...
 
 removeUsers ()
 Remove users. More...
 
 exportProfiles ()
 Export profiles. More...
 
 showImportForm ()
 Show import form. More...
 
 initInputForm ()
 Init input form. More...
 
 importProfiles ()
 Import profiles. More...
 

Data Fields

 $access
 
 $ref_id
 

Protected Attributes

 $ctrl
 
 $lng
 
 $tabs
 
 $tpl
 
 $help
 
 $toolbar
 
 $profile = null
 

Detailed Description

Skill profile GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_Calls ilSkillProfileGUI: ilRepositorySearchGUI /

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

Constructor & Destructor Documentation

◆ __construct()

ilSkillProfileGUI::__construct ( )

Constructor.

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

61 {
62 global $DIC;
63
64 $this->ctrl = $DIC->ctrl();
65 $this->lng = $DIC->language();
66 $this->tabs = $DIC->tabs();
67 $this->tpl = $DIC["tpl"];
68 $this->help = $DIC["ilHelp"];
69 $this->toolbar = $DIC->toolbar();
70 $ilCtrl = $DIC->ctrl();
71 $ilAccess = $DIC->access();
72
73 $ilCtrl->saveParameter($this, "sprof_id");
74 $this->access = $ilAccess;
75 $this->ref_id = (int) $_GET["ref_id"];
76
77 if ((int) $_GET["sprof_id"] > 0) {
78 $this->id = (int) $_GET["sprof_id"];
79 }
80
81 if ($this->id > 0) {
82 $this->profile = new ilSkillProfile($this->id);
83 }
84 }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7

References $_GET, $DIC, and $ilCtrl.

Member Function Documentation

◆ assignLevel()

ilSkillProfileGUI::assignLevel ( )

Assign Level.

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

430 {
432 $ilTabs = $this->tabs;
435
436 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
437 $this->profile->getTitle());
438 $tpl->setDescription("");
439
440 //$this->setTabs("levels");
441
442 ilUtil::sendInfo($lng->txt("skmg_select_skill_level_assign"));
443
444 $ilTabs->clearTargets();
445 $ilTabs->setBackTarget(
446 $lng->txt("back"),
447 $ilCtrl->getLinkTarget($this, "showLevels")
448 );
449
450 include_once("./Services/Skill/classes/class.ilSkillSelectorGUI.php");
451 $exp = new ilSkillSelectorGUI($this, "assignLevel", $this, "assignLevelSelectSkill", "cskill_id");
452 if (!$exp->handleCommand()) {
453 $tpl->setContent($exp->getHTML());
454 }
455 }
Explorer class that works on tree objects (Services/Tree)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $ctrl, $ilCtrl, $lng, $tabs, $tpl, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ assignLevelSelectSkill()

ilSkillProfileGUI::assignLevelSelectSkill ( )

Output level table for profile assignment.

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

461 {
465 $ilTabs = $this->tabs;
466
467 $ilCtrl->saveParameter($this, "cskill_id");
468
469 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
470 $this->profile->getTitle());
471 $tpl->setDescription("");
472
473 $ilTabs->clearTargets();
474 $ilTabs->setBackTarget(
475 $lng->txt("back"),
476 $ilCtrl->getLinkTarget($this, "showLevels")
477 );
478
479 include_once("./Services/Skill/classes/class.ilSkillLevelProfileAssignmentTableGUI.php");
481 $this,
482 "assignLevelSelectSkill",
483 $_GET["cskill_id"]
484 );
485 $tpl->setContent($tab->getHTML());
486 }
TableGUI class for skill profile skill level assignment.

References $_GET, $ctrl, $ilCtrl, $lng, $tab, $tabs, and $tpl.

◆ assignLevelToProfile()

ilSkillProfileGUI::assignLevelToProfile ( )

Assign level to profile.

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

492 {
495
496 if (!$this->checkPermissionBool("write")) {
497 return;
498 }
499
500
501 $parts = explode(":", $_GET["cskill_id"]);
502
503 $this->profile->addSkillLevel(
504 (int) $parts[0],
505 (int) $parts[1],
506 (int) $_GET["level_id"]
507 );
508 $this->profile->update();
509
510 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
511 $ilCtrl->redirect($this, "showLevels");
512 }
checkPermissionBool($a_perm)
Check permission pool.

References $_GET, $ctrl, $ilCtrl, $lng, and checkPermissionBool().

+ Here is the call graph for this function:

◆ assignUser()

ilSkillProfileGUI::assignUser ( )

Assign user.

Parameters

return

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

617 {
620
621 if (!$this->checkPermissionBool("write")) {
622 return;
623 }
624
625 $user_id = ilObjUser::_lookupId(ilUtil::stripSlashes($_POST["user_login"]));
626 if ($user_id > 0) {
627 $this->profile->addUserToProfile($user_id);
628 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
629 }
630
631 $ilCtrl->redirect($this, "showUsers");
632 }
$_POST["username"]
static _lookupId($a_user_str)
Lookup id by login.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $ctrl, $ilCtrl, $lng, ilObjUser\_lookupId(), checkPermissionBool(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ checkPermissionBool()

ilSkillProfileGUI::checkPermissionBool (   $a_perm)

Check permission pool.

Parameters
string$a_perm
Returns
bool

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

93 {
94 return $this->access->checkAccess($a_perm, "", $this->ref_id);
95 }

Referenced by assignLevelToProfile(), assignUser(), confirmUserRemoval(), deleteProfiles(), initProfileForm(), listProfiles(), removeLevelAssignments(), removeUsers(), save(), showLevels(), showUsers(), and update().

+ Here is the caller graph for this function:

◆ confirmDeleteProfiles()

ilSkillProfileGUI::confirmDeleteProfiles ( )

Confirm profile deletion.

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

342 {
346
347 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
348 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
349 $ilCtrl->redirect($this, "listProfiles");
350 } else {
351 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
352 $cgui = new ilConfirmationGUI();
353 $cgui->setFormAction($ilCtrl->getFormAction($this));
354 $cgui->setHeaderText($lng->txt("skmg_delete_profiles"));
355 $cgui->setCancel($lng->txt("cancel"), "listProfiles");
356 $cgui->setConfirm($lng->txt("delete"), "deleteProfiles");
357
358 foreach ($_POST["id"] as $i) {
359 $cgui->addItem("id[]", $i, ilSkillProfile::lookupTitle($i));
360 }
361
362 $tpl->setContent($cgui->getHTML());
363 }
364 }
Confirmation screen class.
static lookupTitle($a_id)
Lookup title.
$i
Definition: disco.tpl.php:19

References $_POST, $ctrl, $i, $ilCtrl, $lng, $tpl, ilSkillProfile\lookupTitle(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ confirmLevelAssignmentRemoval()

ilSkillProfileGUI::confirmLevelAssignmentRemoval ( )

Confirm level assignment removal.

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

518 {
522
523 $this->setTabs("levels");
524
525 if (!is_array($_POST["ass_id"]) || count($_POST["ass_id"]) == 0) {
526 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
527 $ilCtrl->redirect($this, "showLevels");
528 } else {
529 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
530 $cgui = new ilConfirmationGUI();
531 $cgui->setFormAction($ilCtrl->getFormAction($this));
532 $cgui->setHeaderText($lng->txt("skmg_confirm_remove_level_ass"));
533 $cgui->setCancel($lng->txt("cancel"), "showLevels");
534 $cgui->setConfirm($lng->txt("remove"), "removeLevelAssignments");
535
536 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
537 foreach ($_POST["ass_id"] as $i) {
538 $id_arr = explode(":", $i);
539 $cgui->addItem(
540 "ass_id[]",
541 $i,
542 ilBasicSkill::_lookupTitle($id_arr[0]) . ": " .
544 );
545 }
546
547 $tpl->setContent($cgui->getHTML());
548 }
549 }
static lookupLevelTitle($a_id)
Lookup level title.
setTabs($a_active)
Set tabs.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.

References $_POST, $ctrl, $i, $ilCtrl, $lng, $tpl, ilSkillTreeNode\_lookupTitle(), ilBasicSkill\lookupLevelTitle(), ilUtil\sendInfo(), and setTabs().

+ Here is the call graph for this function:

◆ confirmUserRemoval()

ilSkillProfileGUI::confirmUserRemoval ( )

Confirm user removal.

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

638 {
642
643 if (!$this->checkPermissionBool("write")) {
644 return;
645 }
646
647 $this->setTabs("users");
648
649 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
650 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
651 $ilCtrl->redirect($this, "showUsers");
652 } else {
653 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
654 $cgui = new ilConfirmationGUI();
655 $cgui->setFormAction($ilCtrl->getFormAction($this));
656 $cgui->setHeaderText($lng->txt("skmg_confirm_user_removal"));
657 $cgui->setCancel($lng->txt("cancel"), "showUsers");
658 $cgui->setConfirm($lng->txt("remove"), "removeUsers");
659
660 foreach ($_POST["id"] as $i) {
662 $cgui->addItem(
663 "id[]",
664 $i,
665 $name["lastname"] . ", " . $name["firstname"] .
666 " [" . $name["login"] . "]"
667 );
668 }
669
670 $tpl->setContent($cgui->getHTML());
671 }
672 }
static _lookupName($a_user_id)
lookup user name

References $_POST, $ctrl, $i, $ilCtrl, $lng, $name, $tpl, ilObjUser\_lookupName(), checkPermissionBool(), ilUtil\sendInfo(), and setTabs().

+ Here is the call graph for this function:

◆ create()

ilSkillProfileGUI::create ( )

Create.

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

216 {
218
219 $form = $this->initProfileForm("create");
220 $tpl->setContent($form->getHTML());
221 }
initProfileForm($a_mode="edit")
Init profile form.
if(isset($_POST['submit'])) $form

References $form, $tpl, and initProfileForm().

+ Here is the call graph for this function:

◆ deleteProfiles()

ilSkillProfileGUI::deleteProfiles ( )

Delete profiles.

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

370 {
374
375 if (!$this->checkPermissionBool("write")) {
376 return;
377 }
378
379 if (is_array($_POST["id"])) {
380 foreach ($_POST["id"] as $i) {
381 $prof = new ilSkillProfile($i);
382 $prof->delete();
383 }
384 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
385 }
386
387 $ilCtrl->redirect($this, "listProfiles");
388 }

References $_POST, $ctrl, $i, $ilCtrl, $lng, $tpl, checkPermissionBool(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ edit()

ilSkillProfileGUI::edit ( )

Edit.

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

227 {
229
230 $this->setTabs("settings");
231 $form = $this->initProfileForm("edit");
232 $tpl->setContent($form->getHTML());
233 }

References $form, $tpl, initProfileForm(), and setTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilSkillProfileGUI::executeCommand ( )

Execute command.

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

101 {
104
105 $cmd = $ilCtrl->getCmd("listProfiles");
106 $next_class = $ilCtrl->getNextClass();
107 switch ($next_class) {
108 case 'ilrepositorysearchgui':
109 include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
110 $user_search = new ilRepositorySearchGUI();
111 $user_search->setTitle($lng->txt('skmg_add_user_to_profile'));
112 $user_search->setCallback($this, 'assignUser');
113
114 // Set tabs
115 //$this->tabs_gui->setTabActive('user_assignment');
116 $ilCtrl->setReturn($this, 'listUsers');
117 $ret = $ilCtrl->forwardCommand($user_search);
118 break;
119
120 default:
121 if (in_array($cmd, array("listProfiles", "create", "edit", "save", "update",
122 "confirmDeleteProfiles", "deleteProfiles", "showLevels", "assignLevel",
123 "assignLevelSelectSkill", "assignLevelToProfile",
124 "confirmLevelAssignmentRemoval", "removeLevelAssignments",
125 "showUsers", "assignUser",
126 "confirmUserRemoval", "removeUsers", "exportProfiles", "showImportForm", "importProfiles"))) {
127 $this->$cmd();
128 }
129 break;
130 }
131 }
$ret
Definition: parser.php:6

References $ctrl, $ilCtrl, $lng, and $ret.

◆ exportProfiles()

ilSkillProfileGUI::exportProfiles ( )

Export profiles.

Parameters

return

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

702 {
704
705 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) {
706 $ilCtrl->redirect($this, "");
707 }
708
709 include_once("./Services/Export/classes/class.ilExport.php");
710 $exp = new ilExport();
711 $conf = $exp->getConfig("Services/Skill");
713 $conf->setSelectedProfiles($_POST["id"]);
714 $exp->exportObject("skmg", ilObject::_lookupObjId((int) $_GET["ref_id"]));
715
716 //ilExport::_createExportDirectory(0, "xml", "");
717 //$export_dir = ilExport::_getExportDirectory($a_id, "xml", $a_type);
718 //$exp->exportEntity("skprof", $_POST["id"], "", "Services/Skill", $a_title, $a_export_dir, "skprof");
719
720 $ilCtrl->redirectByClass(array("iladministrationgui", "ilobjskillmanagementgui", "ilexportgui"), "");
721 }
static _lookupObjId($a_id)

References $_GET, $_POST, $ctrl, $ilCtrl, ilObject\_lookupObjId(), and ilSkillExportConfig\MODE_PROFILES.

+ Here is the call graph for this function:

◆ importProfiles()

ilSkillProfileGUI::importProfiles ( )

Import profiles.

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

765 {
769 $ilTabs = $this->tabs;
770
771 $form = $this->initInputForm();
772 if ($form->checkInput()) {
773 include_once("./Services/Export/classes/class.ilImport.php");
774 $imp = new ilImport();
775 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
776
777 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
778 $ilCtrl->redirect($this, "");
779 } else {
780 $form->setValuesByPost();
781 $tpl->setContent($form->getHtml());
782 }
783 }
Import class.
initInputForm()
Init input form.

References $ctrl, $form, $ilCtrl, $lng, $tabs, $tpl, and initInputForm().

+ Here is the call graph for this function:

◆ initInputForm()

ilSkillProfileGUI::initInputForm ( )

Init input form.

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

738 {
741
742 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
743 $form = new ilPropertyFormGUI();
744
745 include_once("./Services/Form/classes/class.ilFileInputGUI.php");
746 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
747 $fi->setSuffixes(array("zip"));
748 $fi->setRequired(true);
749 $form->addItem($fi);
750
751 // save and cancel commands
752 $form->addCommandButton("importProfiles", $lng->txt("import"));
753 $form->addCommandButton("", $lng->txt("cancel"));
754
755 $form->setTitle($lng->txt("import"));
756 $form->setFormAction($ilCtrl->getFormAction($this));
757
758 return $form;
759 }
This class represents a file property in a property form.
This class represents a property form user interface.

References $ctrl, $form, $ilCtrl, and $lng.

Referenced by importProfiles(), and showImportForm().

+ Here is the caller graph for this function:

◆ initProfileForm()

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

Init profile form.

Parameters
string$a_modeedit mode

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

242 {
245
246 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
247 $form = new ilPropertyFormGUI();
248
249 // title
250 $ti = new ilTextInputGUI($lng->txt("title"), "title");
251 $ti->setMaxLength(200);
252 $ti->setSize(40);
253 $ti->setRequired(true);
254 $form->addItem($ti);
255
256 // description
257 $desc = new ilTextAreaInputGUI($lng->txt("description"), "description");
258 $desc->setCols(40);
259 $desc->setRows(4);
260 $form->addItem($desc);
261
262 // save and cancel commands
263 if ($this->checkPermissionBool("write")) {
264 if ($a_mode == "create") {
265 $form->addCommandButton("save", $lng->txt("save"));
266 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
267 $form->setTitle($lng->txt("skmg_add_profile"));
268 } else {
269 // set values
270 $ti->setValue($this->profile->getTitle());
271 $desc->setValue($this->profile->getDescription());
272
273 $form->addCommandButton("update", $lng->txt("save"));
274 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
275 $form->setTitle($lng->txt("skmg_edit_profile"));
276 }
277 }
278
279 $form->setFormAction($ilCtrl->getFormAction($this));
280
281 return $form;
282 }
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $ctrl, $form, $ilCtrl, $lng, and checkPermissionBool().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listProfiles()

ilSkillProfileGUI::listProfiles ( )

List profiles.

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

188 {
190 $ilToolbar = $this->toolbar;
193
194 if ($this->checkPermissionBool("write")) {
195 $ilToolbar->addButton(
196 $lng->txt("skmg_add_profile"),
197 $ilCtrl->getLinkTarget($this, "create")
198 );
199
200 $ilToolbar->addButton(
201 $lng->txt("import"),
202 $ilCtrl->getLinkTarget($this, "showImportForm")
203 );
204 }
205
206 include_once("./Services/Skill/classes/class.ilSkillProfileTableGUI.php");
207 $tab = new ilSkillProfileTableGUI($this, "listProfiles", $this->checkPermissionBool("write"));
208
209 $tpl->setContent($tab->getHTML());
210 }
TableGUI class for skill profiles.

References $ctrl, $ilCtrl, $lng, $tab, $toolbar, $tpl, and checkPermissionBool().

+ Here is the call graph for this function:

◆ removeLevelAssignments()

ilSkillProfileGUI::removeLevelAssignments ( )

Remove level assignment.

Parameters

return

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

558 {
560
561 if (!$this->checkPermissionBool("write")) {
562 return;
563 }
564
565 if (is_array($_POST["ass_id"])) {
566 foreach ($_POST["ass_id"] as $i) {
567 $id_arr = explode(":", $i);
568 $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2]);
569 }
570 $this->profile->update();
571 }
572
573 $ilCtrl->redirect($this, "showLevels");
574 }

References $_POST, $ctrl, $i, $ilCtrl, and checkPermissionBool().

+ Here is the call graph for this function:

◆ removeUsers()

ilSkillProfileGUI::removeUsers ( )

Remove users.

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

678 {
681
682 if (!$this->checkPermissionBool("write")) {
683 return;
684 }
685
686 if (is_array($_POST["id"])) {
687 foreach ($_POST["id"] as $i) {
688 $this->profile->removeUserFromProfile((int) $i);
689 }
690 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
691 }
692 $ilCtrl->redirect($this, "showUsers");
693 }

References $_POST, $ctrl, $i, $ilCtrl, $lng, and checkPermissionBool().

+ Here is the call graph for this function:

◆ save()

ilSkillProfileGUI::save ( )

Save profile form.

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

288 {
292
293 if (!$this->checkPermissionBool("write")) {
294 return;
295 }
296
297 $form = $this->initProfileForm("create");
298 if ($form->checkInput()) {
299 $prof = new ilSkillProfile();
300 $prof->setTitle($form->getInput("title"));
301 $prof->setDescription($form->getInput("description"));
302 $prof->create();
303 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
304 $ilCtrl->redirect($this, "listProfiles");
305 } else {
306 $form->setValuesByPost();
307 $tpl->setContent($form->getHtml());
308 }
309 }

References $ctrl, $form, $ilCtrl, $lng, $tpl, checkPermissionBool(), and initProfileForm().

+ Here is the call graph for this function:

◆ setTabs()

ilSkillProfileGUI::setTabs (   $a_active)

Set tabs.

Parameters

return

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

140 {
141 $ilTabs = $this->tabs;
145 $ilHelp = $this->help;
146
147 $tpl->setTitle($lng->txt("skmg_profile") . ": " .
148 $this->profile->getTitle());
149 $tpl->setDescription("");
150
151 $ilTabs->clearTargets();
152 $ilHelp->setScreenIdComponent("skmg_prof");
153
154 $ilTabs->setBackTarget(
155 $lng->txt("back"),
156 $ilCtrl->getLinkTarget($this, "")
157 );
158
159 // users
160 $ilTabs->addTab(
161 "users",
162 $lng->txt("skmg_assigned_users"),
163 $ilCtrl->getLinkTarget($this, "showUsers")
164 );
165
166 // levels
167 $ilTabs->addTab(
168 "levels",
169 $lng->txt("skmg_assigned_skill_levels"),
170 $ilCtrl->getLinkTarget($this, "showLevels")
171 );
172
173 // settings
174 $ilTabs->addTab(
175 "settings",
176 $lng->txt("settings"),
177 $ilCtrl->getLinkTarget($this, "edit")
178 );
179
180 $ilTabs->activateTab($a_active);
181 }

References $ctrl, $help, $ilCtrl, $lng, $tabs, and $tpl.

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

+ Here is the caller graph for this function:

◆ showImportForm()

ilSkillProfileGUI::showImportForm ( )

Show import form.

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

727 {
729 $ilTabs = $this->tabs;
730
731 $tpl->setContent($this->initInputForm()->getHTML());
732 }

References $tabs, $tpl, and initInputForm().

+ Here is the call graph for this function:

◆ showLevels()

ilSkillProfileGUI::showLevels ( )

Show skill levels.

Parameters

return

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

401 {
405 $ilToolbar = $this->toolbar;
406
407 $this->setTabs("levels");
408
409 if ($this->checkPermissionBool("write")) {
410 $ilToolbar->addButton(
411 $lng->txt("skmg_assign_level"),
412 $ilCtrl->getLinkTarget($this, "assignLevel")
413 );
414 }
415
416 include_once("./Services/Skill/classes/class.ilSkillProfileLevelsTableGUI.php");
418 $this,
419 "showLevels",
420 $this->profile,
421 $this->checkPermissionBool("write")
422 );
423 $tpl->setContent($tab->getHTML());
424 }
TableGUI class for skill profile levels.

References $ctrl, $ilCtrl, $lng, $tab, $toolbar, $tpl, checkPermissionBool(), and setTabs().

+ Here is the call graph for this function:

◆ showUsers()

ilSkillProfileGUI::showUsers ( )

Show users.

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

580 {
583 $ilToolbar = $this->toolbar;
584
585 // add member
586 if ($this->checkPermissionBool("write")) {
587 include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
589 $this,
590 $ilToolbar,
591 array(
592 'auto_complete_name' => $lng->txt('user'),
593 'submit_name' => $lng->txt('skmg_assign_user')
594 )
595 );
596 }
597
598 $this->setTabs("users");
599
600 include_once("./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php");
602 $this,
603 "showUsers",
604 $this->profile,
605 $this->checkPermissionBool("write")
606 );
607 $tpl->setContent($tab->getHTML());
608 }
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
TableGUI class for skill profile user assignment.

References $lng, $tab, $toolbar, $tpl, checkPermissionBool(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), and setTabs().

+ Here is the call graph for this function:

◆ update()

ilSkillProfileGUI::update ( )

Update.

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

315 {
319
320 if (!$this->checkPermissionBool("write")) {
321 return;
322 }
323
324 $form = $this->initProfileForm("edit");
325 if ($form->checkInput()) {
326 $this->profile->setTitle($form->getInput("title"));
327 $this->profile->setDescription($form->getInput("description"));
328 $this->profile->update();
329
330 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
331 $ilCtrl->redirect($this, "listProfiles");
332 } else {
333 $form->setValuesByPost();
334 $tpl->setContent($form->getHtml());
335 }
336 }

References $ctrl, $form, $ilCtrl, $lng, $tpl, checkPermissionBool(), initProfileForm(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilSkillProfileGUI::$access

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

◆ $ctrl

◆ $help

ilSkillProfileGUI::$help
protected

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

Referenced by setTabs().

◆ $lng

◆ $profile

ilSkillProfileGUI::$profile = null
protected

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

◆ $ref_id

ilSkillProfileGUI::$ref_id

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

◆ $tabs

ilSkillProfileGUI::$tabs
protected

◆ $toolbar

ilSkillProfileGUI::$toolbar
protected

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

Referenced by listProfiles(), showLevels(), and showUsers().

◆ $tpl


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