ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

Execute command.

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

References $ctrl, $ilCtrl, and array.

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
Create styles array
The data for the language used.

◆ 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  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.

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

List skill thresholds.

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

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

94  {
95  $tpl = $this->tpl;
96  $ilToolbar = $this->toolbar;
97  $lng = $this->lng;
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"]
global $ilCtrl
Definition: ilias.php:18
TableGUI class for competence thresholds.

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

Save Thresholds.

Parameters

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

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

141  {
143  $lng = $this->lng;
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  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Skill tresholds for 360 surveys.
global $l
Definition: afr.php:30
$_POST["username"]
+ Here is the call graph for this function:

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

Select skill.

Parameters

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

References $_POST, $ctrl, and $ilCtrl.

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  }
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: