ILIAS  release_8 Revision v8.24
ilTestSettingsGUI Class Reference
+ Inheritance diagram for ilTestSettingsGUI:
+ Collaboration diagram for ilTestSettingsGUI:

Public Member Functions

 __construct (ilObjTest $testOBJ)
 

Protected Member Functions

 getTemplateSettingValue ($settingName)
 
 isHiddenFormItem ($formFieldId)
 
 isSectionHeaderRequired ($fields)
 
 formPropertyExists (ilPropertyFormGUI $form, $propertyId)
 
 removeHiddenItems (ilPropertyFormGUI $form)
 

Protected Attributes

ilObjTest $testOBJ
 
ilSettingsTemplate $settingsTemplate = null
 

Detailed Description

Definition at line 25 of file class.ilTestSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestSettingsGUI::__construct ( ilObjTest  $testOBJ)

Definition at line 30 of file class.ilTestSettingsGUI.php.

31 {
32 $this->testOBJ = $testOBJ;
33
34 $templateId = $this->testOBJ->getTemplate();
35
36 if ($templateId) {
37 $this->settingsTemplate = new ilSettingsTemplate($templateId, ilObjAssessmentFolderGUI::getSettingsTemplateConfig());
38 }
39 }
Settings template application class.

References $testOBJ, ilObjAssessmentFolderGUI\getSettingsTemplateConfig(), and ilObjTest\getTemplate().

+ Here is the call graph for this function:

Member Function Documentation

◆ formPropertyExists()

ilTestSettingsGUI::formPropertyExists ( ilPropertyFormGUI  $form,
  $propertyId 
)
protected

Definition at line 86 of file class.ilTestSettingsGUI.php.

86 : bool
87 {
88 return $form->getItemByPostVar($propertyId) instanceof ilFormPropertyGUI;
89 }
This class represents a property in a property form.
getItemByPostVar(string $a_post_var)

References ilPropertyFormGUI\getItemByPostVar().

Referenced by ilObjTestSettingsGeneralGUI\saveQuestionBehaviourProperties(), ilObjTestSettingsGeneralGUI\saveTestAccessProperties(), ilObjTestSettingsGeneralGUI\saveTestFinishProperties(), and ilObjTestSettingsGeneralGUI\saveTestSequenceSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplateSettingValue()

ilTestSettingsGUI::getTemplateSettingValue (   $settingName)
protected

Definition at line 41 of file class.ilTestSettingsGUI.php.

42 {
43 if (!$this->settingsTemplate) {
44 return null;
45 }
46
47 $templateSettings = $this->settingsTemplate->getSettings();
48
49 if (!isset($templateSettings[$settingName])) {
50 return false;
51 }
52
53 return $templateSettings[$settingName]['value'];
54 }

Referenced by ilObjTestSettingsGeneralGUI\addTestRunProperties().

+ Here is the caller graph for this function:

◆ isHiddenFormItem()

ilTestSettingsGUI::isHiddenFormItem (   $formFieldId)
protected

Definition at line 56 of file class.ilTestSettingsGUI.php.

56 : bool
57 {
58 if (!$this->settingsTemplate) {
59 return false;
60 }
61
62 $settings = $this->settingsTemplate->getSettings();
63
64 if (!isset($settings[$formFieldId])) {
65 return false;
66 }
67
68 if (!$settings[$formFieldId]['hide']) {
69 return false;
70 }
71
72 return true;
73 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200

References ILIAS\LTI\ToolProvider\$settings.

Referenced by isSectionHeaderRequired().

+ Here is the caller graph for this function:

◆ isSectionHeaderRequired()

ilTestSettingsGUI::isSectionHeaderRequired (   $fields)
protected

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

75 : bool
76 {
77 foreach ($fields as $field) {
78 if (!$this->isHiddenFormItem($field)) {
79 return true;
80 }
81 }
82
83 return false;
84 }

References isHiddenFormItem().

Referenced by ilObjTestSettingsGeneralGUI\addQuestionBehaviourProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeHiddenItems()

ilTestSettingsGUI::removeHiddenItems ( ilPropertyFormGUI  $form)
protected

Definition at line 91 of file class.ilTestSettingsGUI.php.

92 {
93 if ($this->settingsTemplate) {
94 foreach ($this->settingsTemplate->getSettings() as $id => $item) {
95 if ($item["hide"]) {
97 }
98 }
99 }
100 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
removeItemByPostVar(string $a_post_var, bool $a_remove_unused_headers=false)

References $id, and ilPropertyFormGUI\removeItemByPostVar().

Referenced by ilObjTestSettingsGeneralGUI\buildForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $settingsTemplate

ilSettingsTemplate ilTestSettingsGUI::$settingsTemplate = null
protected

Definition at line 28 of file class.ilTestSettingsGUI.php.

◆ $testOBJ

ilObjTest ilTestSettingsGUI::$testOBJ
protected

Definition at line 27 of file class.ilTestSettingsGUI.php.

Referenced by __construct().


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