67        $this->ctrl = 
$DIC->ctrl();
 
   68        $this->tabs = 
$DIC->tabs();
 
   69        $this->lng = 
$DIC->language();
 
   70        $this->tpl = 
$DIC[
"tpl"];
 
   71        $this->toolbar = 
$DIC->toolbar();
 
   72        $this->access = 
$DIC->access();
 
   74        $this->container_gui = $a_container_gui;
 
   75        $this->container = $a_container_gui->object;
 
   76        $this->ref_id = $this->container->getRefId();
 
   78        include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
   81        include_once(
"./Services/Container/Skills/classes/class.ilContainerSkills.php");
 
   84        $this->user_id = (int) 
$_GET[
"usr_id"];
 
   92        $next_class = $this->ctrl->getNextClass($this);
 
   93        $cmd = $this->ctrl->getCmd(
"listMembers");
 
   95        switch ($next_class) {
 
   98                    ($this->access->checkAccess(
"write", 
"", $this->ref_id) &&
 
   99                        in_array($cmd, array(
"listCompetences", 
"settings", 
"saveSettings", 
"selectSkill",
 
  100                        "saveSelectedSkill", 
"confirmRemoveSelectedSkill", 
"removeSelectedSkill")))
 
  102                    ($this->access->checkAccess(
"grade", 
"", $this->ref_id) &&
 
  103                        in_array($cmd, array(
"listMembers", 
"assignCompetences",
 
  104                            "saveCompetenceAssignment", 
"publishAssignments", 
"deassignCompetencesConfirm", 
"deassignCompetences")))
 
  121        $tabs->activateSubTab(
"members");
 
  124        include_once(
"./Services/Container/Skills/classes/class.ilContSkillMemberTableGUI.php");
 
  139        $ctrl->saveParameter($this, 
"usr_id");
 
  140        $tabs->activateSubTab(
"members");
 
  151        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  154        include_once(
"./Services/Container/Skills/classes/class.ilContainerMemberSkills.php");
 
  156        $mem_levels = $mem_skills->getSkillLevels();
 
  161        $ne->setValue(
$name[
"lastname"] . 
", " . 
$name[
"firstname"] . 
" [" . 
$name[
"login"] . 
"]");
 
  164        foreach ($this->container_skills->getOrderedSkills() as $sk) {
 
  169                "-1" => $this->lng->txt(
"cont_skill_do_not_set"),
 
  171            foreach ($skill->getLevelData() as 
$l) {
 
  177            if (isset($mem_levels[$sk[
"skill_id"] . 
":" . $sk[
"tref_id"]])) {
 
  178                $si->setValue($mem_levels[$sk[
"skill_id"] . 
":" . $sk[
"tref_id"]]);
 
  184        $form->addCommandButton(
"saveCompetenceAssignment", $this->lng->txt(
"save"));
 
  185        $form->addCommandButton(
"listMembers", $this->lng->txt(
"cancel"));
 
  187        $form->setTitle($this->lng->txt(
"cont_assign_skills"));
 
  188        $form->setFormAction($this->ctrl->getFormAction($this));
 
  200        $skill_tree = $this->skill_tree;
 
  202        $path = $skill_tree->getSkillTreePath($a_skill_id, $a_tref_id);
 
  204        foreach (
$path as $v) {
 
  205            if ($v[
"type"] != 
"skrt" && !($v[
"skill_id"] == $a_skill_id && $v[
"tref_id"] == $a_tref_id)) {
 
  206                $titles[] = $v[
"title"];
 
  210        return implode(
" > ", $titles);
 
  227        foreach ($this->container_skills->getSkills() as $sk) {
 
  228            $l = 
$form->getInput(
"skill_" . $sk[
"skill_id"] . 
"_" . $sk[
"tref_id"]);
 
  230                $levels[$sk[
"skill_id"] . 
":" . $sk[
"tref_id"]] = 
$l;
 
  234        include_once(
"./Services/Container/Skills/classes/class.ilContainerMemberSkills.php");
 
  236        $mem_skills->saveLevelForSkills($levels);
 
  239            $mem_skills->publish($this->container->getRefId());
 
  242        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  243        $ctrl->redirect($this, 
"listMembers");
 
  254        $user_ids = 
$_POST[
"usr_id"];
 
  255        if (!is_array(
$_POST[
"usr_id"]) && 
$_GET[
"usr_id"] > 0) {
 
  256            $user_ids[] = 
$_GET[
"usr_id"];
 
  259        include_once(
"./Services/Container/Skills/classes/class.ilContainerMemberSkills.php");
 
  260        $not_changed = array();
 
  261        foreach ($user_ids as $user_id) {
 
  263            if (!$mem_skills->publish($this->container->getRefId())) {
 
  264                $not_changed[] = $user_id;
 
  268        if (count($not_changed) == 0) {
 
  269            ilUtil::sendSuccess(
$lng->txt(
"cont_skll_published"), 
true);
 
  271            $names = array_map(
function (
$id) {
 
  274            ilUtil::sendInfo(
$lng->txt(
"cont_skll_published_some_not") . 
" (" . implode(
"; ", $names) . 
")", 
true);
 
  278        $ctrl->redirect($this, 
"listMembers");
 
  291        $tabs->activateSubTab(
"members");
 
  293        $user_ids = 
$_POST[
"usr_id"];
 
  294        if (!is_array(
$_POST[
"usr_id"]) && 
$_GET[
"usr_id"] > 0) {
 
  295            $user_ids[] = 
$_GET[
"usr_id"];
 
  298        if (!is_array($user_ids) || count($user_ids) == 0) {
 
  300            $ctrl->redirect($this, 
"listMembers");
 
  302            include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  304            $cgui->setFormAction(
$ctrl->getFormAction($this));
 
  305            $cgui->setHeaderText(
$lng->txt(
"cont_really_deassign_skills"));
 
  306            $cgui->setCancel(
$lng->txt(
"cancel"), 
"listMembers");
 
  307            $cgui->setConfirm(
$lng->txt(
"cont_deassign_competence"), 
"deassignCompetences");
 
  309            foreach ($user_ids as 
$i) {
 
  311                $cgui->addItem(
"usr_id[]", 
$i, 
$name);
 
  314            $tpl->setContent($cgui->getHTML());
 
  326        foreach (
$_POST[
"usr_id"] as $user_id) {
 
  327            include_once(
"./Services/Container/Skills/classes/class.ilContainerMemberSkills.php");
 
  329            $mem_skills->removeAllSkillLevels($this->container->getRefId());
 
  332        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  333        $ctrl->redirect($this, 
"listMembers");
 
  350        $tabs->activateSubTab(
"competences");
 
  353            $lng->txt(
"cont_add_skill"),
 
  354            $ctrl->getLinkTarget($this, 
"selectSkill")
 
  358        include_once(
"./Services/Container/Skills/classes/class.ilContSkillTableGUI.php");
 
  372        $tabs->activateSubTab(
"competences");
 
  374        include_once(
"./Services/Skill/classes/class.ilSkillSelectorGUI.php");
 
  376        if (!$sel->handleCommand()) {
 
  377            $tpl->setContent($sel->getHTML());
 
  389        $s = explode(
":", (
$_GET[
"selected_skill"]));
 
  391        $this->container_skills->addSkill((
int) 
$s[0], (
int) 
$s[1]);
 
  392        $this->container_skills->save();
 
  394        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  396        $ctrl->redirect($this, 
"listCompetences");
 
  408        if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0) {
 
  410            $ctrl->redirect($this, 
"listCompetences");
 
  412            include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  414            $cgui->setFormAction(
$ctrl->getFormAction($this));
 
  415            $cgui->setHeaderText(
$lng->txt(
"cont_really_remove_skill_from_course"));
 
  416            $cgui->setCancel(
$lng->txt(
"cancel"), 
"listCompetences");
 
  417            $cgui->setConfirm(
$lng->txt(
"remove"), 
"removeSelectedSkill");
 
  420                $s = explode(
":", 
$i);
 
  424            $tpl->setContent($cgui->getHTML());
 
  436        if (is_array(
$_POST[
"id"]) && count(
$_POST[
"id"]) > 0) {
 
  438                $s = explode(
":", 
$id);
 
  439                $this->container_skills->removeSkill(
$s[0], 
$s[1]);
 
  441            $this->container_skills->save();
 
  443        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  445        $ctrl->redirect($this, 
"listCompetences");
 
  459        $tabs->activateSubTab(
"settings");
 
  474        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  479        $op1 = 
new ilRadioOption(
$lng->txt(
"cont_skill_publish_auto"), 0, 
$lng->txt(
"cont_skill_publish_auto_info"));
 
  480        $radg->addOption($op1);
 
  481        $op2 = 
new ilRadioOption(
$lng->txt(
"cont_skill_publish_manual"), 1, 
$lng->txt(
"cont_skill_publish_manual_info"));
 
  482        $radg->addOption($op2);
 
  483        $form->addItem($radg);
 
  486        $form->addCommandButton(
"saveSettings", 
$lng->txt(
"save"));
 
  489        $form->setFormAction(
$ctrl->getFormAction($this));
 
  506        ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"), 
true);
 
  508        $ctrl->redirect($this, 
"settings");
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
Container skills administration.
selectSkill()
Select skill for container.
initCompetenceAssignmentForm()
Init competence assignment form.
__construct($a_container_gui)
Constructor.
saveSettings()
Save settings.
initSettingsForm()
Init settings form.
saveSelectedSkill()
Save selected skill.
publishAssignments()
Publish assignments.
executeCommand()
Execute command.
listCompetences()
Select competences.
deassignCompetences()
Deassign competences.
removeSelectedSkill()
Remove skill from course selection.
confirmRemoveSelectedSkill()
Confirm.
saveCompetenceAssignment()
Save competence assignment.
getPathString($a_skill_id, $a_tref_id=0)
Get path string.
deassignCompetencesConfirm()
Deassign competences confirmation.
listMembers()
List members.
assignCompetences()
Assign competences to a member.
TableGUI class for container members / skill assignments.
TableGUI class for competences in containers.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
This class represents a non editable value in a property form.
static _lookupName($a_user_id)
lookup user name
This class represents an option in a radio group.
Explorer class that works on tree objects (Services/Tree)
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(isset($_POST['submit'])) $form