ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestSkillEvaluationToolbarGUI Class Reference
+ Inheritance diagram for ilTestSkillEvaluationToolbarGUI:
+ Collaboration diagram for ilTestSkillEvaluationToolbarGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, $parentGUI, $parentCMD)
 
 setAvailableSkillProfiles ($availableSkillProfiles)
 
 getAvailableSkillProfiles ()
 
 setNoSkillProfileOptionEnabled ($noSkillProfileOptionEnabled)
 
 isNoSkillProfileOptionEnabled ()
 
 setSelectedEvaluationMode ($selectedEvaluationMode)
 
 getSelectedEvaluationMode ()
 
 isTestResultButtonEnabled ()
 
 setTestResultButtonEnabled ($testResultButtonEnabled)
 
 build ()
 
- Public Member Functions inherited from ilToolbarGUI
 __construct ()
 
 setFormAction ($a_val, $a_multipart=false, $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 Get form action. More...
 
 setLeadingImage ($a_img, $a_alt)
 Set leading image. More...
 
 setHidden ($a_val)
 Set hidden. More...
 
 getHidden ()
 Get hidden. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 addButton ( $a_txt, $a_cmd, $a_target="", $a_acc_key="", $a_additional_attrs='', $a_id="", $a_class='submit')
 Add button to toolbar. More...
 
 addFormButton ($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
 Add form button to toolbar. More...
 
 addInputItem (ilToolbarItem $a_item, $a_output_label=false)
 Add input item. More...
 
 addStickyItem ($a_item, $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown ($a_txt, $a_dd_html)
 Add input item. More...
 
 addSeparator ()
 Add separator. More...
 
 addText ($a_text)
 Add text. More...
 
 addSpacer ($a_width=null)
 Add spacer. More...
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 Add component. More...
 
 addLink ($a_caption, $a_url, $a_disabled=false)
 Add link. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 setFormName ($a_val)
 Set form name. More...
 
 getFormName ()
 Get form name. More...
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems ($items)
 

Static Public Member Functions

static fetchSkillProfileParam ($postData)
 

Data Fields

const SKILL_PROFILE_PARAM = 'skill_profile'
 
- Data Fields inherited from ilToolbarGUI
 $items = array()
 

Private Member Functions

 buildEvaluationModeOptionsArray ()
 

Private Attributes

 $ctrl
 
 $parentGUI
 
 $parentCMD
 
 $availableSkillProfiles
 
 $noSkillProfileOptionEnabled
 
 $selectedEvaluationMode
 
 $testResultButtonEnabled = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilToolbarGUI
 applyAutoStickyToSingleElement ()
 If the toolbar consists of only one button, make it sticky Note: Atm this is only possible for buttons. More...
 
- Protected Attributes inherited from ilToolbarGUI
 $lng
 
 $id = ''
 
 $form_action = ''
 
 $hidden
 
 $lead_img
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $form_target = ""
 
 $form_name = ""
 
 $prevent_double_submission = false
 
 $sticky_items = array()
 
 $has_separator = false
 
- Static Protected Attributes inherited from ilToolbarGUI
static $instances = 0
 

Detailed Description

Definition at line 14 of file class.ilTestSkillEvaluationToolbarGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillEvaluationToolbarGUI::__construct ( ilCtrl  $ctrl,
ilLanguage  $lng,
  $parentGUI,
  $parentCMD 
)

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

References $ctrl, $parentCMD, and $parentGUI.

35  {
36  $this->ctrl = $ctrl;
37 
38  $this->parentGUI = $parentGUI;
39  $this->parentCMD = $parentCMD;
40 
41  parent::__construct();
42  }

Member Function Documentation

◆ build()

ilTestSkillEvaluationToolbarGUI::build ( )

Definition at line 84 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $parentCMD, ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addFormButton(), ilToolbarGUI\addInputItem(), ilToolbarGUI\addSeparator(), buildEvaluationModeOptionsArray(), ilLinkButton\getInstance(), getSelectedEvaluationMode(), isTestResultButtonEnabled(), ilToolbarGUI\setFormAction(), and ilSelectInputGUI\setOptions().

85  {
86  if ($this->isTestResultButtonEnabled()) {
87  $link = ilLinkButton::getInstance(); // always returns a new instance
88  $link->setUrl($this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'outUserResultsOverview'));
89  $link->setCaption($this->lng->txt("tst_show_results"), false);
90  $this->addButtonInstance($link);
91 
92  $this->addSeparator();
93  }
94 
95  $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
96 
97  $select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
99  $select->setValue($this->getSelectedEvaluationMode());
100  $this->addInputItem($select, true);
101 
102  $this->addFormButton($this->lng->txt("select"), $this->parentCMD);
103  }
This class represents a selection list property in a property form.
addButtonInstance(ilButtonBase $a_button)
Add button instance.
addInputItem(ilToolbarItem $a_item, $a_output_label=false)
Add input item.
setFormAction($a_val, $a_multipart=false, $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
addSeparator()
Add separator.
setOptions($a_options)
Set Options.
+ Here is the call graph for this function:

◆ buildEvaluationModeOptionsArray()

ilTestSkillEvaluationToolbarGUI::buildEvaluationModeOptionsArray ( )
private

Definition at line 105 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $options, array, getAvailableSkillProfiles(), and isNoSkillProfileOptionEnabled().

Referenced by build().

106  {
107  $options = array();
108 
109  if ($this->isNoSkillProfileOptionEnabled()) {
110  $options[0] = $this->lng->txt('tst_all_test_competences');
111  ;
112  }
113 
114  foreach ($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle) {
115  $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
116  }
117 
118  return $options;
119  }
Create styles array
The data for the language used.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchSkillProfileParam()

static ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam (   $postData)
static

Definition at line 121 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $postData.

Referenced by ilTestSkillEvaluationGUI\showCmd().

122  {
123  if (isset($postData[self::SKILL_PROFILE_PARAM])) {
124  return (int) $postData[self::SKILL_PROFILE_PARAM];
125  }
126 
127  return 0;
128  }
if($session===NULL) $postData
+ Here is the caller graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationToolbarGUI::getAvailableSkillProfiles ( )

Definition at line 49 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $availableSkillProfiles.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ getSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::getSelectedEvaluationMode ( )

Definition at line 69 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $selectedEvaluationMode.

Referenced by build().

+ Here is the caller graph for this function:

◆ isNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::isNoSkillProfileOptionEnabled ( )

Definition at line 59 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $noSkillProfileOptionEnabled.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ isTestResultButtonEnabled()

ilTestSkillEvaluationToolbarGUI::isTestResultButtonEnabled ( )

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

References $testResultButtonEnabled.

Referenced by build().

+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

ilTestSkillEvaluationToolbarGUI::setAvailableSkillProfiles (   $availableSkillProfiles)

Definition at line 44 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $availableSkillProfiles.

45  {
46  $this->availableSkillProfiles = $availableSkillProfiles;
47  }

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::setNoSkillProfileOptionEnabled (   $noSkillProfileOptionEnabled)

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

References $noSkillProfileOptionEnabled.

55  {
56  $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
57  }

◆ setSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::setSelectedEvaluationMode (   $selectedEvaluationMode)

Definition at line 64 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $selectedEvaluationMode.

65  {
66  $this->selectedEvaluationMode = $selectedEvaluationMode;
67  }

◆ setTestResultButtonEnabled()

ilTestSkillEvaluationToolbarGUI::setTestResultButtonEnabled (   $testResultButtonEnabled)

Definition at line 79 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $testResultButtonEnabled.

80  {
81  $this->testResultButtonEnabled = $testResultButtonEnabled;
82  }

Field Documentation

◆ $availableSkillProfiles

ilTestSkillEvaluationToolbarGUI::$availableSkillProfiles
private

◆ $ctrl

ilTestSkillEvaluationToolbarGUI::$ctrl
private

Definition at line 21 of file class.ilTestSkillEvaluationToolbarGUI.php.

Referenced by __construct().

◆ $noSkillProfileOptionEnabled

ilTestSkillEvaluationToolbarGUI::$noSkillProfileOptionEnabled
private

◆ $parentCMD

ilTestSkillEvaluationToolbarGUI::$parentCMD
private

Definition at line 24 of file class.ilTestSkillEvaluationToolbarGUI.php.

Referenced by __construct(), and build().

◆ $parentGUI

ilTestSkillEvaluationToolbarGUI::$parentGUI
private

Definition at line 23 of file class.ilTestSkillEvaluationToolbarGUI.php.

Referenced by __construct().

◆ $selectedEvaluationMode

ilTestSkillEvaluationToolbarGUI::$selectedEvaluationMode
private

◆ $testResultButtonEnabled

ilTestSkillEvaluationToolbarGUI::$testResultButtonEnabled = false
private

◆ SKILL_PROFILE_PARAM

const ilTestSkillEvaluationToolbarGUI::SKILL_PROFILE_PARAM = 'skill_profile'

Definition at line 16 of file class.ilTestSkillEvaluationToolbarGUI.php.


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