ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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/UIComponent/Button/classes/class.ilLinkButton.php';
6require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
7
15{
16 const SKILL_PROFILE_PARAM = 'skill_profile';
17
21 private $ctrl;
22
23 private $parentGUI;
24 private $parentCMD;
25
27
29
31
33 {
34 $this->ctrl = $ctrl;
35
36 $this->parentGUI = $parentGUI;
37 $this->parentCMD = $parentCMD;
38
39 parent::__construct();
40 }
41
43 {
44 $this->availableSkillProfiles = $availableSkillProfiles;
45 }
46
47 public function getAvailableSkillProfiles()
48 {
50 }
51
53 {
54 $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
55 }
56
58 {
60 }
61
63 {
64 $this->selectedEvaluationMode = $selectedEvaluationMode;
65 }
66
67 public function getSelectedEvaluationMode()
68 {
70 }
71
72 public function build()
73 {
74 $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
75
76 $select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
77 $select->setOptions($this->buildEvaluationModeOptionsArray());
78 $select->setValue($this->getSelectedEvaluationMode());
79 $this->addInputItem($select, true);
80
81 $this->addFormButton($this->lng->txt("select"), $this->parentCMD);
82 }
83
85 {
86 $options = array();
87
88 if ($this->isNoSkillProfileOptionEnabled()) {
89 $options[0] = $this->lng->txt('tst_all_test_competences');
90 ;
91 }
92
93 foreach ($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle) {
94 $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
95 }
96
97 return $options;
98 }
99
100 public static function fetchSkillProfileParam($postData)
101 {
102 if (isset($postData[self::SKILL_PROFILE_PARAM])) {
104 }
105
106 return 0;
107 }
108}
An exception for terminatinating execution or to throw for unit testing.
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($session===NULL) $postData