ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSurveySkillThresholdsGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 24 of file class.ilSurveySkillThresholdsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSurveySkillThresholdsGUI::__construct ( ilObjSurvey  $a_survey)

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

36 {
37 global $DIC;
38
39 $this->ctrl = $DIC->ctrl();
40 $this->tpl = $DIC["tpl"];
41 $this->toolbar = $DIC->toolbar();
42 $this->lng = $DIC->language();
43 $this->tabs = $DIC->tabs();
44 $this->survey = $a_survey;
45 $this->edit_request = $DIC->survey()
46 ->internal()
47 ->gui()
48 ->editing()
49 ->request();
50 }
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 52 of file class.ilSurveySkillThresholdsGUI.php.

52 : void
53 {
54 $ilCtrl = $this->ctrl;
55
56 $cmd = $ilCtrl->getCmd();
57
58 $ilCtrl->saveParameter($this, array("sk_id", "tref_id"));
59
60 if (in_array($cmd, array("listCompetences", "listSkillThresholds", "selectSkill",
61 "saveThresholds"))) {
62 $this->$cmd();
63 }
64 }
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 66 of file class.ilSurveySkillThresholdsGUI.php.

66 : void
67 {
69
70 $tab = new ilSurveySkillTableGUI($this, "listCompetences", $this->survey);
71 $tpl->setContent($tab->getHTML());
72 }
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 74 of file class.ilSurveySkillThresholdsGUI.php.

74 : void
75 {
78 $ilCtrl = $this->ctrl;
79 $ilTabs = $this->tabs;
80
81 $ilTabs->clearTargets();
82 $ilTabs->setBackTarget(
83 $lng->txt("svy_back"),
84 $ilCtrl->getLinkTarget($this, "listCompetences")
85 );
86
88 $this,
89 "listSkillThresholds",
90 $this->survey,
91 $this->edit_request->getSkillId(),
92 $this->edit_request->getTrefId()
93 );
94 $tpl->setContent($tab->getHTML());
95 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 107 of file class.ilSurveySkillThresholdsGUI.php.

107 : void
108 {
109 $ilCtrl = $this->ctrl;
111
112 $thres = new ilSurveySkillThresholds($this->survey);
113
114 $thresholds = $this->edit_request->getThresholds();
115 if (count($thresholds) > 0) {
116 foreach ($thresholds as $l => $t) {
117 $thres->writeThreshold(
118 $this->edit_request->getSkillId(),
119 $this->edit_request->getTrefId(),
120 (int) $l,
121 (int) $t
122 );
123 }
124 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), 1);
125 }
126
127 $ilCtrl->redirect($this, "listSkillThresholds");
128 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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

+ Here is the call graph for this function:

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

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

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

References $ctrl.

Field Documentation

◆ $ctrl

ilCtrl ilSurveySkillThresholdsGUI::$ctrl
protected

◆ $edit_request

ILIAS Survey Editing EditingGUIRequest ilSurveySkillThresholdsGUI::$edit_request
protected

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

◆ $lng

ilLanguage ilSurveySkillThresholdsGUI::$lng
protected

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

Referenced by listSkillThresholds(), and saveThresholds().

◆ $survey

ilObjSurvey ilSurveySkillThresholdsGUI::$survey
protected

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

◆ $tabs

ilTabsGUI ilSurveySkillThresholdsGUI::$tabs
protected

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

Referenced by listSkillThresholds().

◆ $toolbar

ilToolbarGUI ilSurveySkillThresholdsGUI::$toolbar
protected

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

◆ $tpl

ilGlobalTemplateInterface ilSurveySkillThresholdsGUI::$tpl
protected

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

Referenced by listCompetences(), and listSkillThresholds().


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