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

Survey skill thresholds GUI class. More...

+ Collaboration diagram for ilSurveySkillThresholdsGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 listCompetences ()
 List competences. More...
 
 listSkillThresholds ()
 List skill thresholds. More...
 
 selectSkill ()
 Select skill. More...
 
 saveThresholds ()
 Save Thresholds. More...
 

Protected Attributes

 $ctrl
 
 $tpl
 
 $toolbar
 
 $lng
 
 $tabs
 

Detailed Description

Survey skill thresholds GUI class.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillThresholdsGUI::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
object$a_survey

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

References $DIC.

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

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

Execute command.

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

References $ctrl, and $ilCtrl.

61  {
63 
64  $cmd = $ilCtrl->getCmd();
65 
66  $ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
67 
68  if (in_array($cmd, array("listCompetences", "listSkillThresholds", "selectSkill",
69  "saveThresholds"))) {
70  $this->$cmd();
71  }
72  }
global $ilCtrl
Definition: ilias.php:18

◆ listCompetences()

ilSurveySkillThresholdsGUI::listCompetences ( )

List competences.

Parameters

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

References $tab, and $tpl.

81  {
82  $tpl = $this->tpl;
83 
84  $tab = new ilSurveySkillTableGUI($this, "listCompetences", $this->survey);
85  $tpl->setContent($tab->getHTML());
86  }
TableGUI class for skill list in survey.

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

List skill thresholds.

Definition at line 92 of file class.ilSurveySkillThresholdsGUI.php.

References $_GET, $ctrl, $ilCtrl, $lng, $tab, $tabs, $toolbar, and $tpl.

93  {
94  $tpl = $this->tpl;
95  $ilToolbar = $this->toolbar;
96  $lng = $this->lng;
98  $ilTabs = $this->tabs;
99 
100  $ilTabs->clearTargets();
101  $ilTabs->setBackTarget(
102  $lng->txt("svy_back"),
103  $ilCtrl->getLinkTarget($this, "listCompetences")
104  );
105 
107  $this,
108  "listSkillThresholds",
109  $this->survey,
110  (int) $_GET["sk_id"],
111  (int) $_GET["tref_id"]
112  );
113  $tpl->setContent($tab->getHTML());
114  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
TableGUI class for competence thresholds.

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

Save Thresholds.

Parameters

Definition at line 138 of file class.ilSurveySkillThresholdsGUI.php.

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

139  {
141  $lng = $this->lng;
142 
143  $thres = new ilSurveySkillThresholds($this->survey);
144 
145  if (is_array($_POST["threshold"])) {
146  foreach ($_POST["threshold"] as $l => $t) {
147  $thres->writeThreshold(
148  (int) $_GET["sk_id"],
149  (int) $_GET["tref_id"],
150  (int) $l,
151  (int) $t
152  );
153  }
154  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), 1);
155  }
156 
157  $ilCtrl->redirect($this, "listSkillThresholds");
158  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Skill tresholds for 360 surveys.
$_POST["username"]

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

Select skill.

Parameters

Definition at line 122 of file class.ilSurveySkillThresholdsGUI.php.

References $_POST, $ctrl, and $ilCtrl.

123  {
125 
126  $o = explode(":", $_POST["skill"]);
127  $ilCtrl->setParameter($this, "sk_id", (int) $o[0]);
128  $ilCtrl->setParameter($this, "tref_id", (int) $o[1]);
129  $ilCtrl->redirect($this, "listSkillThresholds");
130  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

Field Documentation

◆ $ctrl

ilSurveySkillThresholdsGUI::$ctrl
protected

◆ $lng

ilSurveySkillThresholdsGUI::$lng
protected

Definition at line 33 of file class.ilSurveySkillThresholdsGUI.php.

Referenced by listSkillThresholds(), and saveThresholds().

◆ $tabs

ilSurveySkillThresholdsGUI::$tabs
protected

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

Referenced by listSkillThresholds().

◆ $toolbar

ilSurveySkillThresholdsGUI::$toolbar
protected

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

Referenced by listSkillThresholds().

◆ $tpl

ilSurveySkillThresholdsGUI::$tpl
protected

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

Referenced by listCompetences(), and listSkillThresholds().


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