ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 build ()
 
- Public Member Functions inherited from ilToolbarGUI
 setFormAction (string $a_val, bool $a_multipart=false, string $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 
 setLeadingImage (string $a_img, string $a_alt)
 
 setHidden (bool $a_val)
 
 getHidden ()
 
 setId (string $a_val)
 
 getId ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 addButton (string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')
 
 addFormButton (string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
 
 addInputItem (ilToolbarItem $a_item, bool $a_output_label=false)
 
 addStickyItem ( $a_item, bool $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown (string $a_txt, string $a_dd_html)
 
 addAdvancedSelectionList (ilAdvancedSelectionListGUI $adv)
 
 addSeparator ()
 
 addText (string $a_text)
 
 addSpacer (string $a_width=null)
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 
 addLink (string $a_caption, string $a_url, bool $a_disabled=false)
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 setFormName (string $a_val)
 
 getFormName ()
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems (array $items)
 

Static Public Member Functions

static fetchSkillProfileParam ($postData)
 

Data Fields

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

Private Member Functions

 buildEvaluationModeOptionsArray ()
 

Private Attributes

ilCtrl $ctrl
 
 $parentGUI
 
 $parentCMD
 
 $availableSkillProfiles
 
 $noSkillProfileOptionEnabled
 
 $selectedEvaluationMode
 

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
ilLanguage $lng
 
string $id = ''
 
string $form_action = ''
 
bool $hidden = false
 
array $lead_img
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
string $form_target = ""
 
string $form_name = ""
 
bool $prevent_double_submission = false
 
array $sticky_items = array()
 
bool $has_separator = false
 
ILIAS DI UIServices $ui
 
bool $multipart = false
 
- Static Protected Attributes inherited from ilToolbarGUI
static int $instances = 0
 

Detailed Description

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

References $parentCMD, ilToolbarGUI\addFormButton(), ilToolbarGUI\addInputItem(), buildEvaluationModeOptionsArray(), ILIAS\Repository\ctrl(), getSelectedEvaluationMode(), ILIAS\Repository\lng(), and ilToolbarGUI\setFormAction().

77  : void
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  }
setFormAction(string $a_val, bool $a_multipart=false, string $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
addInputItem(ilToolbarItem $a_item, bool $a_output_label=false)
+ Here is the call graph for this function:

◆ buildEvaluationModeOptionsArray()

ilTestSkillEvaluationToolbarGUI::buildEvaluationModeOptionsArray ( )
private

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

References getAvailableSkillProfiles(), isNoSkillProfileOptionEnabled(), and ILIAS\Repository\lng().

Referenced by build().

89  : array
90  {
91  $options = array();
92 
93  if ($this->isNoSkillProfileOptionEnabled()) {
94  $options[0] = $this->lng->txt('tst_all_test_competences');
95  ;
96  }
97 
98  foreach ($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle) {
99  $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
100  }
101 
102  return $options;
103  }
+ 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 105 of file class.ilTestSkillEvaluationToolbarGUI.php.

Referenced by ilTestSkillEvaluationGUI\showCmd(), and ilTestSkillEvaluationToolbarGUITest\testFetchSkillProfileParam().

105  : int
106  {
107  if (isset($postData[self::SKILL_PROFILE_PARAM])) {
108  return (int) $postData[self::SKILL_PROFILE_PARAM];
109  }
110 
111  return 0;
112  }
+ Here is the caller graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationToolbarGUI::getAvailableSkillProfiles ( )

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

References $availableSkillProfiles.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ getSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::getSelectedEvaluationMode ( )

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

References $selectedEvaluationMode.

Referenced by build().

+ Here is the caller graph for this function:

◆ isNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::isNoSkillProfileOptionEnabled ( )

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

References $noSkillProfileOptionEnabled.

Referenced by buildEvaluationModeOptionsArray().

+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

ilTestSkillEvaluationToolbarGUI::setAvailableSkillProfiles (   $availableSkillProfiles)

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

References $availableSkillProfiles.

47  : void
48  {
49  $this->availableSkillProfiles = $availableSkillProfiles;
50  }

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationToolbarGUI::setNoSkillProfileOptionEnabled (   $noSkillProfileOptionEnabled)

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

References $noSkillProfileOptionEnabled.

57  : void
58  {
59  $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
60  }

◆ setSelectedEvaluationMode()

ilTestSkillEvaluationToolbarGUI::setSelectedEvaluationMode (   $selectedEvaluationMode)

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

References $selectedEvaluationMode.

67  : void
68  {
69  $this->selectedEvaluationMode = $selectedEvaluationMode;
70  }

Field Documentation

◆ $availableSkillProfiles

ilTestSkillEvaluationToolbarGUI::$availableSkillProfiles
private

◆ $ctrl

ilCtrl ilTestSkillEvaluationToolbarGUI::$ctrl
private

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

Referenced by __construct().

◆ $noSkillProfileOptionEnabled

ilTestSkillEvaluationToolbarGUI::$noSkillProfileOptionEnabled
private

◆ $parentCMD

ilTestSkillEvaluationToolbarGUI::$parentCMD
private

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

Referenced by __construct(), and build().

◆ $parentGUI

ilTestSkillEvaluationToolbarGUI::$parentGUI
private

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

Referenced by __construct().

◆ $selectedEvaluationMode

ilTestSkillEvaluationToolbarGUI::$selectedEvaluationMode
private

◆ SKILL_PROFILE_PARAM

const ilTestSkillEvaluationToolbarGUI::SKILL_PROFILE_PARAM = 'skill_profile'

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