ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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$ @ilCtrl_Calls 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.

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 }
global $DIC
Definition: saml.php:7

References $DIC.

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

Execute command.

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

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

References $ctrl, and $ilCtrl.

◆ listCompetences()

ilSurveySkillThresholdsGUI::listCompetences ( )

List competences.

Parameters

return

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

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

References $tab, and $tpl.

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

List skill thresholds.

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

94 {
96 $ilToolbar = $this->toolbar;
99 $ilTabs = $this->tabs;
100
101 $ilTabs->clearTargets();
102 $ilTabs->setBackTarget(
103 $lng->txt("svy_back"),
104 $ilCtrl->getLinkTarget($this, "listCompetences")
105 );
106
107 include_once("./Modules/Survey/classes/class.ilSurveySkillThresholdsTableGUI.php");
109 $this,
110 "listSkillThresholds",
111 $this->survey,
112 (int) $_GET["sk_id"],
113 (int) $_GET["tref_id"]
114 );
115 $tpl->setContent($tab->getHTML());
116 }
$_GET["client_id"]
TableGUI class for competence thresholds.

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

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

Save Thresholds.

Parameters

return

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

141 {
144
145 include_once("./Modules/Survey/classes/class.ilSurveySkillThresholds.php");
146 $thres = new ilSurveySkillThresholds($this->survey);
147
148 if (is_array($_POST["threshold"])) {
149 foreach ($_POST["threshold"] as $l => $t) {
150 $thres->writeThreshold(
151 (int) $_GET["sk_id"],
152 (int) $_GET["tref_id"],
153 (int) $l,
154 (int) $t
155 );
156 }
157 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), 1);
158 }
159
160 $ilCtrl->redirect($this, "listSkillThresholds");
161 }
global $l
Definition: afr.php:30
$_POST["username"]
Skill tresholds for 360 surveys.

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

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

Select skill.

Parameters

return

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

125 {
127
128 $o = explode(":", $_POST["skill"]);
129 $ilCtrl->setParameter($this, "sk_id", (int) $o[0]);
130 $ilCtrl->setParameter($this, "tref_id", (int) $o[1]);
131 $ilCtrl->redirect($this, "listSkillThresholds");
132 }

References $_POST, $ctrl, and $ilCtrl.

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: