Skill profile GUI class.
More...
◆ __construct()
ilSkillProfileGUI::__construct |
( |
| ) |
|
Constructor.
Definition at line 30 of file class.ilSkillProfileGUI.php.
References $_GET, and $ilCtrl.
34 $ilCtrl->saveParameter($this,
"sprof_id");
35 $this->access = $ilAccess;
36 $this->ref_id = (int)
$_GET[
"ref_id"];
38 if ((
int)
$_GET[
"sprof_id"] > 0)
40 $this->
id = (int)
$_GET[
"sprof_id"];
◆ assignLevel()
ilSkillProfileGUI::assignLevel |
( |
| ) |
|
Assign Level.
Definition at line 376 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, and ilUtil\sendInfo().
380 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
381 $this->profile->getTitle());
382 $tpl->setDescription(
"");
388 $ilTabs->clearTargets();
389 $ilTabs->setBackTarget($lng->txt(
"back"),
390 $ilCtrl->getLinkTarget($this,
"showLevels"));
392 include_once(
"./Services/Skill/classes/class.ilSkillSelectorGUI.php");
393 $exp =
new ilSkillSelectorGUI($this,
"assignLevel", $this,
"assignLevelSelectSkill",
"cskill_id");
394 if (!$exp->handleCommand())
396 $tpl->setContent($exp->getHTML());
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Explorer class that works on tree objects (Services/Tree)
◆ assignLevelSelectSkill()
ilSkillProfileGUI::assignLevelSelectSkill |
( |
| ) |
|
Output level table for profile assignment.
Definition at line 403 of file class.ilSkillProfileGUI.php.
References $_GET, $ilCtrl, $lng, $tab, and $tpl.
407 $ilCtrl->saveParameter($this,
"cskill_id");
409 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
410 $this->profile->getTitle());
411 $tpl->setDescription(
"");
413 $ilTabs->clearTargets();
414 $ilTabs->setBackTarget($lng->txt(
"back"),
415 $ilCtrl->getLinkTarget($this,
"showLevels"));
417 include_once(
"./Services/Skill/classes/class.ilSkillLevelProfileAssignmentTableGUI.php");
420 $tpl->setContent(
$tab->getHTML());
TableGUI class for skill profile skill level assignment.
◆ assignLevelToProfile()
ilSkillProfileGUI::assignLevelToProfile |
( |
| ) |
|
Assign level to profile.
Definition at line 426 of file class.ilSkillProfileGUI.php.
References $_GET, $ilCtrl, $lng, checkPermissionBool(), and ilUtil\sendSuccess().
436 $parts = explode(
":",
$_GET[
"cskill_id"]);
438 $this->profile->addSkillLevel((
int) $parts[0],
439 (
int) $parts[1], (
int)
$_GET[
"level_id"]);
440 $this->profile->update();
443 $ilCtrl->redirect($this,
"showLevels");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm)
Check permission pool.
◆ assignUser()
ilSkillProfileGUI::assignUser |
( |
| ) |
|
Assign user.
- Parameters
-
Definition at line 542 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, ilObjUser\_lookupId(), checkPermissionBool(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().
554 $this->profile->addUserToProfile($user_id);
558 $ilCtrl->redirect($this,
"showUsers");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm)
Check permission pool.
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
◆ checkPermissionBool()
ilSkillProfileGUI::checkPermissionBool |
( |
|
$a_perm | ) |
|
Check permission pool.
- Parameters
-
- Returns
- bool
Definition at line 55 of file class.ilSkillProfileGUI.php.
Referenced by assignLevelToProfile(), assignUser(), confirmUserRemoval(), deleteProfiles(), initProfileForm(), listProfiles(), removeLevelAssignments(), removeUsers(), save(), showLevels(), and update().
57 return $this->access->checkAccess($a_perm,
"", $this->ref_id);
◆ confirmDeleteProfiles()
ilSkillProfileGUI::confirmDeleteProfiles |
( |
| ) |
|
Confirm profile deletion.
Definition at line 293 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilSkillProfile\lookupTitle(), and ilUtil\sendInfo().
297 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
300 $ilCtrl->redirect($this,
"listProfiles");
304 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
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");
311 foreach (
$_POST[
"id"] as $i)
316 $tpl->setContent($cgui->getHTML());
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static lookupTitle($a_id)
Lookup title.
Confirmation screen class.
◆ confirmLevelAssignmentRemoval()
ilSkillProfileGUI::confirmLevelAssignmentRemoval |
( |
| ) |
|
Confirm level assignment removal.
Definition at line 449 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilSkillTreeNode\_lookupTitle(), ilBasicSkill\lookupLevelTitle(), ilUtil\sendInfo(), and setTabs().
455 if (!is_array(
$_POST[
"ass_id"]) || count(
$_POST[
"ass_id"]) == 0)
458 $ilCtrl->redirect($this,
"showLevels");
462 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
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");
469 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
470 foreach (
$_POST[
"ass_id"] as $i)
472 $id_arr = explode(
":", $i);
473 $cgui->addItem(
"ass_id[]", $i,
478 $tpl->setContent($cgui->getHTML());
setTabs($a_active)
Set tabs.
static lookupLevelTitle($a_id)
Lookup level title.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
Confirmation screen class.
◆ confirmUserRemoval()
ilSkillProfileGUI::confirmUserRemoval |
( |
| ) |
|
Confirm user removal.
Definition at line 564 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilObjUser\_lookupName(), checkPermissionBool(), ilUtil\sendInfo(), and setTabs().
575 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
578 $ilCtrl->redirect($this,
"showUsers");
582 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
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");
589 foreach (
$_POST[
"id"] as $i)
592 $cgui->addItem(
"id[]", $i,
593 $name[
"lastname"].
", ".$name[
"firstname"].
594 " [".$name[
"login"].
"]");
597 $tpl->setContent($cgui->getHTML());
static _lookupName($a_user_id)
lookup user name
setTabs($a_active)
Set tabs.
checkPermissionBool($a_perm)
Check permission pool.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Confirmation screen class.
◆ create()
ilSkillProfileGUI::create |
( |
| ) |
|
◆ deleteProfiles()
ilSkillProfileGUI::deleteProfiles |
( |
| ) |
|
◆ edit()
ilSkillProfileGUI::edit |
( |
| ) |
|
◆ executeCommand()
ilSkillProfileGUI::executeCommand |
( |
| ) |
|
Execute command.
Definition at line 63 of file class.ilSkillProfileGUI.php.
References $cmd, $ilCtrl, $lng, $ret, and array.
67 $cmd = $ilCtrl->getCmd(
"listProfiles");
68 $next_class = $ilCtrl->getNextClass();
71 case 'ilrepositorysearchgui':
72 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
74 $user_search->setTitle($lng->txt(
'skmg_add_user_to_profile'));
75 $user_search->setCallback($this,
'assignUser');
79 $ilCtrl->setReturn($this,
'listUsers');
80 $ret = $ilCtrl->forwardCommand($user_search);
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")))
Create styles array
The data for the language used.
◆ exportProfiles()
ilSkillProfileGUI::exportProfiles |
( |
| ) |
|
◆ importProfiles()
ilSkillProfileGUI::importProfiles |
( |
| ) |
|
Import profiles.
Definition at line 692 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, initInputForm(), and ilUtil\sendSuccess().
697 if ($form->checkInput())
699 include_once(
"./Services/Export/classes/class.ilImport.php");
701 $imp->importEntity($_FILES[
"import_file"][
"tmp_name"], $_FILES[
"import_file"][
"name"],
"skmg",
"Services/Skill");
704 $ilCtrl->redirect($this,
"");
708 $form->setValuesByPost();
709 $tpl->setContent($form->getHtml());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initInputForm()
Init input form.
◆ initInputForm()
ilSkillProfileGUI::initInputForm |
( |
| ) |
|
Init input form.
Definition at line 666 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, array, and ilFileInputGUI\setSuffixes().
Referenced by importProfiles(), and showImportForm().
670 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
673 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
674 $fi =
new ilFileInputGUI($lng->txt(
"skmg_input_file"),
"import_file");
676 $fi->setRequired(
true);
680 $form->addCommandButton(
"importProfiles", $lng->txt(
"import"));
681 $form->addCommandButton(
"", $lng->txt(
"cancel"));
683 $form->setTitle($lng->txt(
"import"));
684 $form->setFormAction($ilCtrl->getFormAction($this));
Create styles array
The data for the language used.
◆ initProfileForm()
ilSkillProfileGUI::initProfileForm |
( |
|
$a_mode = "edit" | ) |
|
Init profile form.
- Parameters
-
Definition at line 187 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, checkPermissionBool(), ilTextAreaInputGUI\setCols(), and ilTextInputGUI\setMaxLength().
Referenced by create(), edit(), save(), and update().
191 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
198 $ti->setRequired(
true);
205 $form->addItem($desc);
210 if ($a_mode ==
"create")
212 $form->addCommandButton(
"save", $lng->txt(
"save"));
213 $form->addCommandButton(
"listProfiles", $lng->txt(
"cancel"));
214 $form->setTitle($lng->txt(
"skmg_add_profile"));
218 $ti->setValue($this->profile->getTitle());
219 $desc->setValue($this->profile->getDescription());
221 $form->addCommandButton(
"update", $lng->txt(
"save"));
222 $form->addCommandButton(
"listProfiles", $lng->txt(
"cancel"));
223 $form->setTitle($lng->txt(
"skmg_edit_profile"));
227 $form->setFormAction($ilCtrl->getFormAction($this));
checkPermissionBool($a_perm)
Check permission pool.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a text area property in a property form.
◆ listProfiles()
ilSkillProfileGUI::listProfiles |
( |
| ) |
|
List profiles.
Definition at line 139 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tab, $tpl, and checkPermissionBool().
145 $ilToolbar->addButton($lng->txt(
"skmg_add_profile"),
146 $ilCtrl->getLinkTarget($this,
"create"));
148 $ilToolbar->addButton($lng->txt(
"import"),
149 $ilCtrl->getLinkTarget($this,
"showImportForm"));
152 include_once(
"./Services/Skill/classes/class.ilSkillProfileTableGUI.php");
155 $tpl->setContent(
$tab->getHTML());
checkPermissionBool($a_perm)
Check permission pool.
TableGUI class for skill profiles.
◆ removeLevelAssignments()
ilSkillProfileGUI::removeLevelAssignments |
( |
| ) |
|
Remove level assignment.
- Parameters
-
Definition at line 488 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, and checkPermissionBool().
497 if (is_array(
$_POST[
"ass_id"]))
499 foreach (
$_POST[
"ass_id"] as $i)
501 $id_arr = explode(
":", $i);
502 $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2]);
504 $this->profile->update();
507 $ilCtrl->redirect($this,
"showLevels");
checkPermissionBool($a_perm)
Check permission pool.
◆ removeUsers()
ilSkillProfileGUI::removeUsers |
( |
| ) |
|
◆ save()
ilSkillProfileGUI::save |
( |
| ) |
|
Save profile form.
Definition at line 235 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, checkPermissionBool(), initProfileForm(), and ilUtil\sendSuccess().
245 if ($form->checkInput())
248 $prof->setTitle($form->getInput(
"title"));
249 $prof->setDescription($form->getInput(
"description"));
252 $ilCtrl->redirect($this,
"listProfiles");
256 $form->setValuesByPost();
257 $tpl->setContent($form->getHtml());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermissionBool($a_perm)
Check permission pool.
initProfileForm($a_mode="edit")
Init profile form.
◆ setTabs()
ilSkillProfileGUI::setTabs |
( |
|
$a_active | ) |
|
Set tabs.
- Parameters
-
Definition at line 103 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, and $tpl.
Referenced by confirmLevelAssignmentRemoval(), confirmUserRemoval(), edit(), showLevels(), and showUsers().
107 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
108 $this->profile->getTitle());
109 $tpl->setDescription(
"");
111 $ilTabs->clearTargets();
112 $ilHelp->setScreenIdComponent(
"skmg_prof");
114 $ilTabs->setBackTarget($lng->txt(
"back"),
115 $ilCtrl->getLinkTarget($this,
""));
118 $ilTabs->addTab(
"users",
119 $lng->txt(
"skmg_assigned_users"),
120 $ilCtrl->getLinkTarget($this,
"showUsers"));
123 $ilTabs->addTab(
"levels",
124 $lng->txt(
"skmg_assigned_skill_levels"),
125 $ilCtrl->getLinkTarget($this,
"showLevels"));
128 $ilTabs->addTab(
"settings",
129 $lng->txt(
"settings"),
130 $ilCtrl->getLinkTarget($this,
"edit"));
132 $ilTabs->activateTab($a_active);
◆ showImportForm()
ilSkillProfileGUI::showImportForm |
( |
| ) |
|
◆ showLevels()
ilSkillProfileGUI::showLevels |
( |
| ) |
|
Show skill levels.
- Parameters
-
Definition at line 355 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tab, $tpl, checkPermissionBool(), and setTabs().
363 $ilToolbar->addButton($lng->txt(
"skmg_assign_level"),
364 $ilCtrl->getLinkTarget($this,
"assignLevel")
368 include_once(
"./Services/Skill/classes/class.ilSkillProfileLevelsTableGUI.php");
370 $tpl->setContent(
$tab->getHTML());
TableGUI class for skill profile levels.
checkPermissionBool($a_perm)
Check permission pool.
setTabs($a_active)
Set tabs.
◆ showUsers()
ilSkillProfileGUI::showUsers |
( |
| ) |
|
Show users.
Definition at line 513 of file class.ilSkillProfileGUI.php.
References $lng, $tab, $tpl, array, ilRepositorySearchGUI\fillAutoCompleteToolbar(), and setTabs().
518 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
523 'auto_complete_name' => $lng->txt(
'user'),
524 'submit_name' => $lng->txt(
'skmg_assign_user')
530 include_once(
"./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php");
533 $tpl->setContent(
$tab->getHTML());
setTabs($a_active)
Set tabs.
TableGUI class for skill profile user assignment.
Create styles array
The data for the language used.
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
◆ update()
ilSkillProfileGUI::update |
( |
| ) |
|
Update.
Definition at line 264 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, checkPermissionBool(), initProfileForm(), and ilUtil\sendInfo().
274 if ($form->checkInput())
276 $this->profile->setTitle($form->getInput(
"title"));
277 $this->profile->setDescription($form->getInput(
"description"));
278 $this->profile->update();
281 $ilCtrl->redirect($this,
"listProfiles");
285 $form->setValuesByPost();
286 $tpl->setContent($form->getHtml());
checkPermissionBool($a_perm)
Check permission pool.
initProfileForm($a_mode="edit")
Init profile form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ $access
ilSkillProfileGUI::$access |
◆ $profile
ilSkillProfileGUI::$profile = null |
|
protected |
◆ $ref_id
ilSkillProfileGUI::$ref_id |
The documentation for this class was generated from the following file: