ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilSurveySkillThresholdsGUI Class Reference

Survey skill thresholds GUI class. More...

+ Collaboration diagram for ilSurveySkillThresholdsGUI:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 
 executeCommand ()
 
 listCompetences ()
 
 listSkillThresholds ()
 
 selectSkill ()
 
 saveThresholds ()
 

Protected Attributes

ilObjSurvey $survey
 
ILIAS Survey Editing EditingGUIRequest $edit_request
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilToolbarGUI $toolbar
 
ilLanguage $lng
 
ilTabsGUI $tabs
 

Detailed Description

Survey skill thresholds GUI class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilSurveySkillThresholdsGUI:

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

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillThresholdsGUI::__construct ( ilObjSurvey  $a_survey)

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

38 {
39 global $DIC;
40
41 $this->ctrl = $DIC->ctrl();
42 $this->tpl = $DIC["tpl"];
43 $this->toolbar = $DIC->toolbar();
44 $this->lng = $DIC->language();
45 $this->tabs = $DIC->tabs();
46 $this->survey = $a_survey;
47 $this->edit_request = $DIC->survey()
48 ->internal()
49 ->gui()
50 ->editing()
51 ->request();
52 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

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

54 : void
55 {
56 $ilCtrl = $this->ctrl;
57
58 $cmd = $ilCtrl->getCmd();
59
60 $ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
61
62 if (in_array($cmd, array("listCompetences", "listSkillThresholds", "selectSkill",
63 "saveThresholds"))) {
64 $this->$cmd();
65 }
66 }
getCmd(?string $fallback_command=null)
@inheritDoc

References $ctrl, and ilCtrl\getCmd().

+ Here is the call graph for this function:

◆ listCompetences()

ilSurveySkillThresholdsGUI::listCompetences ( )

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

68 : void
69 {
71
72 $tab = new ilSurveySkillTableGUI($this, "listCompetences", $this->survey);
73 $tpl->setContent($tab->getHTML());
74 }
TableGUI class for skill list in survey.
setContent(string $a_html)
Sets content for standard template.

References $tpl, and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

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

76 : void
77 {
80 $ilCtrl = $this->ctrl;
81 $ilTabs = $this->tabs;
82
83 $ilTabs->clearTargets();
84 $ilTabs->setBackTarget(
85 $lng->txt("svy_back"),
86 $ilCtrl->getLinkTarget($this, "listCompetences")
87 );
88
90 $this,
91 "listSkillThresholds",
92 $this->survey,
93 $this->edit_request->getSkillId(),
94 $this->edit_request->getTrefId()
95 );
96 $tpl->setContent($tab->getHTML());
97 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
TableGUI class for competence thresholds.
clearTargets()
clear all targets

References $ctrl, $lng, $tabs, $tpl, ilTabsGUI\clearTargets(), ILIAS\UICore\GlobalTemplate\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

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

109 : void
110 {
111 $ilCtrl = $this->ctrl;
113
114 $thres = new ilSurveySkillThresholds($this->survey);
115
116 $thresholds = $this->edit_request->getThresholds();
117 if (count($thresholds) > 0) {
118 foreach ($thresholds as $l => $t) {
119 $thres->writeThreshold(
120 $this->edit_request->getSkillId(),
121 $this->edit_request->getTrefId(),
122 (int) $l,
123 (int) $t
124 );
125 }
126 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
127 }
128
129 $ilCtrl->redirect($this, "listSkillThresholds");
130 }
Skill tresholds for 360 surveys.

References $ctrl, $lng, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

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

99 : void
100 {
101 $ilCtrl = $this->ctrl;
102
103 $o = explode(":", $this->edit_request->getSkill());
104 $ilCtrl->setParameter($this, "sk_id", (int) $o[0]);
105 $ilCtrl->setParameter($this, "tref_id", (int) $o[1]);
106 $ilCtrl->redirect($this, "listSkillThresholds");
107 }

References $ctrl.

Field Documentation

◆ $ctrl

ilCtrl ilSurveySkillThresholdsGUI::$ctrl
protected

◆ $edit_request

ILIAS Survey Editing EditingGUIRequest ilSurveySkillThresholdsGUI::$edit_request
protected

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

◆ $lng

ilLanguage ilSurveySkillThresholdsGUI::$lng
protected

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

Referenced by listSkillThresholds(), and saveThresholds().

◆ $survey

ilObjSurvey ilSurveySkillThresholdsGUI::$survey
protected

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

◆ $tabs

ilTabsGUI ilSurveySkillThresholdsGUI::$tabs
protected

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

Referenced by listSkillThresholds().

◆ $toolbar

ilToolbarGUI ilSurveySkillThresholdsGUI::$toolbar
protected

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

◆ $tpl

ilGlobalTemplateInterface ilSurveySkillThresholdsGUI::$tpl
protected

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

Referenced by listCompetences(), and listSkillThresholds().


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