ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

ilTestSettingsGUI::__construct ( ilObjTest  $testOBJ)

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

References $testOBJ, and ilObjAssessmentFolderGUI\getSettingsTemplateConfig().

{
$this->testOBJ = $testOBJ;
$templateId = $this->testOBJ->getTemplate();
if( $templateId )
{
include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
$this->settingsTemplate = new ilSettingsTemplate($templateId, ilObjAssessmentFolderGUI::getSettingsTemplateConfig());
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestSettingsGUI::getTemplateSettingValue (   $settingName)
protected

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

Referenced by ilObjTestSettingsGeneralGUI\addTestRunProperties().

{
if( !$this->settingsTemplate )
{
return null;
}
$templateSettings = $this->settingsTemplate->getSettings();
if( !isset($templateSettings[$settingName]) )
{
return false;
}
return $templateSettings[$settingName]['value'];
}

+ Here is the caller graph for this function:

ilTestSettingsGUI::isHiddenFormItem (   $formFieldId)
protected

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

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

{
if( !$this->settingsTemplate )
{
return false;
}
$settings = $this->settingsTemplate->getSettings();
if( !isset($settings[$formFieldId]) )
{
return false;
}
if( !$settings[$formFieldId]['hide'] )
{
return false;
}
return true;
}

+ Here is the caller graph for this function:

ilTestSettingsGUI::isSectionHeaderRequired (   $fields)
protected

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

References isHiddenFormItem().

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

{
foreach($fields as $field)
{
if( !$this->isHiddenFormItem($field) )
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSettingsGUI::removeHiddenItems ( ilPropertyFormGUI  $form)
protected

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

References ilPropertyFormGUI\removeItemByPostVar().

Referenced by ilObjTestSettingsGeneralGUI\buildForm().

{
if( $this->settingsTemplate )
{
foreach ($this->settingsTemplate->getSettings() as $id => $item)
{
if ($item["hide"])
{
$form->removeItemByPostVar($id);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilTestSettingsGUI::$settingsTemplate = null
protected

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

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: