5include_once(
"./Services/Skill/classes/class.ilSkillProfile.php");
 
   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"];
 
   57                return $this->access->checkAccess($a_perm, 
"", $this->ref_id);
 
   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');
 
   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")))
 
  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);
 
  145                        $ilToolbar->addButton(
$lng->txt(
"skmg_add_profile"),
 
  146                                $ilCtrl->getLinkTarget($this, 
"create"));
 
  149                include_once(
"./Services/Skill/classes/class.ilSkillProfileTableGUI.php");
 
  163                $tpl->setContent($form->getHTML());
 
  175                $tpl->setContent($form->getHTML());
 
  188                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  193                $ti->setMaxLength(200);
 
  195                $ti->setRequired(
true);
 
  202                $form->addItem($desc);
 
  207                        if ($a_mode == 
"create")
 
  209                                $form->addCommandButton(
"save", 
$lng->txt(
"save"));
 
  210                                $form->addCommandButton(
"listProfiles", 
$lng->txt(
"cancel"));
 
  211                                $form->setTitle(
$lng->txt(
"skmg_add_profile"));
 
  215                                $ti->setValue($this->profile->getTitle());
 
  216                                $desc->setValue($this->profile->getDescription());
 
  218                                $form->addCommandButton(
"update", 
$lng->txt(
"save"));
 
  219                                $form->addCommandButton(
"listProfiles", 
$lng->txt(
"cancel"));
 
  220                                $form->setTitle(
$lng->txt(
"skmg_edit_profile"));
 
  224                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  242                if ($form->checkInput())
 
  245                        $prof->setTitle($form->getInput(
"title"));
 
  246                        $prof->setDescription($form->getInput(
"description"));
 
  249                        $ilCtrl->redirect($this, 
"listProfiles");
 
  253                        $form->setValuesByPost();
 
  254                        $tpl->setContent($form->getHtml());
 
  271                if ($form->checkInput())
 
  273                        $this->profile->setTitle($form->getInput(
"title"));
 
  274                        $this->profile->setDescription($form->getInput(
"description"));
 
  275                        $this->profile->update();
 
  278                        $ilCtrl->redirect($this, 
"listProfiles");
 
  282                        $form->setValuesByPost();
 
  283                        $tpl->setContent($form->getHtml());
 
  294                if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
 
  297                        $ilCtrl->redirect($this, 
"listProfiles");
 
  301                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  303                        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  304                        $cgui->setHeaderText(
$lng->txt(
"skmg_delete_profiles"));
 
  305                        $cgui->setCancel(
$lng->txt(
"cancel"), 
"listProfiles");
 
  306                        $cgui->setConfirm(
$lng->txt(
"delete"), 
"deleteProfiles");
 
  308                        foreach (
$_POST[
"id"] as $i)
 
  313                        $tpl->setContent($cgui->getHTML());
 
  329                if (is_array(
$_POST[
"id"]))
 
  331                        foreach (
$_POST[
"id"] as $i)
 
  339                $ilCtrl->redirect($this, 
"listProfiles");
 
  360                        $ilToolbar->addButton(
$lng->txt(
"skmg_assign_level"),
 
  361                                $ilCtrl->getLinkTarget($this, 
"assignLevel")
 
  365                include_once(
"./Services/Skill/classes/class.ilSkillProfileLevelsTableGUI.php");
 
  377                $tpl->setTitle(
$lng->txt(
"skmg_profile").
": ".
 
  378                        $this->profile->getTitle());
 
  379                $tpl->setDescription(
"");
 
  385                $ilTabs->clearTargets();
 
  386                $ilTabs->setBackTarget(
$lng->txt(
"back"),
 
  387                        $ilCtrl->getLinkTarget($this, 
"showLevels"));
 
  389                include_once(
"./Services/Skill/classes/class.ilSkillSelectorGUI.php");
 
  390                $exp = 
new ilSkillSelectorGUI($this, 
"assignLevel", $this, 
"assignLevelSelectSkill", 
"cskill_id");
 
  391                if (!$exp->handleCommand())
 
  393                        $tpl->setContent($exp->getHTML());
 
  404                $ilCtrl->saveParameter($this, 
"cskill_id");
 
  406                $tpl->setTitle(
$lng->txt(
"skmg_profile").
": ".
 
  407                        $this->profile->getTitle());
 
  408                $tpl->setDescription(
"");
 
  410                $ilTabs->clearTargets();
 
  411                $ilTabs->setBackTarget(
$lng->txt(
"back"),
 
  412                        $ilCtrl->getLinkTarget($this, 
"showLevels"));
 
  414                include_once(
"./Services/Skill/classes/class.ilSkillLevelProfileAssignmentTableGUI.php");
 
  433                $parts = explode(
":", 
$_GET[
"cskill_id"]);
 
  435                $this->profile->addSkillLevel((
int) $parts[0],
 
  436                        (
int) $parts[1], (
int) 
$_GET[
"level_id"]);
 
  437                $this->profile->update();
 
  440                $ilCtrl->redirect($this, 
"showLevels");
 
  452                if (!is_array(
$_POST[
"ass_id"]) || count(
$_POST[
"ass_id"]) == 0)
 
  455                        $ilCtrl->redirect($this, 
"showLevels");
 
  459                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  461                        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  462                        $cgui->setHeaderText(
$lng->txt(
"skmg_confirm_remove_level_ass"));
 
  463                        $cgui->setCancel(
$lng->txt(
"cancel"), 
"showLevels");
 
  464                        $cgui->setConfirm(
$lng->txt(
"remove"), 
"removeLevelAssignments");
 
  466                        include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  467                        foreach (
$_POST[
"ass_id"] as $i)
 
  469                                $id_arr = explode(
":", $i);
 
  470                                $cgui->addItem(
"ass_id[]", $i,
 
  475                        $tpl->setContent($cgui->getHTML());
 
  494                if (is_array(
$_POST[
"ass_id"]))
 
  496                        foreach (
$_POST[
"ass_id"] as $i)
 
  498                                $id_arr = explode(
":", $i);
 
  499                                $this->profile->removeSkillLevel($id_arr[0], $id_arr[1], $id_arr[2]);
 
  501                        $this->profile->update();
 
  504                $ilCtrl->redirect($this, 
"showLevels");
 
  515                include_once 
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
 
  520                                'auto_complete_name'    => 
$lng->txt(
'user'),
 
  521                                'submit_name'                   => 
$lng->txt(
'skmg_assign_user')
 
  527                include_once(
"./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php");
 
  551                        $this->profile->addUserToProfile($user_id);
 
  555                $ilCtrl->redirect($this, 
"showUsers");
 
  572                if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
 
  575                        $ilCtrl->redirect($this, 
"showUsers");
 
  579                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  581                        $cgui->setFormAction(
$ilCtrl->getFormAction($this));
 
  582                        $cgui->setHeaderText(
$lng->txt(
"skmg_confirm_user_removal"));
 
  583                        $cgui->setCancel(
$lng->txt(
"cancel"), 
"showUsers");
 
  584                        $cgui->setConfirm(
$lng->txt(
"remove"), 
"removeUsers");
 
  586                        foreach (
$_POST[
"id"] as $i)
 
  589                                $cgui->addItem(
"id[]", $i,
 
  590                                        $name[
"lastname"].
", ".$name[
"firstname"].
 
  591                                        " [".$name[
"login"].
"]");
 
  594                        $tpl->setContent($cgui->getHTML());
 
  610                if (is_array(
$_POST[
"id"]))
 
  612                        foreach (
$_POST[
"id"] as $i)
 
  614                                $this->profile->removeUserFromProfile((
int) $i);
 
  618                $ilCtrl->redirect($this, 
"showUsers");
 
static lookupLevelTitle($a_id)
Lookup level title.
Confirmation screen class.
static _lookupId($a_user_str)
Lookup id by login.
static _lookupName($a_user_id)
lookup user name
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
fill toolbar with
TableGUI class for skill profile skill level assignment.
confirmLevelAssignmentRemoval()
Confirm level assignment removal.
removeUsers()
Remove users.
assignLevel()
Assign Level.
deleteProfiles()
Delete profiles.
executeCommand()
Execute command.
assignLevelToProfile()
Assign level to profile.
removeLevelAssignments()
Remove level assignment.
checkPermissionBool($a_perm)
Check permission pool.
listProfiles()
List profiles.
confirmDeleteProfiles()
Confirm profile deletion.
assignLevelSelectSkill()
Output level table for profile assignment.
confirmUserRemoval()
Confirm user removal.
__construct()
Constructor.
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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.