ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilSurveySkillGUI Class Reference

Survey skill service GUI class. More...

+ Collaboration diagram for ilSurveySkillGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 listQuestionAssignment ()
 List question to skill assignment. More...
 
 assignSkillToQuestion ()
 Assign skill to question. More...
 
 selectSkillForQuestion ()
 Select skill for question. More...
 
 removeSkillFromQuestion ()
 Remove skill from question. More...
 
 setSubTabs ($a_activate)
 Set subtabs. More...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $user
 
 $lng
 
 $tabs
 

Detailed Description

Survey skill service GUI class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_Calls ilSurveySkillGUI: ilSurveySkillThresholdsGUI

Definition at line 13 of file class.ilSurveySkillGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillGUI::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
object$a_survey

Definition at line 45 of file class.ilSurveySkillGUI.php.

46 {
47 global $DIC;
48
49 $this->ctrl = $DIC->ctrl();
50 $this->tpl = $DIC["tpl"];
51 $this->user = $DIC->user();
52 $this->lng = $DIC->language();
53 $this->tabs = $DIC->tabs();
54 $this->survey = $a_survey;
55 }
user()
Definition: user.php:4
$DIC
Definition: xapitoken.php:46

References $DIC, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ assignSkillToQuestion()

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

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

104 {
109 $ilTabs = $this->tabs;
110
111 $ilCtrl->saveParameter($this, "q_id");
112
113
114 $sel = new ilSkillSelectorGUI($this, "assignSkillToQuestion", $this, "selectSkillForQuestion");
115 if (!$sel->handleCommand()) {
116 $tpl->setContent($sel->getHTML());
117 }
118 }
Explorer class that works on tree objects (Services/Tree)
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18

References $ctrl, $ilCtrl, $ilUser, $lng, $tabs, $tpl, and $user.

◆ executeCommand()

ilSurveySkillGUI::executeCommand ( )

Execute command.

Definition at line 60 of file class.ilSurveySkillGUI.php.

61 {
63
64 $cmd = $ilCtrl->getCmd();
65 $next_class = $ilCtrl->getNextClass();
66
67 switch ($next_class) {
68 case 'ilsurveyskillthresholdsgui':
69 $this->setSubTabs("skill_thresholds");
70 $gui = new ilSurveySkillThresholdsGUI($this->survey);
71 $ilCtrl->forwardCommand($gui);
72 break;
73
74 default:
75 if (in_array($cmd, array("listQuestionAssignment",
76 "assignSkillToQuestion", "selectSkillForQuestion",
77 "removeSkillFromQuestion"))) {
78 $this->setSubTabs("survey_skill_assign");
79 $this->$cmd();
80 }
81 break;
82 }
83 }
setSubTabs($a_activate)
Set subtabs.
Survey skill thresholds GUI class.

References $ctrl, $ilCtrl, and setSubTabs().

+ Here is the call graph for this function:

◆ listQuestionAssignment()

ilSurveySkillGUI::listQuestionAssignment ( )

List question to skill assignment.

Definition at line 88 of file class.ilSurveySkillGUI.php.

89 {
91
93 $this,
94 "listQuestionAssignment",
95 $this->survey
96 );
97 $tpl->setContent($tab->getHTML());
98 }
TableGUI class for survey questions to skill assignment.

References $tab, and $tpl.

◆ removeSkillFromQuestion()

ilSurveySkillGUI::removeSkillFromQuestion ( )

Remove skill from question.

Definition at line 143 of file class.ilSurveySkillGUI.php.

144 {
147
148 $skill_survey = new ilSurveySkill($this->survey);
149 $skill_survey->removeQuestionSkillAssignment((int) $_GET["q_id"]);
150 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
151
152 $ilCtrl->redirect($this, "listQuestionAssignment");
153 }
$_GET["client_id"]
Skill/Competence handling in surveys.

References $_GET, $ctrl, $ilCtrl, and $lng.

◆ selectSkillForQuestion()

ilSurveySkillGUI::selectSkillForQuestion ( )

Select skill for question.

Definition at line 123 of file class.ilSurveySkillGUI.php.

124 {
127
128 $skill_survey = new ilSurveySkill($this->survey);
129 $skill_id_parts = explode(":", $_GET["selected_skill"]);
130 $skill_survey->addQuestionSkillAssignment(
131 (int) $_GET["q_id"],
132 (int) $skill_id_parts[0],
133 (int) $skill_id_parts[1]
134 );
135 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
136
137 $ilCtrl->redirect($this, "listQuestionAssignment");
138 }

References $_GET, $ctrl, $ilCtrl, and $lng.

◆ setSubTabs()

ilSurveySkillGUI::setSubTabs (   $a_activate)

Set subtabs.

Parameters
string$a_activateactivate sub tab (ID)

Definition at line 160 of file class.ilSurveySkillGUI.php.

161 {
162 $ilTabs = $this->tabs;
165
166 $ilTabs->addSubtab(
167 "survey_skill_assign",
168 $lng->txt("survey_skill_assign"),
169 $ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment")
170 );
171
172 $ilTabs->addSubTab(
173 "skill_thresholds",
174 $lng->txt("survey_skill_thresholds"),
175 $ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences")
176 );
177
178 $ilTabs->activateSubtab($a_activate);
179 }

References $ctrl, $ilCtrl, $lng, and $tabs.

Referenced by executeCommand().

+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilSurveySkillGUI::$ctrl
protected

◆ $lng

ilSurveySkillGUI::$lng
protected

◆ $tabs

ilSurveySkillGUI::$tabs
protected

Definition at line 38 of file class.ilSurveySkillGUI.php.

Referenced by assignSkillToQuestion(), and setSubTabs().

◆ $tpl

ilSurveySkillGUI::$tpl
protected

Definition at line 23 of file class.ilSurveySkillGUI.php.

Referenced by assignSkillToQuestion(), and listQuestionAssignment().

◆ $user

ilSurveySkillGUI::$user
protected

Definition at line 28 of file class.ilSurveySkillGUI.php.

Referenced by assignSkillToQuestion().


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