Skill profile GUI class.
More...
◆ __construct()
ilSkillProfileGUI::__construct |
( |
| ) |
|
◆ assignLevel()
ilSkillProfileGUI::assignLevel |
( |
| ) |
|
Assign Level.
Definition at line 329 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, and ilUtil\sendInfo().
333 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
334 $this->profile->getTitle());
335 $tpl->setDescription(
"");
341 $ilTabs->clearTargets();
342 $ilTabs->setBackTarget($lng->txt(
"back"),
343 $ilCtrl->getLinkTarget($this,
"showLevels"));
345 include_once(
"./Services/Skill/classes/class.ilSkillSelectorGUI.php");
346 $exp =
new ilSkillSelectorGUI($this,
"assignLevel", $this,
"assignLevelSelectSkill",
"cskill_id");
347 if (!$exp->handleCommand())
349 $tpl->setContent($exp->getHTML());
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
Explorer class that works on tree objects (Services/Tree)
◆ assignLevelSelectSkill()
ilSkillProfileGUI::assignLevelSelectSkill |
( |
| ) |
|
Output level table for profile assignment.
Definition at line 356 of file class.ilSkillProfileGUI.php.
References $_GET, $ilCtrl, $lng, $tab, and $tpl.
360 $ilCtrl->saveParameter($this,
"cskill_id");
362 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
363 $this->profile->getTitle());
364 $tpl->setDescription(
"");
366 $ilTabs->clearTargets();
367 $ilTabs->setBackTarget($lng->txt(
"back"),
368 $ilCtrl->getLinkTarget($this,
"showLevels"));
370 include_once(
"./Services/Skill/classes/class.ilSkillLevelProfileAssignmentTableGUI.php");
373 $tpl->setContent(
$tab->getHTML());
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
TableGUI class for skill profile skill level assignment.
◆ assignLevelToProfile()
ilSkillProfileGUI::assignLevelToProfile |
( |
| ) |
|
Assign level to profile.
Definition at line 379 of file class.ilSkillProfileGUI.php.
References $_GET, $ilCtrl, $lng, and ilUtil\sendSuccess().
383 $parts = explode(
":",
$_GET[
"cskill_id"]);
385 $this->profile->addSkillLevel((
int) $parts[0],
386 (
int) $parts[1], (
int)
$_GET[
"level_id"]);
387 $this->profile->update();
390 $ilCtrl->redirect($this,
"showLevels");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
◆ assignUser()
ilSkillProfileGUI::assignUser |
( |
| ) |
|
◆ confirmDeleteProfiles()
ilSkillProfileGUI::confirmDeleteProfiles |
( |
| ) |
|
Confirm profile deletion.
Definition at line 254 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilSkillProfile\lookupTitle(), and ilUtil\sendInfo().
258 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
261 $ilCtrl->redirect($this,
"listProfiles");
265 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
267 $cgui->setFormAction($ilCtrl->getFormAction($this));
268 $cgui->setHeaderText($lng->txt(
"skmg_delete_profiles"));
269 $cgui->setCancel($lng->txt(
"cancel"),
"listProfiles");
270 $cgui->setConfirm($lng->txt(
"delete"),
"deleteProfiles");
272 foreach (
$_POST[
"id"] as $i)
277 $tpl->setContent($cgui->getHTML());
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static lookupTitle($a_id)
Lookup title.
Confirmation screen class.
◆ confirmLevelAssignmentRemoval()
ilSkillProfileGUI::confirmLevelAssignmentRemoval |
( |
| ) |
|
Confirm level assignment removal.
Definition at line 396 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilSkillTreeNode\_lookupTitle(), ilBasicSkill\lookupLevelTitle(), ilUtil\sendInfo(), and setTabs().
402 if (!is_array(
$_POST[
"ass_id"]) || count(
$_POST[
"ass_id"]) == 0)
405 $ilCtrl->redirect($this,
"showLevels");
409 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
411 $cgui->setFormAction($ilCtrl->getFormAction($this));
412 $cgui->setHeaderText($lng->txt(
"skmg_confirm_remove_level_ass"));
413 $cgui->setCancel($lng->txt(
"cancel"),
"showLevels");
414 $cgui->setConfirm($lng->txt(
"remove"),
"removeLevelAssignments");
416 include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
417 foreach (
$_POST[
"ass_id"] as $i)
419 $id_arr = explode(
":", $i);
420 $cgui->addItem(
"ass_id[]", $i,
425 $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.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
Confirmation screen class.
◆ confirmUserRemoval()
ilSkillProfileGUI::confirmUserRemoval |
( |
| ) |
|
Confirm user removal.
Definition at line 501 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, ilObjUser\_lookupName(), ilUtil\sendInfo(), and setTabs().
507 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
510 $ilCtrl->redirect($this,
"showUsers");
514 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
516 $cgui->setFormAction($ilCtrl->getFormAction($this));
517 $cgui->setHeaderText($lng->txt(
"skmg_confirm_user_removal"));
518 $cgui->setCancel($lng->txt(
"cancel"),
"showUsers");
519 $cgui->setConfirm($lng->txt(
"remove"),
"removeUsers");
521 foreach (
$_POST[
"id"] as $i)
524 $cgui->addItem(
"id[]", $i,
525 $name[
"lastname"].
", ".$name[
"firstname"].
526 " [".$name[
"login"].
"]");
529 $tpl->setContent($cgui->getHTML());
static _lookupName($a_user_id)
lookup user name
setTabs($a_active)
Set tabs.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
Confirmation screen class.
◆ create()
ilSkillProfileGUI::create |
( |
| ) |
|
Create.
Definition at line 134 of file class.ilSkillProfileGUI.php.
References $tpl, and initProfileForm().
139 $tpl->setContent($form->getHTML());
initProfileForm($a_mode="edit")
Init profile form.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ deleteProfiles()
ilSkillProfileGUI::deleteProfiles |
( |
| ) |
|
Delete profiles.
Definition at line 284 of file class.ilSkillProfileGUI.php.
References $_POST, $ilCtrl, $lng, $tpl, and ilUtil\sendInfo().
288 if (is_array(
$_POST[
"id"]))
290 foreach (
$_POST[
"id"] as $i)
298 $ilCtrl->redirect($this,
"listProfiles");
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ edit()
ilSkillProfileGUI::edit |
( |
| ) |
|
Edit.
Definition at line 145 of file class.ilSkillProfileGUI.php.
References $tpl, initProfileForm(), and setTabs().
151 $tpl->setContent($form->getHTML());
setTabs($a_active)
Set tabs.
initProfileForm($a_mode="edit")
Init profile form.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ executeCommand()
ilSkillProfileGUI::executeCommand |
( |
| ) |
|
Execute command.
Definition at line 42 of file class.ilSkillProfileGUI.php.
References $cmd, $ilCtrl, $lng, and $ret.
46 $cmd = $ilCtrl->getCmd(
"listProfiles");
47 $next_class = $ilCtrl->getNextClass();
50 case 'ilrepositorysearchgui':
51 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
53 $user_search->setTitle($lng->txt(
'skmg_add_user_to_profile'));
54 $user_search->setCallback($this,
'assignUser');
58 $ilCtrl->setReturn($this,
'listUsers');
59 $ret = $ilCtrl->forwardCommand($user_search);
63 if (in_array(
$cmd, array(
"listProfiles",
"create",
"edit",
"save",
"update",
64 "confirmDeleteProfiles",
"deleteProfiles",
"showLevels",
"assignLevel",
65 "assignLevelSelectSkill",
"assignLevelToProfile",
66 "confirmLevelAssignmentRemoval",
"removeLevelAssignments",
67 "showUsers",
"assignUser",
68 "confirmUserRemoval",
"removeUsers")))
◆ initProfileForm()
ilSkillProfileGUI::initProfileForm |
( |
|
$a_mode = "edit" | ) |
|
Init profile form.
- Parameters
-
Definition at line 160 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, ilTextAreaInputGUI\setCols(), and ilTextInputGUI\setMaxLength().
Referenced by create(), edit(), save(), and update().
164 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
171 $ti->setRequired(
true);
178 $form->addItem($desc);
181 if ($a_mode ==
"create")
183 $form->addCommandButton(
"save", $lng->txt(
"save"));
184 $form->addCommandButton(
"listProfiles", $lng->txt(
"cancel"));
185 $form->setTitle($lng->txt(
"skmg_add_profile"));
190 $ti->setValue($this->profile->getTitle());
191 $desc->setValue($this->profile->getDescription());
193 $form->addCommandButton(
"update", $lng->txt(
"save"));
194 $form->addCommandButton(
"listProfiles", $lng->txt(
"cancel"));
195 $form->setTitle($lng->txt(
"skmg_edit_profile"));
198 $form->setFormAction($ilCtrl->getFormAction($this));
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 118 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tab, and $tpl.
122 $ilToolbar->addButton($lng->txt(
"skmg_add_profile"),
123 $ilCtrl->getLinkTarget($this,
"create"));
125 include_once(
"./Services/Skill/classes/class.ilSkillProfileTableGUI.php");
128 $tpl->setContent(
$tab->getHTML());
TableGUI class for skill profiles.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ removeLevelAssignments()
ilSkillProfileGUI::removeLevelAssignments |
( |
| ) |
|
Remove level assignment.
- Parameters
-
Definition at line 435 of file class.ilSkillProfileGUI.php.
References $_POST, and $ilCtrl.
439 if (is_array(
$_POST[
"ass_id"]))
441 foreach (
$_POST[
"ass_id"] as $i)
443 $id_arr = explode(
":", $i);
444 $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2]);
446 $this->profile->update();
449 $ilCtrl->redirect($this,
"showLevels");
◆ removeUsers()
ilSkillProfileGUI::removeUsers |
( |
| ) |
|
◆ save()
ilSkillProfileGUI::save |
( |
| ) |
|
Save profile form.
Definition at line 206 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, initProfileForm(), and ilUtil\sendSuccess().
211 if ($form->checkInput())
214 $prof->setTitle($form->getInput(
"title"));
215 $prof->setDescription($form->getInput(
"description"));
218 $ilCtrl->redirect($this,
"listProfiles");
222 $form->setValuesByPost();
223 $tpl->setContent($form->getHtml());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initProfileForm($a_mode="edit")
Init profile form.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ setTabs()
ilSkillProfileGUI::setTabs |
( |
|
$a_active | ) |
|
Set tabs.
- Parameters
-
Definition at line 82 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, and $tpl.
Referenced by confirmLevelAssignmentRemoval(), confirmUserRemoval(), edit(), showLevels(), and showUsers().
86 $tpl->setTitle($lng->txt(
"skmg_profile").
": ".
87 $this->profile->getTitle());
88 $tpl->setDescription(
"");
90 $ilTabs->clearTargets();
91 $ilHelp->setScreenIdComponent(
"skmg_prof");
93 $ilTabs->setBackTarget($lng->txt(
"back"),
94 $ilCtrl->getLinkTarget($this,
""));
97 $ilTabs->addTab(
"users",
98 $lng->txt(
"skmg_assigned_users"),
99 $ilCtrl->getLinkTarget($this,
"showUsers"));
102 $ilTabs->addTab(
"levels",
103 $lng->txt(
"skmg_assigned_skill_levels"),
104 $ilCtrl->getLinkTarget($this,
"showLevels"));
107 $ilTabs->addTab(
"settings",
108 $lng->txt(
"settings"),
109 $ilCtrl->getLinkTarget($this,
"edit"));
111 $ilTabs->activateTab($a_active);
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ showLevels()
ilSkillProfileGUI::showLevels |
( |
| ) |
|
Show skill levels.
- Parameters
-
Definition at line 311 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tab, $tpl, and setTabs().
317 $ilToolbar->addButton($lng->txt(
"skmg_assign_level"),
318 $ilCtrl->getLinkTarget($this,
"assignLevel")
321 include_once(
"./Services/Skill/classes/class.ilSkillProfileLevelsTableGUI.php");
323 $tpl->setContent(
$tab->getHTML());
TableGUI class for skill profile levels.
setTabs($a_active)
Set tabs.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ showUsers()
ilSkillProfileGUI::showUsers |
( |
| ) |
|
Show users.
Definition at line 455 of file class.ilSkillProfileGUI.php.
References $lng, $tab, $tpl, ilRepositorySearchGUI\fillAutoCompleteToolbar(), and setTabs().
460 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
465 'auto_complete_name' => $lng->txt(
'user'),
466 'submit_name' => $lng->txt(
'skmg_assign_user')
472 include_once(
"./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php");
475 $tpl->setContent(
$tab->getHTML());
setTabs($a_active)
Set tabs.
TableGUI class for skill profile user assignment.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array())
fill toolbar with
◆ update()
ilSkillProfileGUI::update |
( |
| ) |
|
Update.
Definition at line 230 of file class.ilSkillProfileGUI.php.
References $ilCtrl, $lng, $tpl, initProfileForm(), and ilUtil\sendInfo().
235 if ($form->checkInput())
237 $this->profile->setTitle($form->getInput(
"title"));
238 $this->profile->setDescription($form->getInput(
"description"));
239 $this->profile->update();
242 $ilCtrl->redirect($this,
"listProfiles");
246 $form->setValuesByPost();
247 $tpl->setContent($form->getHtml());
initProfileForm($a_mode="edit")
Init profile form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
◆ $profile
ilSkillProfileGUI::$profile = null |
|
protected |
The documentation for this class was generated from the following file: