19 declare(strict_types=1);
    42         $this->
lng->loadLanguageModule(
'form');
    59         $this->
setTitle($this->
lng->txt(
'tst_rnd_quest_set_cfg_general_form'));
    60         $this->
setId(
'tstRndQuestSetCfgGeneralForm');
    64             $this->
lng->txt(
'save')
    68             $this->
lng->txt(
'tst_inp_all_quest_points_equal_per_pool'),
    69             'quest_points_equal_per_pool'    72         $requirePoolsQuestionsHomoScored->setInfo(
    73             $this->
lng->txt(
'tst_inp_all_quest_points_equal_per_pool_desc')
    76         $requirePoolsQuestionsHomoScored->setChecked(
    78             $this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired()
    81         $this->
addItem($requirePoolsQuestionsHomoScored);
    86             $this->
lng->txt(
'tst_inp_quest_amount_cfg_mode'),
    87             'quest_amount_cfg_mode'    91             $this->questionSetConfig
    95             $this->
lng->txt(
'tst_inp_quest_amount_cfg_mode_test'),
    99         $questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
   102             $this->
lng->txt(
'tst_inp_quest_amount_cfg_mode_pool'),
   106         $questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
   108         $questionAmountConfigMode->setRequired(
true);
   110         $this->
addItem($questionAmountConfigMode);
   115             $this->
lng->txt(
'tst_inp_quest_amount_per_test'),
   116             'quest_amount_per_test'   119         $questionAmountPerTest->setRequired(
true);
   120         $questionAmountPerTest->setMinValue(1);
   121         $questionAmountPerTest->allowDecimals(
false);
   122         $questionAmountPerTest->setMinvalueShouldBeGreater(
false);
   123         $questionAmountPerTest->setSize(4);
   125         $questionAmountPerTest->setValue(
   126             (
string) $this->questionSetConfig->getQuestionAmountPerTest()
   129         $questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
   132             $requirePoolsQuestionsHomoScored->setDisabled(
true);
   133             $questionAmountConfigMode->setDisabled(
true);
   134             $questionAmountPerTest->setDisabled(
true);
   153         $question_equal_per_pool = $this->
getItemByPostVar(
'quest_points_equal_per_pool')->getChecked();
   154         $this->questionSetConfig->setPoolsWithHomogeneousScoredQuestionsRequired(
   155             $question_equal_per_pool
   158         $log_array[AdditionalInformationGenerator::KEY_HOMOGENEOUS_SCORING] = $additional_info
   161         $question_amount_configuration_mode = $this->
getItemByPostVar(
'quest_amount_cfg_mode')->getValue();
   162         $this->questionSetConfig->setQuestionAmountConfigurationMode(
   163             $question_amount_configuration_mode
   166         $log_array[AdditionalInformationGenerator::KEY_QUESTION_AMOUNT_TYPE] = $this->questionSetConfig->getQuestionAmountPerTest()
   170         $this->questionSetConfig->setQuestionAmountPerTest(null);
   171         if (!$this->questionSetConfig->getQuestionAmountPerTest()) {
   172             $question_amount_per_test = (
int) $this->
getItemByPostVar(
'quest_amount_per_test')->getValue();
   173             $this->questionSetConfig->setQuestionAmountPerTest(
   174                 $question_amount_per_test
   176             $log_array[AdditionalInformationGenerator::KEY_QUESTION_AMOUNT_PER_TEST] = $question_amount_per_test;
   179         $this->questionSetConfig->saveToDb();
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
const QUESTION_AMOUNT_CONFIG_MODE_PER_POOL
 
const CMD_SAVE_GENERAL_CONFIG_FORM
 
getQuestionAmountConfigurationMode()
 
__construct(Container $dic, ilPlugin $plugin)
 
const QUESTION_AMOUNT_CONFIG_MODE_PER_TEST