ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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$ 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.

References $DIC, and user().

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  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ assignSkillToQuestion()

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

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

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

106  {
108  $tpl = $this->tpl;
110  $lng = $this->lng;
111  $ilTabs = $this->tabs;
112 
113  $ilCtrl->saveParameter($this, "q_id");
114 
115 
116  include_once("./Services/Skill/classes/class.ilSkillSelectorGUI.php");
117  $sel = new ilSkillSelectorGUI($this, "assignSkillToQuestion", $this, "selectSkillForQuestion");
118  if (!$sel->handleCommand()) {
119  $tpl->setContent($sel->getHTML());
120  }
121 
122  return;
123  /*
124  include_once("./Services/Skill/classes/class.ilSkillTree.php");
125  $skill_tree = new ilSkillTree();
126 
127  require_once ("./Modules/Survey/classes/class.ilSurveySkillExplorer.php");
128  $exp = new ilSurveySkillExplorer($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
129  $exp->setTargetGet("obj_id");
130 
131  $exp->setExpandTarget($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
132 
133  if ($_GET["skpexpand"] == "")
134  {
135  $expanded = $skill_tree->readRootId();
136  }
137  else
138  {
139  $expanded = $_GET["skpexpand"];
140  }
141 
142  $exp->setExpand($expanded);
143  // build html-output
144  $exp->setOutput(0);
145  $output = $exp->getOutput();
146 
147  // asynchronous output
148  if ($ilCtrl->isAsynch())
149  {
150  echo $output; exit;
151  }
152 
153  $tpl->setContent($output); */
154  }
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
Explorer class that works on tree objects (Services/Tree)

◆ executeCommand()

ilSurveySkillGUI::executeCommand ( )

Execute command.

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

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

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  include_once("./Modules/Survey/classes/class.ilSurveySkillThresholdsGUI.php");
71  $gui = new ilSurveySkillThresholdsGUI($this->survey);
72  $ilCtrl->forwardCommand($gui);
73  break;
74 
75  default:
76  if (in_array($cmd, array("listQuestionAssignment",
77  "assignSkillToQuestion", "selectSkillForQuestion",
78  "removeSkillFromQuestion"))) {
79  $this->setSubTabs("survey_skill_assign");
80  $this->$cmd();
81  }
82  break;
83  }
84  }
setSubTabs($a_activate)
Set subtabs.
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
Survey skill thresholds GUI class.
+ Here is the call graph for this function:

◆ listQuestionAssignment()

ilSurveySkillGUI::listQuestionAssignment ( )

List question to skill assignment.

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

References $tab, and $tpl.

90  {
91  $tpl = $this->tpl;
92 
93  include_once("./Modules/Survey/classes/class.ilSurveySkillAssignmentTableGUI.php");
95  $this,
96  "listQuestionAssignment",
97  $this->survey
98  );
99  $tpl->setContent($tab->getHTML());
100  }
TableGUI class for survey questions to skill assignment.

◆ removeSkillFromQuestion()

ilSurveySkillGUI::removeSkillFromQuestion ( )

Remove skill from question.

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

References $_GET, $ctrl, $ilCtrl, $lng, and ilUtil\sendSuccess().

181  {
183  $lng = $this->lng;
184 
185  include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
186  $skill_survey = new ilSurveySkill($this->survey);
187  $skill_survey->removeQuestionSkillAssignment((int) $_GET["q_id"]);
188  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
189 
190  $ilCtrl->redirect($this, "listQuestionAssignment");
191  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Skill/Competence handling in surveys.
+ Here is the call graph for this function:

◆ selectSkillForQuestion()

ilSurveySkillGUI::selectSkillForQuestion ( )

Select skill for question.

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

References $_GET, $ctrl, $ilCtrl, $lng, and ilUtil\sendSuccess().

160  {
162  $lng = $this->lng;
163 
164  include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
165  $skill_survey = new ilSurveySkill($this->survey);
166  $skill_id_parts = explode(":", $_GET["selected_skill"]);
167  $skill_survey->addQuestionSkillAssignment(
168  (int) $_GET["q_id"],
169  (int) $skill_id_parts[0],
170  (int) $skill_id_parts[1]
171  );
172  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
173 
174  $ilCtrl->redirect($this, "listQuestionAssignment");
175  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Skill/Competence handling in surveys.
+ Here is the call graph for this function:

◆ setSubTabs()

ilSurveySkillGUI::setSubTabs (   $a_activate)

Set subtabs.

Parameters
string$a_activateactivate sub tab (ID)

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

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

Referenced by executeCommand().

199  {
200  $ilTabs = $this->tabs;
201  $lng = $this->lng;
203 
204  $ilTabs->addSubtab(
205  "survey_skill_assign",
206  $lng->txt("survey_skill_assign"),
207  $ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment")
208  );
209 
210  $ilTabs->addSubTab(
211  "skill_thresholds",
212  $lng->txt("survey_skill_thresholds"),
213  $ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences")
214  );
215 
216  $ilTabs->activateSubtab($a_activate);
217  }
global $ilCtrl
Definition: ilias.php:18
+ 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: