ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilTestSkillEvaluationToolbarGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
5require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
6
14{
15 const SKILL_PROFILE_PARAM = 'skill_profile';
16
20 private $ctrl;
21
25 private $lng;
26
27 private $parentGUI;
28 private $parentCMD;
29
31
33
35
37 {
38 $this->ctrl = $ctrl;
39 $this->lng = $lng;
40
41 $this->parentGUI = $parentGUI;
42 $this->parentCMD = $parentCMD;
43
44 parent::__construct();
45 }
46
48 {
49 $this->availableSkillProfiles = $availableSkillProfiles;
50 }
51
52 public function getAvailableSkillProfiles()
53 {
55 }
56
58 {
59 $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
60 }
61
63 {
65 }
66
68 {
69 $this->selectedEvaluationMode = $selectedEvaluationMode;
70 }
71
72 public function getSelectedEvaluationMode()
73 {
75 }
76
77 public function build()
78 {
79 $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
80
81 $select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
82 $select->setOptions($this->buildEvaluationModeOptionsArray());
83 $select->setValue($this->getSelectedEvaluationMode());
84 $this->addInputItem($select, true);
85
86 $this->addFormButton($this->lng->txt("select"), $this->parentCMD);
87 }
88
90 {
91 $options = array();
92
94 {
95 $options[0] = $this->lng->txt('tst_all_test_competences');;
96 }
97
98 foreach($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle)
99 {
100 $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
101 }
102
103 return $options;
104 }
105
106 public static function fetchSkillProfileParam($postData)
107 {
108 if( isset($postData[self::SKILL_PROFILE_PARAM]) )
109 {
110 return (int)$postData[self::SKILL_PROFILE_PARAM];
111 }
112
113 return 0;
114 }
115}
This class provides processing control methods.
language handling
This class represents a selection list property in a property form.
__construct(ilCtrl $ctrl, ilLanguage $lng, $parentGUI, $parentCMD)
setNoSkillProfileOptionEnabled($noSkillProfileOptionEnabled)
setFormAction($a_val, $a_multipart=false, $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags.
addInputItem(ilToolbarItem $a_item, $a_output_label=false)
Add input item.
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
if(!is_array($argv)) $options