ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 (ilToolbarItem $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...
 
 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
 
 $lng
 
 $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
 $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 
)

Member Function Documentation

◆ build()

ilTestSkillEvaluationToolbarGUI::build ( )

Definition at line 90 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().

91  {
92  if( $this->isTestResultButtonEnabled() )
93  {
94  $link = ilLinkButton::getInstance(); // always returns a new instance
95  $link->setUrl($this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'outUserResultsOverview'));
96  $link->setCaption($this->lng->txt("tst_show_results"), false);
97  $this->addButtonInstance($link);
98 
99  $this->addSeparator();
100  }
101 
102  $this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
103 
104  $select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
105  $select->setOptions($this->buildEvaluationModeOptionsArray());
106  $select->setValue($this->getSelectedEvaluationMode());
107  $this->addInputItem($select, true);
108 
109  $this->addFormButton($this->lng->txt("select"), $this->parentCMD);
110  }
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 112 of file class.ilTestSkillEvaluationToolbarGUI.php.

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

Referenced by build().

113  {
114  $options = array();
115 
116  if( $this->isNoSkillProfileOptionEnabled() )
117  {
118  $options[0] = $this->lng->txt('tst_all_test_competences');;
119  }
120 
121  foreach($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle)
122  {
123  $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
124  }
125 
126  return $options;
127  }
if(!is_array($argv)) $options
Create styles array
The data for the language used.
+ 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 129 of file class.ilTestSkillEvaluationToolbarGUI.php.

Referenced by ilTestSkillEvaluationGUI\showCmd().

130  {
131  if( isset($postData[self::SKILL_PROFILE_PARAM]) )
132  {
133  return (int)$postData[self::SKILL_PROFILE_PARAM];
134  }
135 
136  return 0;
137  }
+ Here is the caller graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationToolbarGUI::getAvailableSkillProfiles ( )

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

References $availableSkillProfiles.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ getSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::getSelectedEvaluationMode ( )

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

References $selectedEvaluationMode.

Referenced by build().

+ Here is the caller graph for this function:

◆ isNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::isNoSkillProfileOptionEnabled ( )

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

References $noSkillProfileOptionEnabled.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ isTestResultButtonEnabled()

ilTestSkillEvaluationToolbarGUI::isTestResultButtonEnabled ( )

Definition at line 80 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 50 of file class.ilTestSkillEvaluationToolbarGUI.php.

References $availableSkillProfiles.

51  {
52  $this->availableSkillProfiles = $availableSkillProfiles;
53  }

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::setNoSkillProfileOptionEnabled (   $noSkillProfileOptionEnabled)

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

References $noSkillProfileOptionEnabled.

61  {
62  $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
63  }

◆ setSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::setSelectedEvaluationMode (   $selectedEvaluationMode)

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

References $selectedEvaluationMode.

71  {
72  $this->selectedEvaluationMode = $selectedEvaluationMode;
73  }

◆ setTestResultButtonEnabled()

ilTestSkillEvaluationToolbarGUI::setTestResultButtonEnabled (   $testResultButtonEnabled)

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

References $testResultButtonEnabled.

86  {
87  $this->testResultButtonEnabled = $testResultButtonEnabled;
88  }

Field Documentation

◆ $availableSkillProfiles

ilTestSkillEvaluationToolbarGUI::$availableSkillProfiles
private

◆ $ctrl

ilTestSkillEvaluationToolbarGUI::$ctrl
private

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

Referenced by __construct().

◆ $lng

ilTestSkillEvaluationToolbarGUI::$lng
private

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

Referenced by __construct().

◆ $noSkillProfileOptionEnabled

ilTestSkillEvaluationToolbarGUI::$noSkillProfileOptionEnabled
private

◆ $parentCMD

ilTestSkillEvaluationToolbarGUI::$parentCMD
private

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

Referenced by __construct(), and build().

◆ $parentGUI

ilTestSkillEvaluationToolbarGUI::$parentGUI
private

Definition at line 28 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: