ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

 $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 30 of file class.ilSkillProfileGUI.php.

31 {
32 global $ilCtrl, $ilAccess;
33
34 $ilCtrl->saveParameter($this, "sprof_id");
35 $this->access = $ilAccess;
36 $this->ref_id = (int) $_GET["ref_id"];
37
38 if ((int) $_GET["sprof_id"] > 0)
39 {
40 $this->id = (int) $_GET["sprof_id"];
41 }
42
43 if ($this->id > 0)
44 {
45 $this->profile = new ilSkillProfile($this->id);
46 }
47 }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

References $_GET, and $ilCtrl.

Member Function Documentation

◆ assignLevel()

ilSkillProfileGUI::assignLevel ( )

Assign Level.

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

377 {
378 global $lng, $ilTabs, $ilCtrl, $tpl;
379
380 $tpl->setTitle($lng->txt("skmg_profile").": ".
381 $this->profile->getTitle());
382 $tpl->setDescription("");
383
384 //$this->setTabs("levels");
385
386 ilUtil::sendInfo($lng->txt("skmg_select_skill_level_assign"));
387
388 $ilTabs->clearTargets();
389 $ilTabs->setBackTarget($lng->txt("back"),
390 $ilCtrl->getLinkTarget($this, "showLevels"));
391
392 include_once("./Services/Skill/classes/class.ilSkillSelectorGUI.php");
393 $exp = new ilSkillSelectorGUI($this, "assignLevel", $this, "assignLevelSelectSkill", "cskill_id");
394 if (!$exp->handleCommand())
395 {
396 $tpl->setContent($exp->getHTML());
397 }
398 }
global $tpl
Definition: ilias.php:8
Explorer class that works on tree objects (Services/Tree)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $lng
Definition: privfeed.php:17

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

+ Here is the call graph for this function:

◆ assignLevelSelectSkill()

ilSkillProfileGUI::assignLevelSelectSkill ( )

Output level table for profile assignment.

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

404 {
405 global $tpl, $lng, $ilCtrl, $ilTabs;
406
407 $ilCtrl->saveParameter($this, "cskill_id");
408
409 $tpl->setTitle($lng->txt("skmg_profile").": ".
410 $this->profile->getTitle());
411 $tpl->setDescription("");
412
413 $ilTabs->clearTargets();
414 $ilTabs->setBackTarget($lng->txt("back"),
415 $ilCtrl->getLinkTarget($this, "showLevels"));
416
417 include_once("./Services/Skill/classes/class.ilSkillLevelProfileAssignmentTableGUI.php");
418 $tab = new ilSkillLevelProfileAssignmentTableGUI($this, "assignLevelSelectSkill",
419 $_GET["cskill_id"]);
420 $tpl->setContent($tab->getHTML());
421 }
TableGUI class for skill profile skill level assignment.

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

◆ assignLevelToProfile()

ilSkillProfileGUI::assignLevelToProfile ( )

Assign level to profile.

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

427 {
428 global $ilCtrl, $lng;
429
430 if (!$this->checkPermissionBool("write"))
431 {
432 return;
433 }
434
435
436 $parts = explode(":", $_GET["cskill_id"]);
437
438 $this->profile->addSkillLevel((int) $parts[0],
439 (int) $parts[1], (int) $_GET["level_id"]);
440 $this->profile->update();
441
442 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
443 $ilCtrl->redirect($this, "showLevels");
444 }
checkPermissionBool($a_perm)
Check permission pool.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $_GET, $ilCtrl, $lng, checkPermissionBool(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ assignUser()

ilSkillProfileGUI::assignUser ( )

Assign user.

Parameters

return

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

543 {
544 global $ilCtrl, $lng;
545
546 if (!$this->checkPermissionBool("write"))
547 {
548 return;
549 }
550
551 $user_id = ilObjUser::_lookupId(ilUtil::stripSlashes($_POST["user_login"]));
552 if ($user_id > 0)
553 {
554 $this->profile->addUserToProfile($user_id);
555 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
556 }
557
558 $ilCtrl->redirect($this, "showUsers");
559 }
$_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, $ilCtrl, $lng, ilObjUser\_lookupId(), checkPermissionBool(), ilUtil\sendSuccess(), 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 55 of file class.ilSkillProfileGUI.php.

56 {
57 return $this->access->checkAccess($a_perm, "", $this->ref_id);
58 }

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

+ Here is the caller graph for this function:

◆ confirmDeleteProfiles()

ilSkillProfileGUI::confirmDeleteProfiles ( )

Confirm profile deletion.

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

294 {
295 global $ilCtrl, $tpl, $lng;
296
297 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
298 {
299 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
300 $ilCtrl->redirect($this, "listProfiles");
301 }
302 else
303 {
304 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
305 $cgui = new ilConfirmationGUI();
306 $cgui->setFormAction($ilCtrl->getFormAction($this));
307 $cgui->setHeaderText($lng->txt("skmg_delete_profiles"));
308 $cgui->setCancel($lng->txt("cancel"), "listProfiles");
309 $cgui->setConfirm($lng->txt("delete"), "deleteProfiles");
310
311 foreach ($_POST["id"] as $i)
312 {
313 $cgui->addItem("id[]", $i, ilSkillProfile::lookupTitle($i));
314 }
315
316 $tpl->setContent($cgui->getHTML());
317 }
318 }
Confirmation screen class.
static lookupTitle($a_id)
Lookup title.

References $_POST, $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 449 of file class.ilSkillProfileGUI.php.

450 {
451 global $ilCtrl, $tpl, $lng;
452
453 $this->setTabs("levels");
454
455 if (!is_array($_POST["ass_id"]) || count($_POST["ass_id"]) == 0)
456 {
457 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
458 $ilCtrl->redirect($this, "showLevels");
459 }
460 else
461 {
462 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
463 $cgui = new ilConfirmationGUI();
464 $cgui->setFormAction($ilCtrl->getFormAction($this));
465 $cgui->setHeaderText($lng->txt("skmg_confirm_remove_level_ass"));
466 $cgui->setCancel($lng->txt("cancel"), "showLevels");
467 $cgui->setConfirm($lng->txt("remove"), "removeLevelAssignments");
468
469 include_once("./Services/Skill/classes/class.ilBasicSkill.php");
470 foreach ($_POST["ass_id"] as $i)
471 {
472 $id_arr = explode(":", $i);
473 $cgui->addItem("ass_id[]", $i,
474 ilBasicSkill::_lookupTitle($id_arr[0]).": ".
476 }
477
478 $tpl->setContent($cgui->getHTML());
479 }
480 }
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, $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 564 of file class.ilSkillProfileGUI.php.

565 {
566 global $ilCtrl, $tpl, $lng;
567
568 if (!$this->checkPermissionBool("write"))
569 {
570 return;
571 }
572
573 $this->setTabs("users");
574
575 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
576 {
577 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
578 $ilCtrl->redirect($this, "showUsers");
579 }
580 else
581 {
582 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
583 $cgui = new ilConfirmationGUI();
584 $cgui->setFormAction($ilCtrl->getFormAction($this));
585 $cgui->setHeaderText($lng->txt("skmg_confirm_user_removal"));
586 $cgui->setCancel($lng->txt("cancel"), "showUsers");
587 $cgui->setConfirm($lng->txt("remove"), "removeUsers");
588
589 foreach ($_POST["id"] as $i)
590 {
591 $name = ilObjUser::_lookupName($i);
592 $cgui->addItem("id[]", $i,
593 $name["lastname"].", ".$name["firstname"].
594 " [".$name["login"]."]");
595 }
596
597 $tpl->setContent($cgui->getHTML());
598 }
599 }
static _lookupName($a_user_id)
lookup user name

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

+ Here is the call graph for this function:

◆ create()

ilSkillProfileGUI::create ( )

Create.

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

162 {
163 global $tpl;
164
165 $form = $this->initProfileForm("create");
166 $tpl->setContent($form->getHTML());
167 }
initProfileForm($a_mode="edit")
Init profile form.

References $tpl, and initProfileForm().

+ Here is the call graph for this function:

◆ deleteProfiles()

ilSkillProfileGUI::deleteProfiles ( )

Delete profiles.

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

324 {
325 global $ilCtrl, $tpl, $lng;
326
327 if (!$this->checkPermissionBool("write"))
328 {
329 return;
330 }
331
332 if (is_array($_POST["id"]))
333 {
334 foreach ($_POST["id"] as $i)
335 {
336 $prof = new ilSkillProfile($i);
337 $prof->delete();
338 }
339 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
340 }
341
342 $ilCtrl->redirect($this, "listProfiles");
343 }

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

+ Here is the call graph for this function:

◆ edit()

ilSkillProfileGUI::edit ( )

Edit.

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

173 {
174 global $tpl;
175
176 $this->setTabs("settings");
177 $form = $this->initProfileForm("edit");
178 $tpl->setContent($form->getHTML());
179 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ilSkillProfileGUI::executeCommand ( )

Execute command.

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

64 {
65 global $ilCtrl, $lng;
66
67 $cmd = $ilCtrl->getCmd("listProfiles");
68 $next_class = $ilCtrl->getNextClass();
69 switch($next_class)
70 {
71 case 'ilrepositorysearchgui':
72 include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
73 $user_search = new ilRepositorySearchGUI();
74 $user_search->setTitle($lng->txt('skmg_add_user_to_profile'));
75 $user_search->setCallback($this, 'assignUser');
76
77 // Set tabs
78 //$this->tabs_gui->setTabActive('user_assignment');
79 $ilCtrl->setReturn($this, 'listUsers');
80 $ret = $ilCtrl->forwardCommand($user_search);
81 break;
82
83 default:
84 if (in_array($cmd, array("listProfiles", "create", "edit", "save", "update",
85 "confirmDeleteProfiles", "deleteProfiles", "showLevels", "assignLevel",
86 "assignLevelSelectSkill", "assignLevelToProfile",
87 "confirmLevelAssignmentRemoval", "removeLevelAssignments",
88 "showUsers", "assignUser",
89 "confirmUserRemoval", "removeUsers", "exportProfiles", "showImportForm", "importProfiles")))
90 {
91 $this->$cmd();
92 }
93 break;
94 }
95 }
$ret
Definition: parser.php:6
$cmd
Definition: sahs_server.php:35

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

◆ exportProfiles()

ilSkillProfileGUI::exportProfiles ( )

Export profiles.

Parameters

return

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

631 {
632 global $ilCtrl;
633
634 if (!is_array($_POST["id"]) || count($_POST["id"]) == 0)
635 {
636 $ilCtrl->redirect($this, "");
637 }
638
639 include_once("./Services/Export/classes/class.ilExport.php");
640 $exp = new ilExport();
641 $conf = $exp->getConfig("Services/Skill");
643 $conf->setSelectedProfiles($_POST["id"]);
644 $exp->exportObject("skmg", ilObject::_lookupObjId((int) $_GET["ref_id"]));
645
646 //ilExport::_createExportDirectory(0, "xml", "");
647 //$export_dir = ilExport::_getExportDirectory($a_id, "xml", $a_type);
648 //$exp->exportEntity("skprof", $_POST["id"], "", "Services/Skill", $a_title, $a_export_dir, "skprof");
649
650 $ilCtrl->redirectByClass(array("iladministrationgui", "ilobjskillmanagementgui", "ilexportgui"), "");
651 }
static _lookupObjId($a_id)

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

+ Here is the call graph for this function:

◆ importProfiles()

ilSkillProfileGUI::importProfiles ( )

Import profiles.

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

693 {
694 global $tpl, $lng, $ilCtrl, $ilTabs;
695
696 $form = $this->initInputForm();
697 if ($form->checkInput())
698 {
699 include_once("./Services/Export/classes/class.ilImport.php");
700 $imp = new ilImport();
701 $imp->importEntity($_FILES["import_file"]["tmp_name"], $_FILES["import_file"]["name"], "skmg", "Services/Skill");
702
703 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
704 $ilCtrl->redirect($this, "");
705 }
706 else
707 {
708 $form->setValuesByPost();
709 $tpl->setContent($form->getHtml());
710 }
711 }
Import class.
initInputForm()
Init input form.

References $ilCtrl, $lng, $tpl, initInputForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ initInputForm()

ilSkillProfileGUI::initInputForm ( )

Init input form.

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

667 {
668 global $lng, $ilCtrl;
669
670 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
671 $form = new ilPropertyFormGUI();
672
673 include_once("./Services/Form/classes/class.ilFileInputGUI.php");
674 $fi = new ilFileInputGUI($lng->txt("skmg_input_file"), "import_file");
675 $fi->setSuffixes(array("zip"));
676 $fi->setRequired(true);
677 $form->addItem($fi);
678
679 // save and cancel commands
680 $form->addCommandButton("importProfiles", $lng->txt("import"));
681 $form->addCommandButton("", $lng->txt("cancel"));
682
683 $form->setTitle($lng->txt("import"));
684 $form->setFormAction($ilCtrl->getFormAction($this));
685
686 return $form;
687 }
This class represents a file property in a property form.
This class represents a property form user interface.

References $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 187 of file class.ilSkillProfileGUI.php.

188 {
189 global $lng, $ilCtrl;
190
191 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
192 $form = new ilPropertyFormGUI();
193
194 // title
195 $ti = new ilTextInputGUI($lng->txt("title"), "title");
196 $ti->setMaxLength(200);
197 $ti->setSize(40);
198 $ti->setRequired(true);
199 $form->addItem($ti);
200
201 // description
202 $desc = new ilTextAreaInputGUI($lng->txt("description"), "description");
203 $desc->setCols(40);
204 $desc->setRows(4);
205 $form->addItem($desc);
206
207 // save and cancel commands
208 if ($this->checkPermissionBool("write"))
209 {
210 if ($a_mode == "create")
211 {
212 $form->addCommandButton("save", $lng->txt("save"));
213 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
214 $form->setTitle($lng->txt("skmg_add_profile"));
215 } else
216 {
217 // set values
218 $ti->setValue($this->profile->getTitle());
219 $desc->setValue($this->profile->getDescription());
220
221 $form->addCommandButton("update", $lng->txt("save"));
222 $form->addCommandButton("listProfiles", $lng->txt("cancel"));
223 $form->setTitle($lng->txt("skmg_edit_profile"));
224 }
225 }
226
227 $form->setFormAction($ilCtrl->getFormAction($this));
228
229 return $form;
230 }
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $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 139 of file class.ilSkillProfileGUI.php.

140 {
141 global $tpl, $ilToolbar, $lng, $ilCtrl;
142
143 if ($this->checkPermissionBool("write"))
144 {
145 $ilToolbar->addButton($lng->txt("skmg_add_profile"),
146 $ilCtrl->getLinkTarget($this, "create"));
147
148 $ilToolbar->addButton($lng->txt("import"),
149 $ilCtrl->getLinkTarget($this, "showImportForm"));
150 }
151
152 include_once("./Services/Skill/classes/class.ilSkillProfileTableGUI.php");
153 $tab = new ilSkillProfileTableGUI($this, "listProfiles");
154
155 $tpl->setContent($tab->getHTML());
156 }
TableGUI class for skill profiles.

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

+ Here is the call graph for this function:

◆ removeLevelAssignments()

ilSkillProfileGUI::removeLevelAssignments ( )

Remove level assignment.

Parameters

return

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

489 {
490 global $ilCtrl;
491
492 if (!$this->checkPermissionBool("write"))
493 {
494 return;
495 }
496
497 if (is_array($_POST["ass_id"]))
498 {
499 foreach ($_POST["ass_id"] as $i)
500 {
501 $id_arr = explode(":", $i);
502 $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2]);
503 }
504 $this->profile->update();
505 }
506
507 $ilCtrl->redirect($this, "showLevels");
508 }

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

+ Here is the call graph for this function:

◆ removeUsers()

ilSkillProfileGUI::removeUsers ( )

Remove users.

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

605 {
606 global $ilCtrl, $lng;
607
608 if (!$this->checkPermissionBool("write"))
609 {
610 return;
611 }
612
613 if (is_array($_POST["id"]))
614 {
615 foreach ($_POST["id"] as $i)
616 {
617 $this->profile->removeUserFromProfile((int) $i);
618 }
619 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
620 }
621 $ilCtrl->redirect($this, "showUsers");
622 }

References $_POST, $ilCtrl, $lng, checkPermissionBool(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ save()

ilSkillProfileGUI::save ( )

Save profile form.

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

236 {
237 global $tpl, $lng, $ilCtrl;
238
239 if (!$this->checkPermissionBool("write"))
240 {
241 return;
242 }
243
244 $form = $this->initProfileForm("create");
245 if ($form->checkInput())
246 {
247 $prof = new ilSkillProfile();
248 $prof->setTitle($form->getInput("title"));
249 $prof->setDescription($form->getInput("description"));
250 $prof->create();
251 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
252 $ilCtrl->redirect($this, "listProfiles");
253 }
254 else
255 {
256 $form->setValuesByPost();
257 $tpl->setContent($form->getHtml());
258 }
259 }

References $ilCtrl, $lng, $tpl, checkPermissionBool(), initProfileForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setTabs()

ilSkillProfileGUI::setTabs (   $a_active)

Set tabs.

Parameters

return

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

104 {
105 global $ilTabs, $lng, $ilCtrl, $tpl, $ilHelp;
106
107 $tpl->setTitle($lng->txt("skmg_profile").": ".
108 $this->profile->getTitle());
109 $tpl->setDescription("");
110
111 $ilTabs->clearTargets();
112 $ilHelp->setScreenIdComponent("skmg_prof");
113
114 $ilTabs->setBackTarget($lng->txt("back"),
115 $ilCtrl->getLinkTarget($this, ""));
116
117 // users
118 $ilTabs->addTab("users",
119 $lng->txt("skmg_assigned_users"),
120 $ilCtrl->getLinkTarget($this, "showUsers"));
121
122 // levels
123 $ilTabs->addTab("levels",
124 $lng->txt("skmg_assigned_skill_levels"),
125 $ilCtrl->getLinkTarget($this, "showLevels"));
126
127 // settings
128 $ilTabs->addTab("settings",
129 $lng->txt("settings"),
130 $ilCtrl->getLinkTarget($this, "edit"));
131
132 $ilTabs->activateTab($a_active);
133 }

References $ilCtrl, $lng, 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 656 of file class.ilSkillProfileGUI.php.

657 {
658 global $tpl, $ilTabs;
659
660 $tpl->setContent($this->initInputForm()->getHTML());
661 }

References $tpl, and initInputForm().

+ Here is the call graph for this function:

◆ showLevels()

ilSkillProfileGUI::showLevels ( )

Show skill levels.

Parameters

return

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

356 {
357 global $tpl, $ilCtrl, $lng, $ilToolbar;
358
359 $this->setTabs("levels");
360
361 if ($this->checkPermissionBool("write"))
362 {
363 $ilToolbar->addButton($lng->txt("skmg_assign_level"),
364 $ilCtrl->getLinkTarget($this, "assignLevel")
365 );
366 }
367
368 include_once("./Services/Skill/classes/class.ilSkillProfileLevelsTableGUI.php");
369 $tab = new ilSkillProfileLevelsTableGUI($this, "showLevels", $this->profile);
370 $tpl->setContent($tab->getHTML());
371 }
TableGUI class for skill profile levels.

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

+ Here is the call graph for this function:

◆ showUsers()

ilSkillProfileGUI::showUsers ( )

Show users.

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

514 {
515 global $lng, $tpl, $ilToolbar;
516
517 // add member
518 include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
520 $this,
521 $ilToolbar,
522 array(
523 'auto_complete_name' => $lng->txt('user'),
524 'submit_name' => $lng->txt('skmg_assign_user')
525 )
526 );
527
528 $this->setTabs("users");
529
530 include_once("./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php");
531 $tab = new ilSkillProfileUserTableGUI($this, "showUsers",
532 $this->profile);
533 $tpl->setContent($tab->getHTML());
534 }
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, $tpl, ilRepositorySearchGUI\fillAutoCompleteToolbar(), and setTabs().

+ Here is the call graph for this function:

◆ update()

ilSkillProfileGUI::update ( )

Update.

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

265 {
266 global $lng, $ilCtrl, $tpl;
267
268 if (!$this->checkPermissionBool("write"))
269 {
270 return;
271 }
272
273 $form = $this->initProfileForm("edit");
274 if ($form->checkInput())
275 {
276 $this->profile->setTitle($form->getInput("title"));
277 $this->profile->setDescription($form->getInput("description"));
278 $this->profile->update();
279
280 ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
281 $ilCtrl->redirect($this, "listProfiles");
282 }
283 else
284 {
285 $form->setValuesByPost();
286 $tpl->setContent($form->getHtml());
287 }
288 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $access

ilSkillProfileGUI::$access

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

◆ $profile

ilSkillProfileGUI::$profile = null
protected

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

◆ $ref_id

ilSkillProfileGUI::$ref_id

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


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