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

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

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

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

Execute command.

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

References $cmd, $ilCtrl, and array.

29  {
30  global $ilCtrl;
31 
32  $cmd = $ilCtrl->getCmd();
33 
34  $ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
35 
36  if (in_array($cmd, array("listCompetences", "listSkillThresholds", "selectSkill",
37  "saveThresholds")))
38  {
39  $this->$cmd();
40  }
41  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ listCompetences()

ilSurveySkillThresholdsGUI::listCompetences ( )

List competences.

Parameters

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

References $tab, and $tpl.

50  {
51  global $tpl;
52 
53  include_once("./Modules/Survey/classes/class.ilSurveySkillTableGUI.php");
54  $tab = new ilSurveySkillTableGUI($this, "listCompetences", $this->survey);
55  $tpl->setContent($tab->getHTML());
56  }
TableGUI class for skill list in survey.
global $tpl
Definition: ilias.php:8

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

List skill thresholds.

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

References $_GET, $ilCtrl, $lng, $tab, and $tpl.

63  {
64  global $tpl, $ilToolbar, $lng, $ilCtrl, $ilTabs;
65 
66  $ilTabs->clearTargets();
67  $ilTabs->setBackTarget($lng->txt("svy_back"),
68  $ilCtrl->getLinkTarget($this, "listCompetences"));
69 
70  include_once("./Modules/Survey/classes/class.ilSurveySkillThresholdsTableGUI.php");
71  $tab = new ilSurveySkillThresholdsTableGUI($this, "listSkillThresholds",
72  $this->survey, (int) $_GET["sk_id"], (int) $_GET["tref_id"]);
73  $tpl->setContent($tab->getHTML());
74  }
$_GET["client_id"]
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
TableGUI class for competence thresholds.
global $lng
Definition: privfeed.php:17

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

Save Thresholds.

Parameters

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

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

99  {
100  global $ilCtrl, $lng;
101 
102  include_once("./Modules/Survey/classes/class.ilSurveySkillThresholds.php");
103  $thres = new ilSurveySkillThresholds($this->survey);
104 
105  if (is_array($_POST["threshold"]))
106  {
107  foreach ($_POST["threshold"] as $l => $t)
108  {
109  $thres->writeThreshold((int) $_GET["sk_id"],
110  (int) $_GET["tref_id"], (int) $l, (int) $t);
111  }
112  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), 1);
113  }
114 
115  $ilCtrl->redirect($this, "listSkillThresholds");
116  }
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
global $lng
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

Select skill.

Parameters

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

References $_POST, and $ilCtrl.

83  {
84  global $ilCtrl;
85 
86  $o = explode(":", $_POST["skill"]);
87  $ilCtrl->setParameter($this, "sk_id", (int) $o[0]);
88  $ilCtrl->setParameter($this, "tref_id", (int) $o[1]);
89  $ilCtrl->redirect($this, "listSkillThresholds");
90  }
global $ilCtrl
Definition: ilias.php:18
$_POST["username"]

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