ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilSurveySkillGUI Class Reference

Survey skill service GUI class. More...

+ Collaboration diagram for ilSurveySkillGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 
 executeCommand ()
 
 listQuestionAssignment ()
 List question to skill assignment. More...
 
 assignSkillToQuestion ()
 Assign skill to question. More...
 
 selectSkillForQuestion ()
 
 removeSkillFromQuestion ()
 
 setSubTabs (string $a_activate)
 

Protected Attributes

ilObjSurvey $survey
 
ILIAS Survey Editing EditingGUIRequest $edit_request
 
ilCtrl $ctrl
 
ilGlobalPageTemplate $tpl
 
ilObjUser $user
 
ilLanguage $lng
 
ilTabsGUI $tabs
 

Detailed Description

Survey skill service GUI class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilSurveySkillGUI: ilSurveySkillThresholdsGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillGUI::__construct ( ilObjSurvey  $a_survey)

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

38 {
39 global $DIC;
40
41 $this->ctrl = $DIC->ctrl();
42 $this->tpl = $DIC["tpl"];
43 $this->user = $DIC->user();
44 $this->lng = $DIC->language();
45 $this->tabs = $DIC->tabs();
46 $this->survey = $a_survey;
47 $this->edit_request = $DIC->survey()
48 ->internal()
49 ->gui()
50 ->editing()
51 ->request();
52 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ assignSkillToQuestion()

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

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

97 : void
98 {
100 $ilCtrl = $this->ctrl;
101 $ilCtrl->saveParameter($this, "q_id");
102
103 $sel = new ilSkillSelectorGUI(
104 $this,
105 "assignSkillToQuestion",
106 $this,
107 "selectSkillForQuestion",
108 'selected_skill'
109 );
110 if (!$sel->handleCommand()) {
111 $tpl->setContent($sel->getHTML());
112 }
113 }
saveParameter(object $a_gui_obj, $a_parameter)
@inheritDoc
setContent(string $a_html)
Sets content for standard template.
Explorer class that works on tree objects (Services/Tree)
ilGlobalPageTemplate $tpl

References $ctrl, $tpl, ilCtrl\saveParameter(), and ilGlobalPageTemplate\setContent().

+ Here is the call graph for this function:

◆ executeCommand()

ilSurveySkillGUI::executeCommand ( )

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

54 : void
55 {
56 $ilCtrl = $this->ctrl;
57
58 $cmd = $ilCtrl->getCmd();
59 $next_class = $ilCtrl->getNextClass();
60
61 switch ($next_class) {
62 case 'ilsurveyskillthresholdsgui':
63 $this->setSubTabs("skill_thresholds");
64 $gui = new ilSurveySkillThresholdsGUI($this->survey);
65 $ilCtrl->forwardCommand($gui);
66 break;
67
68 default:
69 if (in_array($cmd, array("listQuestionAssignment",
70 "assignSkillToQuestion", "selectSkillForQuestion",
71 "removeSkillFromQuestion"))) {
72 $this->setSubTabs("survey_skill_assign");
73 $this->$cmd();
74 }
75 break;
76 }
77 }
getCmd(?string $fallback_command=null)
@inheritDoc
setSubTabs(string $a_activate)
Survey skill thresholds GUI class.

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

+ Here is the call graph for this function:

◆ listQuestionAssignment()

ilSurveySkillGUI::listQuestionAssignment ( )

List question to skill assignment.

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

82 : void
83 {
85
87 $this,
88 "listQuestionAssignment",
89 $this->survey
90 );
91 $tpl->setContent($tab->getHTML());
92 }
TableGUI class for survey questions to skill assignment.

References $tpl, and ilGlobalPageTemplate\setContent().

+ Here is the call graph for this function:

◆ removeSkillFromQuestion()

ilSurveySkillGUI::removeSkillFromQuestion ( )

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

135 : void
136 {
137 $ilCtrl = $this->ctrl;
139
140 $skill_survey = new ilSurveySkill($this->survey);
141 $skill_survey->removeQuestionSkillAssignment(
142 $this->edit_request->getQuestionId()
143 );
144 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
145
146 $ilCtrl->redirect($this, "listQuestionAssignment");
147 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
Skill/Competence handling in surveys.

References $ctrl, $lng, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ selectSkillForQuestion()

ilSurveySkillGUI::selectSkillForQuestion ( )

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

115 : void
116 {
117 $ilCtrl = $this->ctrl;
119
120 $skill_survey = new ilSurveySkill($this->survey);
121 $skill_id_parts = explode(
122 ":",
123 $this->edit_request->getSelectedSkill()
124 );
125 $skill_survey->addQuestionSkillAssignment(
126 $this->edit_request->getQuestionId(),
127 (int) $skill_id_parts[0],
128 (int) $skill_id_parts[1]
129 );
130 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
131
132 $ilCtrl->redirect($this, "listQuestionAssignment");
133 }

References $ctrl, $lng, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ setSubTabs()

ilSurveySkillGUI::setSubTabs ( string  $a_activate)

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

149 : void
150 {
151 $ilTabs = $this->tabs;
153 $ilCtrl = $this->ctrl;
154
155 $ilTabs->addSubTab(
156 "survey_skill_assign",
157 $lng->txt("survey_skill_assign"),
158 $ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment")
159 );
160
161 $ilTabs->addSubTab(
162 "skill_thresholds",
163 $lng->txt("survey_skill_thresholds"),
164 $ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences")
165 );
166
167 $ilTabs->activateSubTab($a_activate);
168 }

References $ctrl, $lng, $tabs, and ilLanguage\txt().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSurveySkillGUI::$ctrl
protected

◆ $edit_request

ILIAS Survey Editing EditingGUIRequest ilSurveySkillGUI::$edit_request
protected

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

◆ $lng

ilLanguage ilSurveySkillGUI::$lng
protected

◆ $survey

ilObjSurvey ilSurveySkillGUI::$survey
protected

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

◆ $tabs

ilTabsGUI ilSurveySkillGUI::$tabs
protected

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

Referenced by setSubTabs().

◆ $tpl

ilGlobalPageTemplate ilSurveySkillGUI::$tpl
protected

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

Referenced by assignSkillToQuestion(), and listQuestionAssignment().

◆ $user

ilObjUser ilSurveySkillGUI::$user
protected

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


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