ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestRandomQuestionSetGeneralConfigFormGUI Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetGeneralConfigFormGUI:
+ Collaboration diagram for ilTestRandomQuestionSetGeneralConfigFormGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilLanguage $lng, ilObjTest $testOBJ, ilTestRandomQuestionSetConfigGUI $questionSetConfigGUI, ilTestRandomQuestionSetConfig $questionSetConfig)
 build ()
 save ()
- Public Member Functions inherited from ilPropertyFormGUI
 ilPropertyFormGUI ()
 Constructor.
executeCommand ()
 Execute command.
 setTableWidth ($a_width)
 Set table width.
 getTableWidth ()
 get table width
 setMode ($a_mode)
 Set Mode ('std', 'subform').
 getMode ()
 Get Mode ('std', 'subform').
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setTitleIcon ($a_titleicon)
 Set TitleIcon.
 getTitleIcon ()
 Get TitleIcon.
 setDescription ($a_val)
 Set description.
 getDescription ()
 Get description.
 setTopAnchor ($a_val)
 Set top anchor.
 getTopAnchor ()
 Get top anchor.
 setShowTopButtons ($a_val)
 Get show top buttons.
 getShowTopButtons ()
 Set show top buttons.
 addItem ($a_item)
 Add Item (Property, SectionHeader).
 removeItemByPostVar ($a_post_var)
 Remove Item.
 getItemByPostVar ($a_post_var)
 Get Item by POST variable.
 setItems ($a_items)
 Set Items.
 getItems ()
 Get Items.
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively
 setDisableStandardMessage ($a_val)
 Set disable standard message.
 getDisableStandardMessage ()
 Get disable standard message.
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not.
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not.
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array.
 setValuesByPost ()
 Set form values from POST values.
 checkInput ()
 Check Post Input.
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id.
 addCustomProperty ($a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property.
 addCommandButton ($a_cmd, $a_text)
 Add Command button.
 clearCommandButtons ()
 Remove all command buttons.
 getContent ()
 Get Content.
 insertItem ($item, $a_sub_item=false)
 getHTML ()
 Get HTML.
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data.
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded?
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory.
- Public Member Functions inherited from ilFormGUI
 ilFormGUI ()
 Constructor.
 setFormAction ($a_formaction)
 Set FormAction.
 getFormAction ()
 Get FormAction.
 setTarget ($a_target)
 Set Target.
 getTarget ()
 Get Target.
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false.
 getMultipart ()
 Get Enctype Multipart/Formdata true/false.
 setId ($a_id)
 Set Id.
 getId ()
 Get Id.
 setName ($a_name)
 Set Name.
 getName ()
 Get Name.
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open.
 getKeepOpen ()
 Get Keep Form Tag Open.
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag.
 getOpenTag ()
 Get Open Form Tag Enabled.
 setCloseTag ($a_val)
 Set close tag.
 getCloseTag ()
 Get close tag.
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission.
 getPreventDoubleSubmission ()
 Get prevent double submission.

Data Fields

 $ctrl = null
 $lng = null
 $testOBJ = null
 $questionSetConfigGUI = null
 $questionSetConfig = null

Private Member Functions

 fetchValidQuestionAmountConfigModeWithFallbackModePerTest (ilTestRandomQuestionSetConfig $config)

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 keepFileUpload ($a_hash, $a_field, $a_tmp_name, $a_name, $a_type, $a_index=null, $a_sub_index=null)
 Import upload into temp directory.
 rebuildUploadedFiles ()
 try to rebuild files
- Protected Attributes inherited from ilPropertyFormGUI
 $mode = "std"
 $check_input_called = false
 $disable_standard_message = false
 $top_anchor = "il_form_top"
 $titleicon = false
 $description = ""
 $tbl_width = false
 $show_top_buttons = true
 $reloaded_files
 $hide_labels = false

Detailed Description

Constructor & Destructor Documentation

ilTestRandomQuestionSetGeneralConfigFormGUI::__construct ( ilCtrl  $ctrl,
ilLanguage  $lng,
ilObjTest  $testOBJ,
ilTestRandomQuestionSetConfigGUI  $questionSetConfigGUI,
ilTestRandomQuestionSetConfig  $questionSetConfig 
)

Definition at line 53 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

References $ctrl, $lng, $questionSetConfig, $questionSetConfigGUI, and $testOBJ.

{
$this->ctrl = $ctrl;
$this->lng = $lng;
// Bugfix for mantis: 0015081
$this->lng->loadLanguageModule('form');
$this->testOBJ = $testOBJ;
$this->questionSetConfigGUI = $questionSetConfigGUI;
$this->questionSetConfig = $questionSetConfig;
}

Member Function Documentation

ilTestRandomQuestionSetGeneralConfigFormGUI::build ( )

Definition at line 64 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilTestRandomQuestionSetConfigGUI\CMD_SAVE_GENERAL_CONFIG_FORM, fetchValidQuestionAmountConfigModeWithFallbackModePerTest(), ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_TEST, ilFormGUI\setFormAction(), ilFormGUI\setId(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilPropertyFormGUI\setTitle(), and ilRadioGroupInputGUI\setValue().

{
$this->setFormAction( $this->ctrl->getFormAction($this->questionSetConfigGUI) );
$this->setTitle( $this->lng->txt('tst_rnd_quest_set_cfg_general_form') );
$this->setId('tstRndQuestSetCfgGeneralForm');
);
// Require Pools with Homogeneous Scored Questions
$requirePoolsQuestionsHomoScored = new ilCheckboxInputGUI(
$this->lng->txt('tst_inp_all_quest_points_equal_per_pool'), 'quest_points_equal_per_pool'
);
$requirePoolsQuestionsHomoScored->setInfo(
$this->lng->txt('tst_inp_all_quest_points_equal_per_pool_desc')
);
$requirePoolsQuestionsHomoScored->setChecked(
$this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired()
);
$this->addItem($requirePoolsQuestionsHomoScored);
// question amount config mode (per test / per pool)
$questionAmountConfigMode = new ilRadioGroupInputGUI(
$this->lng->txt('tst_inp_quest_amount_cfg_mode'), 'quest_amount_cfg_mode'
);
$this->questionSetConfig
));
$questionAmountConfigModePerTest = new ilRadioOption(
$this->lng->txt('tst_inp_quest_amount_cfg_mode_test'),
);
$questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
$questionAmountConfigModePerPool = new ilRadioOption(
$this->lng->txt('tst_inp_quest_amount_cfg_mode_pool'),
);
$questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
$questionAmountConfigMode->setRequired(true);
$this->addItem($questionAmountConfigMode);
// question amount per test
$questionAmountPerTest = new ilNumberInputGUI(
$this->lng->txt('tst_inp_quest_amount_per_test'), 'quest_amount_per_test'
);
$questionAmountPerTest->setRequired(true);
$questionAmountPerTest->setMinValue(1);
$questionAmountPerTest->allowDecimals(false);
$questionAmountPerTest->setMinvalueShouldBeGreater(false);
$questionAmountPerTest->setSize(4);
$questionAmountPerTest->setValue(
$this->questionSetConfig->getQuestionAmountPerTest()
);
$questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
if( $this->testOBJ->participantDataExist() )
{
$requirePoolsQuestionsHomoScored->setDisabled(true);
$questionAmountConfigMode->setDisabled(true);
$questionAmountPerTest->setDisabled(true);
}
}

+ Here is the call graph for this function:

ilTestRandomQuestionSetGeneralConfigFormGUI::save ( )

Definition at line 159 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

References ilPropertyFormGUI\getItemByPostVar(), ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_POOL, and ilTestRandomQuestionSetConfig\QUESTION_AMOUNT_CONFIG_MODE_PER_TEST.

{
$this->questionSetConfig->setPoolsWithHomogeneousScoredQuestionsRequired(
$this->getItemByPostVar('quest_points_equal_per_pool')->getChecked()
);
switch( $this->getItemByPostVar('quest_amount_cfg_mode')->getValue() )
{
$this->questionSetConfig->setQuestionAmountConfigurationMode(
$this->getItemByPostVar('quest_amount_cfg_mode')->getValue()
);
$this->questionSetConfig->setQuestionAmountPerTest(
$this->getItemByPostVar('quest_amount_per_test')->getValue()
);
break;
$this->questionSetConfig->setQuestionAmountConfigurationMode(
$this->getItemByPostVar('quest_amount_cfg_mode')->getValue()
);
$this->questionSetConfig->setQuestionAmountPerTest(null);
break;
}
return $this->questionSetConfig->saveToDb( $this->testOBJ->getTestId() );
}

+ Here is the call graph for this function:

Field Documentation

ilTestRandomQuestionSetGeneralConfigFormGUI::$ctrl = null

Definition at line 23 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

Referenced by __construct().

ilTestRandomQuestionSetGeneralConfigFormGUI::$lng = null

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

Referenced by __construct().

ilTestRandomQuestionSetGeneralConfigFormGUI::$questionSetConfig = null

Definition at line 51 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

Referenced by __construct().

ilTestRandomQuestionSetGeneralConfigFormGUI::$questionSetConfigGUI = null

Definition at line 44 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

Referenced by __construct().

ilTestRandomQuestionSetGeneralConfigFormGUI::$testOBJ = null

Definition at line 37 of file class.ilTestRandomQuestionSetGeneralConfigFormGUI.php.

Referenced by __construct().


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