ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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

 $testOBJ = null
 
 $settingsTemplate = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestSettingsGUI::__construct ( ilObjTest  $testOBJ)

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

28 {
29 $this->testOBJ = $testOBJ;
30
31 $templateId = $this->testOBJ->getTemplate();
32
33 if ($templateId) {
34 include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
35 $this->settingsTemplate = new ilSettingsTemplate($templateId, ilObjAssessmentFolderGUI::getSettingsTemplateConfig());
36 }
37 }
Settings template application class.

References $testOBJ, and ilObjAssessmentFolderGUI\getSettingsTemplateConfig().

+ Here is the call graph for this function:

Member Function Documentation

◆ formPropertyExists()

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

◆ getTemplateSettingValue()

ilTestSettingsGUI::getTemplateSettingValue (   $settingName)
protected

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

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

Referenced by ilObjTestSettingsGeneralGUI\addTestRunProperties().

+ Here is the caller graph for this function:

◆ isHiddenFormItem()

ilTestSettingsGUI::isHiddenFormItem (   $formFieldId)
protected

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

55 {
56 if (!$this->settingsTemplate) {
57 return false;
58 }
59
60 $settings = $this->settingsTemplate->getSettings();
61
62 if (!isset($settings[$formFieldId])) {
63 return false;
64 }
65
66 if (!$settings[$formFieldId]['hide']) {
67 return false;
68 }
69
70 return true;
71 }

Referenced by isSectionHeaderRequired(), and ilObjTestSettingsScoringResultsGUI\saveResultMiscOptionsSettings().

+ Here is the caller graph for this function:

◆ isSectionHeaderRequired()

ilTestSettingsGUI::isSectionHeaderRequired (   $fields)
protected

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

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

References isHiddenFormItem().

Referenced by ilObjTestSettingsGeneralGUI\addQuestionBehaviourProperties(), and ilObjTestSettingsScoringResultsGUI\addScoringSettingsFormSection().

+ 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 89 of file class.ilTestSettingsGUI.php.

90 {
91 if ($this->settingsTemplate) {
92 foreach ($this->settingsTemplate->getSettings() as $id => $item) {
93 if ($item["hide"]) {
94 $form->removeItemByPostVar($id);
95 }
96 }
97 }
98 }
if(!array_key_exists('StateId', $_REQUEST)) $id

References $form, and $id.

Referenced by ilObjTestSettingsGeneralGUI\buildForm().

+ Here is the caller graph for this function:

Field Documentation

◆ $settingsTemplate

ilTestSettingsGUI::$settingsTemplate = null
protected

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

◆ $testOBJ

ilObjTest ilTestSettingsGUI::$testOBJ = null
protected

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

Referenced by __construct().


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