ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSurveySkillGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Survey skill service GUI class

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

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

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillGUI::__construct ( ilObjSurvey  $a_survey)

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

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

36  {
37  global $DIC;
38 
39  $this->ctrl = $DIC->ctrl();
40  $this->tpl = $DIC["tpl"];
41  $this->user = $DIC->user();
42  $this->lng = $DIC->language();
43  $this->tabs = $DIC->tabs();
44  $this->survey = $a_survey;
45  $this->edit_request = $DIC->survey()
46  ->internal()
47  ->gui()
48  ->editing()
49  ->request();
50  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ assignSkillToQuestion()

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

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

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

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

◆ executeCommand()

ilSurveySkillGUI::executeCommand ( )

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

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

52  : void
53  {
54  $ilCtrl = $this->ctrl;
55 
56  $cmd = $ilCtrl->getCmd();
57  $next_class = $ilCtrl->getNextClass();
58 
59  switch ($next_class) {
60  case 'ilsurveyskillthresholdsgui':
61  $this->setSubTabs("skill_thresholds");
62  $gui = new ilSurveySkillThresholdsGUI($this->survey);
63  $ilCtrl->forwardCommand($gui);
64  break;
65 
66  default:
67  if (in_array($cmd, array("listQuestionAssignment",
68  "assignSkillToQuestion", "selectSkillForQuestion",
69  "removeSkillFromQuestion"))) {
70  $this->setSubTabs("survey_skill_assign");
71  $this->$cmd();
72  }
73  break;
74  }
75  }
getCmd(?string $fallback_command=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSubTabs(string $a_activate)
+ Here is the call graph for this function:

◆ listQuestionAssignment()

ilSurveySkillGUI::listQuestionAssignment ( )

List question to skill assignment.

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

References $tpl, and ilGlobalPageTemplate\setContent().

80  : void
81  {
82  $tpl = $this->tpl;
83 
85  $this,
86  "listQuestionAssignment",
87  $this->survey
88  );
89  $tpl->setContent($tab->getHTML());
90  }
ilGlobalPageTemplate $tpl
TableGUI class for survey questions to skill assignment.
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ removeSkillFromQuestion()

ilSurveySkillGUI::removeSkillFromQuestion ( )

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

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

133  : void
134  {
135  $ilCtrl = $this->ctrl;
136  $lng = $this->lng;
137 
138  $skill_survey = new ilSurveySkill($this->survey);
139  $skill_survey->removeQuestionSkillAssignment(
140  $this->edit_request->getQuestionId()
141  );
142  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
143 
144  $ilCtrl->redirect($this, "listQuestionAssignment");
145  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ selectSkillForQuestion()

ilSurveySkillGUI::selectSkillForQuestion ( )

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

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

113  : void
114  {
115  $ilCtrl = $this->ctrl;
116  $lng = $this->lng;
117 
118  $skill_survey = new ilSurveySkill($this->survey);
119  $skill_id_parts = explode(
120  ":",
121  $this->edit_request->getSelectedSkill()
122  );
123  $skill_survey->addQuestionSkillAssignment(
124  $this->edit_request->getQuestionId(),
125  (int) $skill_id_parts[0],
126  (int) $skill_id_parts[1]
127  );
128  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
129 
130  $ilCtrl->redirect($this, "listQuestionAssignment");
131  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ setSubTabs()

ilSurveySkillGUI::setSubTabs ( string  $a_activate)

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

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

Referenced by executeCommand().

147  : void
148  {
149  $ilTabs = $this->tabs;
150  $lng = $this->lng;
151  $ilCtrl = $this->ctrl;
152 
153  $ilTabs->addSubTab(
154  "survey_skill_assign",
155  $lng->txt("survey_skill_assign"),
156  $ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment")
157  );
158 
159  $ilTabs->addSubTab(
160  "skill_thresholds",
161  $lng->txt("survey_skill_thresholds"),
162  $ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences")
163  );
164 
165  $ilTabs->activateSubTab($a_activate);
166  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ 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 27 of file class.ilSurveySkillGUI.php.

◆ $lng

ilLanguage ilSurveySkillGUI::$lng
protected

◆ $survey

ilObjSurvey ilSurveySkillGUI::$survey
protected

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

◆ $tabs

ilTabsGUI ilSurveySkillGUI::$tabs
protected

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

Referenced by setSubTabs().

◆ $tpl

ilGlobalPageTemplate ilSurveySkillGUI::$tpl
protected

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

Referenced by assignSkillToQuestion(), and listQuestionAssignment().

◆ $user

ilObjUser ilSurveySkillGUI::$user
protected

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


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