ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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 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.

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

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: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSurveySkillThresholdsGUI::executeCommand ( )

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

References $ctrl, and ilCtrl\getCmd().

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)
+ Here is the call graph for this function:

◆ listCompetences()

ilSurveySkillThresholdsGUI::listCompetences ( )

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

References $tpl, and ilGlobalTemplateInterface\setContent().

66  : void
67  {
68  $tpl = $this->tpl;
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.
+ Here is the call graph for this function:

◆ listSkillThresholds()

ilSurveySkillThresholdsGUI::listSkillThresholds ( )

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

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

74  : void
75  {
76  $tpl = $this->tpl;
77  $lng = $this->lng;
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...
setContent(string $a_html)
Sets content for standard template.
clearTargets()
clear all targets
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ saveThresholds()

ilSurveySkillThresholdsGUI::saveThresholds ( )

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

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

107  : void
108  {
109  $ilCtrl = $this->ctrl;
110  $lng = $this->lng;
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  }
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...
+ Here is the call graph for this function:

◆ selectSkill()

ilSurveySkillThresholdsGUI::selectSkill ( )

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

References $ctrl, and ilCtrl\setParameter().

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  }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

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: