ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 {
35 include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
36 $this->settingsTemplate = new ilSettingsTemplate($templateId, ilObjAssessmentFolderGUI::getSettingsTemplateConfig());
37 }
38 }
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 40 of file class.ilTestSettingsGUI.php.

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

Referenced by ilObjTestSettingsGeneralGUI\addTestRunProperties().

+ Here is the caller graph for this function:

◆ isHiddenFormItem()

ilTestSettingsGUI::isHiddenFormItem (   $formFieldId)
protected

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

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

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

+ Here is the caller graph for this function:

◆ isSectionHeaderRequired()

ilTestSettingsGUI::isSectionHeaderRequired (   $fields)
protected

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

80 {
81 foreach($fields as $field)
82 {
83 if( !$this->isHiddenFormItem($field) )
84 {
85 return true;
86 }
87 }
88
89 return false;
90 }

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

98 {
99 if( $this->settingsTemplate )
100 {
101 foreach ($this->settingsTemplate->getSettings() as $id => $item)
102 {
103 if ($item["hide"])
104 {
105 $form->removeItemByPostVar($id);
106 }
107 }
108 }
109 }
removeItemByPostVar($a_post_var)
Remove Item.

References 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

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: