ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 

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 20 of file class.ilSurveySkillGUI.php.

21  {
22  $this->survey = $a_survey;
23  }

Member Function Documentation

◆ assignSkillToQuestion()

ilSurveySkillGUI::assignSkillToQuestion ( )

Assign skill to question.

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

References $ilCtrl, $ilUser, $lng, and $tpl.

73  {
74  global $ilUser, $tpl, $ilCtrl, $lng, $ilTabs;
75 
76  $ilCtrl->saveParameter($this, "q_id");
77 
78 
79  include_once("./Services/Skill/classes/class.ilSkillSelectorGUI.php");
80  $sel = new ilSkillSelectorGUI($this, "assignSkillToQuestion", $this, "selectSkillForQuestion");
81  if (!$sel->handleCommand())
82  {
83  $tpl->setContent($sel->getHTML());
84  }
85 
86 return;
87  /*
88  include_once("./Services/Skill/classes/class.ilSkillTree.php");
89  $skill_tree = new ilSkillTree();
90 
91  require_once ("./Modules/Survey/classes/class.ilSurveySkillExplorer.php");
92  $exp = new ilSurveySkillExplorer($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
93  $exp->setTargetGet("obj_id");
94 
95  $exp->setExpandTarget($ilCtrl->getLinkTarget($this, "assignSkillToQuestion"));
96 
97  if ($_GET["skpexpand"] == "")
98  {
99  $expanded = $skill_tree->readRootId();
100  }
101  else
102  {
103  $expanded = $_GET["skpexpand"];
104  }
105 
106  $exp->setExpand($expanded);
107  // build html-output
108  $exp->setOutput(0);
109  $output = $exp->getOutput();
110 
111  // asynchronous output
112  if ($ilCtrl->isAsynch())
113  {
114  echo $output; exit;
115  }
116 
117  $tpl->setContent($output); */
118  }
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
Explorer class that works on tree objects (Services/Tree)
global $lng
Definition: privfeed.php:17

◆ executeCommand()

ilSurveySkillGUI::executeCommand ( )

Execute command.

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

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

29  {
30  global $ilCtrl;
31 
32  $cmd = $ilCtrl->getCmd();
33  $next_class = $ilCtrl->getNextClass();
34 
35  switch ($next_class)
36  {
37  case 'ilsurveyskillthresholdsgui':
38  $this->setSubTabs("skill_thresholds");
39  include_once("./Modules/Survey/classes/class.ilSurveySkillThresholdsGUI.php");
40  $gui = new ilSurveySkillThresholdsGUI($this->survey);
41  $ilCtrl->forwardCommand($gui);
42  break;
43 
44  default:
45  if (in_array($cmd, array("listQuestionAssignment",
46  "assignSkillToQuestion", "selectSkillForQuestion",
47  "removeSkillFromQuestion")))
48  {
49  $this->setSubTabs("survey_skill_assign");
50  $this->$cmd();
51  }
52  break;
53  }
54  }
setSubTabs($a_activate)
Set subtabs.
$cmd
Definition: sahs_server.php:35
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 59 of file class.ilSurveySkillGUI.php.

References $tab, and $tpl.

60  {
61  global $tpl;
62 
63  include_once("./Modules/Survey/classes/class.ilSurveySkillAssignmentTableGUI.php");
64  $tab = new ilSurveySkillAssignmentTableGUI($this, "listQuestionAssignment",
65  $this->survey);
66  $tpl->setContent($tab->getHTML());
67  }
global $tpl
Definition: ilias.php:8
TableGUI class for survey questions to skill assignment.

◆ removeSkillFromQuestion()

ilSurveySkillGUI::removeSkillFromQuestion ( )

Remove skill from question.

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

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

141  {
142  global $ilCtrl, $lng;
143 
144  include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
145  $skill_survey = new ilSurveySkill($this->survey);
146  $skill_survey->removeQuestionSkillAssignment((int) $_GET["q_id"]);
147  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
148 
149  $ilCtrl->redirect($this, "listQuestionAssignment");
150  }
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.
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ selectSkillForQuestion()

ilSurveySkillGUI::selectSkillForQuestion ( )

Select skill for question.

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

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

124  {
125  global $ilCtrl, $lng;
126 
127  include_once("./Modules/Survey/classes/class.ilSurveySkill.php");
128  $skill_survey = new ilSurveySkill($this->survey);
129  $skill_id_parts = explode(":", $_GET["selected_skill"]);
130  $skill_survey->addQuestionSkillAssignment((int) $_GET["q_id"],
131  (int) $skill_id_parts[0], (int) $skill_id_parts[1]);
132  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
133 
134  $ilCtrl->redirect($this, "listQuestionAssignment");
135  }
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.
global $lng
Definition: privfeed.php:17
+ 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 157 of file class.ilSurveySkillGUI.php.

References $ilCtrl, and $lng.

Referenced by executeCommand().

158  {
159  global $ilTabs, $lng, $ilCtrl;
160 
161  $ilTabs->addSubtab("survey_skill_assign",
162  $lng->txt("survey_skill_assign"),
163  $ilCtrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment"));
164 
165  $ilTabs->addSubTab("skill_thresholds",
166  $lng->txt("survey_skill_thresholds"),
167  $ilCtrl->getLinkTargetByClass("ilsurveyskillthresholdsgui", "listCompetences"));
168 
169  $ilTabs->activateSubtab($a_activate);
170  }
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:17
+ Here is the caller graph for this function:

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