ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjTestSettingsGeneralGUI Class Reference
+ Inheritance diagram for ilObjTestSettingsGeneralGUI:
+ Collaboration diagram for ilObjTestSettingsGeneralGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilAccessHandler $access, ilLanguage $lng, ilTemplate $tpl, ilTree $tree, ilDBInterface $db, ilPluginAdmin $pluginAdmin, ilObjUser $activeUser, ilObjTestGUI $testGUI)
 Constructor. More...
 
 executeCommand ()
 Command Execution. More...
 
- Public Member Functions inherited from ilTestSettingsGUI
 __construct (ilObjTest $testOBJ)
 

Data Fields

const CMD_SHOW_FORM = 'showForm'
 command constants More...
 
const CMD_SAVE_FORM = 'saveForm'
 
const CMD_CONFIRMED_SAVE_FORM = 'confirmedSaveForm'
 
const CMD_SHOW_RESET_TPL_CONFIRM = 'showResetTemplateConfirmation'
 
const CMD_CONFIRMED_RESET_TPL = 'confirmedResetTemplate'
 
const ANSWER_FIXATION_NONE = 'none'
 
const ANSWER_FIXATION_ON_INSTANT_FEEDBACK = 'instant_feedback'
 
const ANSWER_FIXATION_ON_FOLLOWUP_QUESTION = 'followup_question'
 
const ANSWER_FIXATION_ON_IFB_OR_FUQST = 'ifb_or_fuqst'
 
const INSTANT_FEEDBACK_TRIGGER_MANUAL = 0
 
const INSTANT_FEEDBACK_TRIGGER_FORCED = 1
 

Protected Member Functions

 getSettingsTemplateMessageHTML ()
 
 addPresentationProperties (ilPropertyFormGUI $form)
 
 savePresentationProperties (ilPropertyFormGUI $form)
 
 setAnswerFixationSettingsByFormValue ($formValue)
 
 getAnswerFixationSettingsAsFormValue ()
 
- Protected Member Functions inherited from ilTestSettingsGUI
 getTemplateSettingValue ($settingName)
 
 isHiddenFormItem ($formFieldId)
 
 isSectionHeaderRequired ($fields)
 
 formPropertyExists (ilPropertyFormGUI $form, $propertyId)
 
 removeHiddenItems (ilPropertyFormGUI $form)
 

Protected Attributes

 $ctrl = null
 
 $access = null
 
 $lng = null
 
 $tpl = null
 
 $tree = null
 
 $db = null
 
 $pluginAdmin = null
 
 $activeUser = null
 
 $testGUI = null
 
- Protected Attributes inherited from ilTestSettingsGUI
 $testOBJ = null
 
 $settingsTemplate = null
 

Private Member Functions

 showFormCmd (ilPropertyFormGUI $form=null)
 
 showConfirmation (ilPropertyFormGUI $form, $oldQuestionSetType, $newQuestionSetType, $hasQuestionsWithoutQuestionpool)
 
 confirmedSaveFormCmd ()
 
 saveFormCmd ($isConfirmedSave=false)
 
 showResetTemplateConfirmationCmd ()
 Enable all settings - Confirmation. More...
 
 confirmedResetTemplateCmd ()
 Enable all settings - remove template. More...
 
 isSkillServiceSettingToBeAdjusted (ilPropertyFormGUI $form)
 
 isCharSelectorPropertyRequired ()
 
 buildForm ()
 
 performSaveForm (ilPropertyFormGUI $form)
 
 addGeneralProperties (ilPropertyFormGUI $form)
 
 saveGeneralProperties (ilPropertyFormGUI $form)
 
 addAvailabilityProperties (ilPropertyFormGUI $form)
 
 saveAvailabilityProperties (ilPropertyFormGUI $form)
 
 addTestIntroProperties (ilPropertyFormGUI $form)
 
 saveTestIntroProperties (ilPropertyFormGUI $form)
 
 addTestAccessProperties (ilPropertyFormGUI $form)
 
 saveTestAccessProperties (ilPropertyFormGUI $form)
 
 addTestRunProperties (ilPropertyFormGUI $form)
 
 saveTestRunProperties (ilPropertyFormGUI $form)
 
 addQuestionBehaviourProperties (ilPropertyFormGUI $form)
 
 saveQuestionBehaviourProperties (ilPropertyFormGUI $form)
 
 addTestSequenceProperties (ilPropertyFormGUI $form)
 
 saveTestSequenceSettings (ilPropertyFormGUI $form)
 
 addTestFinishProperties (ilPropertyFormGUI $form)
 
 saveTestFinishProperties (ilPropertyFormGUI $form)
 

Private Attributes

 $testQuestionSetConfigFactory = null
 

Detailed Description

Definition at line 20 of file class.ilObjTestSettingsGeneralGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTestSettingsGeneralGUI::__construct ( ilCtrl  $ctrl,
ilAccessHandler  $access,
ilLanguage  $lng,
ilTemplate  $tpl,
ilTree  $tree,
ilDBInterface  $db,
ilPluginAdmin  $pluginAdmin,
ilObjUser  $activeUser,
ilObjTestGUI  $testGUI 
)

Constructor.

Parameters
ilCtrl$ctrl
ilAccessHandler$access
ilLanguage$lng
ilTemplate$tpl
ilDBInterface$db
ilObjTestGUI$testGUI
Returns

Definition at line 81 of file class.ilObjTestSettingsGeneralGUI.php.

References $access, $activeUser, $ctrl, $db, $lng, $pluginAdmin, $testGUI, $tpl, and $tree.

91  {
92  $this->ctrl = $ctrl;
93  $this->access = $access;
94  $this->lng = $lng;
95  $this->tpl = $tpl;
96  $this->tree = $tree;
97  $this->db = $db;
98  $this->pluginAdmin = $pluginAdmin;
99  $this->activeUser = $activeUser;
100 
101  $this->testGUI = $testGUI;
102 
103  require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
104  $this->testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($this->tree, $this->db, $this->pluginAdmin, $testGUI->object);
105 
106  parent::__construct($testGUI->object);
107  }

Member Function Documentation

◆ addAvailabilityProperties()

ilObjTestSettingsGeneralGUI::addAvailabilityProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 666 of file class.ilObjTestSettingsGeneralGUI.php.

References $section, ilObject\_getAllReferences(), ilPropertyFormGUI\addItem(), IL_CAL_UNIX, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), and ilFormPropertyGUI\setRequired().

Referenced by buildForm().

667  {
668  include_once "Services/Object/classes/class.ilObjectActivation.php";
669  $this->lng->loadLanguageModule('rep');
670 
672  $section->setTitle($this->lng->txt('rep_activation_availability'));
673  $form->addItem($section);
674 
675  // additional info only with multiple references
676  $act_obj_info = $act_ref_info = "";
677  if (sizeof(ilObject::_getAllReferences($this->testOBJ->getId())) > 1) {
678  $act_obj_info = ' ' . $this->lng->txt('rep_activation_online_object_info');
679  $act_ref_info = $this->lng->txt('rep_activation_access_ref_info');
680  }
681 
682  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'online');
683  $online->setChecked(!$this->testOBJ->getOfflineStatus());
684  $online->setInfo($this->lng->txt('tst_activation_online_info') . $act_obj_info);
685  $form->addItem($online);
686 
687  $act_type = new ilCheckboxInputGUI($this->lng->txt('rep_visibility_until'), 'activation_type');
688  $act_type->setChecked($this->testOBJ->isActivationLimited());
689  // $act_type->setInfo($this->lng->txt('tst_availability_until_info'));
690 
691  $this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
692  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
693  $dur = new ilDateDurationInputGUI($this->lng->txt("rep_time_period"), "access_period");
694  $dur->setRequired(true);
695  $dur->setShowTime(true);
696  $date = $this->testOBJ->getActivationStartingTime();
697  $dur->setStart(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
698  $dur->setStartText($this->lng->txt('rep_activation_limited_start'));
699  $date = $this->testOBJ->getActivationEndingTime();
700  $dur->setEnd(new ilDateTime($date ? $date : time(), IL_CAL_UNIX));
701  $dur->setEndText($this->lng->txt('rep_activation_limited_end'));
702  $act_type->addSubItem($dur);
703 
704  $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility');
705  $visible->setInfo($this->lng->txt('tst_activation_limited_visibility_info'));
706  $visible->setChecked($this->testOBJ->getActivationVisibility());
707  $act_type->addSubItem($visible);
708 
709  $form->addItem($act_type);
710  }
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
const IL_CAL_UNIX
static _getAllReferences($a_id)
get all reference ids of object
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:83
setChecked($a_checked)
Set Checked.
input GUI for a time span (start and end date)
Date and time handling
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGeneralProperties()

ilObjTestSettingsGeneralGUI::addGeneralProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 534 of file class.ilObjTestSettingsGeneralGUI.php.

References $header, $title, ilPropertyFormGUI\addItem(), ilMD\getGeneral(), ilObjTest\QUESTION_SET_TYPE_DYNAMIC, ilObjTest\QUESTION_SET_TYPE_FIXED, ilObjTest\QUESTION_SET_TYPE_RANDOM, ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setDisabled(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), and ilRadioOption\setValue().

Referenced by buildForm().

535  {
537  $header->setTitle($this->lng->txt("tst_general_properties"));
538  $form->addItem($header);
539 
540  // title & description (meta data)
541 
542  include_once 'Services/MetaData/classes/class.ilMD.php';
543  $md_obj = new ilMD($this->testOBJ->getId(), 0, "tst");
544  $md_section = $md_obj->getGeneral();
545 
546  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
547  $title->setRequired(true);
548  $title->setValue($md_section->getTitle());
549  $form->addItem($title);
550 
551  $ids = $md_section->getDescriptionIds();
552  if ($ids) {
553  $desc_obj = $md_section->getDescription(array_pop($ids));
554 
555  $desc = new ilTextAreaInputGUI($this->lng->txt("description"), "description");
556  $desc->setCols(50);
557  $desc->setRows(4);
558  $desc->setValue($desc_obj->getDescription());
559  $form->addItem($desc);
560  }
561 
562  // pool usage
563  $pool_usage = new ilRadioGroupInputGUI($this->lng->txt('test_question_pool_usage'), 'use_pool');
564 
565  $optional_qpl = new ilRadioOption($this->lng->txt('test_question_pool_usage_optional'), 1);
566  $optional_qpl->setInfo($this->lng->txt('test_question_pool_usage_optional_info'));
567  $pool_usage->addOption($optional_qpl);
568 
569  $tst_directly = new ilRadioOption($this->lng->txt('test_question_pool_usage_tst_directly'), 0);
570  $tst_directly->setInfo($this->lng->txt('test_question_pool_usage_tst_directly_info'));
571  $pool_usage->addOption($tst_directly);
572 
573  $pool_usage->setValue($this->testOBJ->getPoolUsage() ? 1 : 0);
574  $form->addItem($pool_usage);
575 
576  // test mode (question set type)
577  $questSetType = new ilRadioGroupInputGUI($this->lng->txt("tst_question_set_type"), 'question_set_type');
578  $questSetTypeFixed = new ilRadioOption(
579  $this->lng->txt("tst_question_set_type_fixed"),
581  $this->lng->txt("tst_question_set_type_fixed_desc")
582  );
583  $questSetType->addOption($questSetTypeFixed);
584  $questSetTypeRandom = new ilRadioOption(
585  $this->lng->txt("tst_question_set_type_random"),
587  $this->lng->txt("tst_question_set_type_random_desc")
588  );
589  $questSetType->addOption($questSetTypeRandom);
590  $questSetTypeContinues = new ilRadioOption(
591  $this->lng->txt("tst_question_set_type_dynamic"),
593  $this->lng->txt("tst_question_set_type_dynamic_desc")
594  );
595  $questSetType->addOption($questSetTypeContinues);
596  $questSetType->setValue($this->testOBJ->getQuestionSetType());
597  if ($this->testOBJ->participantDataExist()) {
598  $questSetType->setDisabled(true);
599  }
600  $form->addItem($questSetType);
601 
602  // anonymity
603  $anonymity = new ilRadioGroupInputGUI($this->lng->txt('tst_anonymity'), 'anonymity');
604  if ($this->testOBJ->participantDataExist()) {
605  $anonymity->setDisabled(true);
606  }
607  $rb = new ilRadioOption($this->lng->txt('tst_anonymity_no_anonymization'), 0);
608  $anonymity->addOption($rb);
609  $rb = new ilRadioOption($this->lng->txt('tst_anonymity_anonymous_test'), 1);
610  $anonymity->addOption($rb);
611  $anonymity->setValue((int) $this->testOBJ->getAnonymity());
612  $form->addItem($anonymity);
613  }
This class represents an option in a radio group.
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Info.
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
& getGeneral()
Definition: class.ilMD.php:40
This class represents a text area property in a property form.
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
setDisabled($a_disabled)
Set Disabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPresentationProperties()

ilObjTestSettingsGeneralGUI::addPresentationProperties ( ilPropertyFormGUI  $form)
protected
Parameters
ilPropertyFormGUI$form

Definition at line 733 of file class.ilObjTestSettingsGeneralGUI.php.

References $DIC, $section, and ilPropertyFormGUI\addItem().

Referenced by buildForm().

734  {
735  global $DIC; /* @var ILIAS\DI\Container $DIC */
736 
738  $section->setTitle($this->lng->txt('tst_presentation_settings_section'));
739  $form->addItem($section);
740 
741  $DIC->object()->commonSettings()->legacyForm($form, $this->testOBJ)->addTileImage();
742  }
global $DIC
Definition: saml.php:7
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
$section
Definition: Utf8Test.php:83
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addQuestionBehaviourProperties()

ilObjTestSettingsGeneralGUI::addQuestionBehaviourProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1129 of file class.ilObjTestSettingsGeneralGUI.php.

References ilPropertyFormGUI\addItem(), ilRadioGroupInputGUI\addOption(), ilCharSelectorConfig\CONTEXT_TEST, getAnswerFixationSettingsAsFormValue(), isCharSelectorPropertyRequired(), ilTestSettingsGUI\isSectionHeaderRequired(), ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), and ilCheckboxInputGUI\setValue().

Referenced by buildForm().

1130  {
1131  $fields = array(
1132  'title_output', 'autosave', 'chb_shuffle_questions', 'chb_shuffle_questions',
1133  'offer_hints', 'instant_feedback_contents', 'instant_feedback_trigger',
1134  'answer_fixation_handling', 'obligations_enabled'
1135  );
1136 
1137  if ($this->isSectionHeaderRequired($fields) || $this->isCharSelectorPropertyRequired()) {
1138  // sequence properties
1139  $seqheader = new ilFormSectionHeaderGUI();
1140  $seqheader->setTitle($this->lng->txt("tst_presentation_properties"));
1141  $form->addItem($seqheader);
1142  }
1143 
1144  // question title output
1145  $title_output = new ilRadioGroupInputGUI($this->lng->txt("tst_title_output"), "title_output");
1146  $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_full"), 0, ''));
1147  $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_hide_points"), 1, ''));
1148  $title_output->addOption(new ilRadioOption($this->lng->txt("tst_title_output_no_title"), 2, ''));
1149  $title_output->setValue($this->testOBJ->getTitleOutput());
1150  $form->addItem($title_output);
1151 
1152  // Autosave
1153  $autosave_output = new ilCheckboxInputGUI($this->lng->txt('autosave'), 'autosave');
1154  $autosave_output->setValue(1);
1155  $autosave_output->setChecked($this->testOBJ->getAutosave());
1156  $autosave_output->setInfo($this->lng->txt('autosave_info'));
1157  $autosave_interval = new ilTextInputGUI($this->lng->txt('autosave_ival'), 'autosave_ival');
1158  $autosave_interval->setSize(10);
1159  $autosave_interval->setValue($this->testOBJ->getAutosaveIval() / 1000);
1160  $autosave_interval->setSuffix($this->lng->txt('seconds'));
1161  $autosave_output->addSubItem($autosave_interval);
1162  $form->addItem($autosave_output);
1163 
1164  // shuffle questions
1165  $shuffle = new ilCheckboxInputGUI($this->lng->txt("tst_shuffle_questions"), "chb_shuffle_questions");
1166  $shuffle->setValue(1);
1167  $shuffle->setChecked($this->testOBJ->getShuffleQuestions());
1168  $shuffle->setInfo($this->lng->txt("tst_shuffle_questions_description"));
1169  $form->addItem($shuffle);
1170 
1171  // offer hints
1172  $checkBoxOfferHints = new ilCheckboxInputGUI($this->lng->txt('tst_setting_offer_hints_label'), 'offer_hints');
1173  $checkBoxOfferHints->setChecked($this->testOBJ->isOfferingQuestionHintsEnabled());
1174  $checkBoxOfferHints->setInfo($this->lng->txt('tst_setting_offer_hints_info'));
1175  $form->addItem($checkBoxOfferHints);
1176 
1177  // instant feedback
1178  $instant_feedback_enabled = new ilCheckboxInputGUI($this->lng->txt('tst_instant_feedback'), 'instant_feedback_enabled');
1179  $instant_feedback_enabled->setInfo($this->lng->txt('tst_instant_feedback_desc'));
1180  $instant_feedback_enabled->setChecked($this->testOBJ->isAnyInstantFeedbackOptionEnabled());
1181  $form->addItem($instant_feedback_enabled);
1182  $instant_feedback_contents = new ilCheckboxGroupInputGUI($this->lng->txt('tst_instant_feedback_contents'), 'instant_feedback_contents');
1183  $instant_feedback_contents->setRequired(true);
1184  $instant_feedback_contents->addOption(new ilCheckboxOption(
1185  $this->lng->txt('tst_instant_feedback_results'),
1186  'instant_feedback_points',
1187  $this->lng->txt('tst_instant_feedback_results_desc')
1188  ));
1189  $instant_feedback_contents->addOption(new ilCheckboxOption(
1190  $this->lng->txt('tst_instant_feedback_answer_generic'),
1191  'instant_feedback_generic',
1192  $this->lng->txt('tst_instant_feedback_answer_generic_desc')
1193  ));
1194  $instant_feedback_contents->addOption(new ilCheckboxOption(
1195  $this->lng->txt('tst_instant_feedback_answer_specific'),
1196  'instant_feedback_specific',
1197  $this->lng->txt('tst_instant_feedback_answer_specific_desc')
1198  ));
1199  $instant_feedback_contents->addOption(new ilCheckboxOption(
1200  $this->lng->txt('tst_instant_feedback_solution'),
1201  'instant_feedback_solution',
1202  $this->lng->txt('tst_instant_feedback_solution_desc')
1203  ));
1204  $instant_feedback_contents->setValue($this->testOBJ->getInstantFeedbackOptionsAsArray());
1205  $instant_feedback_enabled->addSubItem($instant_feedback_contents);
1206  $instant_feedback_trigger = new ilRadioGroupInputGUI(
1207  $this->lng->txt('tst_instant_feedback_trigger'),
1208  'instant_feedback_trigger'
1209  );
1210  $ifbTriggerOpt = new ilRadioOption(
1211  $this->lng->txt('tst_instant_feedback_trigger_manual'),
1212  self::INSTANT_FEEDBACK_TRIGGER_MANUAL
1213  );
1214  $ifbTriggerOpt->setInfo($this->lng->txt('tst_instant_feedback_trigger_manual_desc'));
1215  $instant_feedback_trigger->addOption($ifbTriggerOpt);
1216  $ifbTriggerOpt = new ilRadioOption(
1217  $this->lng->txt('tst_instant_feedback_trigger_forced'),
1218  self::INSTANT_FEEDBACK_TRIGGER_FORCED
1219  );
1220  $ifbTriggerOpt->setInfo($this->lng->txt('tst_instant_feedback_trigger_forced_desc'));
1221  $instant_feedback_trigger->addOption($ifbTriggerOpt);
1222  $instant_feedback_trigger->setValue($this->testOBJ->isForceInstantFeedbackEnabled());
1223  $instant_feedback_enabled->addSubItem($instant_feedback_trigger);
1224 
1225  $answerFixation = new ilRadioGroupInputGUI(
1226  $this->lng->txt('tst_answer_fixation_handling'),
1227  'answer_fixation_handling'
1228  );
1229  $radioOption = new ilRadioOption(
1230  $this->lng->txt('tst_answer_fixation_none'),
1231  self::ANSWER_FIXATION_NONE
1232  );
1233  $radioOption->setInfo($this->lng->txt('tst_answer_fixation_none_desc'));
1234  $answerFixation->addOption($radioOption);
1235  $radioOption = new ilRadioOption(
1236  $this->lng->txt('tst_answer_fixation_on_instant_feedback'),
1237  self::ANSWER_FIXATION_ON_INSTANT_FEEDBACK
1238  );
1239  $radioOption->setInfo($this->lng->txt('tst_answer_fixation_on_instant_feedback_desc'));
1240  $answerFixation->addOption($radioOption);
1241  $radioOption = new ilRadioOption(
1242  $this->lng->txt('tst_answer_fixation_on_followup_question'),
1243  self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION
1244  );
1245  $radioOption->setInfo($this->lng->txt('tst_answer_fixation_on_followup_question_desc'));
1246  $answerFixation->addOption($radioOption);
1247  $radioOption = new ilRadioOption(
1248  $this->lng->txt('tst_answer_fixation_on_instantfb_or_followupqst'),
1249  self::ANSWER_FIXATION_ON_IFB_OR_FUQST
1250  );
1251  $radioOption->setInfo($this->lng->txt('tst_answer_fixation_on_instantfb_or_followupqst_desc'));
1252  $answerFixation->addOption($radioOption);
1253  $answerFixation->setValue($this->getAnswerFixationSettingsAsFormValue());
1254  $form->addItem($answerFixation);
1255 
1256  // enable obligations
1257  $checkBoxEnableObligations = new ilCheckboxInputGUI($this->lng->txt('tst_setting_enable_obligations_label'), 'obligations_enabled');
1258  $checkBoxEnableObligations->setChecked($this->testOBJ->areObligationsEnabled());
1259  $checkBoxEnableObligations->setInfo($this->lng->txt('tst_setting_enable_obligations_info'));
1260  $form->addItem($checkBoxEnableObligations);
1261 
1262  // selector for unicode characters
1263  if ($this->isCharSelectorPropertyRequired()) {
1264  require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
1266  $char_selector->getConfig()->setAvailability($this->testOBJ->getCharSelectorAvailability());
1267  $char_selector->getConfig()->setDefinition($this->testOBJ->getCharSelectorDefinition());
1268  $char_selector->addFormProperties($form);
1269  $char_selector->setFormValues($form);
1270  }
1271 
1272  if ($this->testOBJ->participantDataExist()) {
1273  $checkBoxOfferHints->setDisabled(true);
1274  $instant_feedback_enabled->setDisabled(true);
1275  $instant_feedback_trigger->setDisabled(true);
1276  $instant_feedback_contents->setDisabled(true);
1277  $answerFixation->setDisabled(true);
1278  $checkBoxEnableObligations->setDisabled(true);
1279  }
1280  }
This class represents an option in a radio group.
This class represents an option in a checkbox group.
This shows a character selector.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
addOption($a_option)
Add Option.
setValue($a_value)
Set Value.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTestAccessProperties()

ilObjTestSettingsGeneralGUI::addTestAccessProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 811 of file class.ilObjTestSettingsGeneralGUI.php.

References $header, $password, ilPropertyFormGUI\addItem(), IL_CAL_UNIX, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), and ilCheckboxInputGUI\setValue().

Referenced by buildForm().

812  {
814  $header->setTitle($this->lng->txt("tst_settings_header_execution"));
815  $form->addItem($header);
816 
817  // starting time
818  $startingtime = new ilDateTimeInputGUI($this->lng->txt("tst_starting_time"), 'starting_time');
819  $startingtime->setInfo($this->lng->txt("tst_starting_time_desc"));
820  $startingtime->setShowTime(true);
821  if ($this->testOBJ->getStartingTime() != 0) {
822  $startingtime->setDate(new ilDateTime($this->testOBJ->getStartingTime(), IL_CAL_UNIX));
823  } else {
824  $startingtime->setDate(null);
825  }
826 
827  $form->addItem($startingtime);
828  if ($this->testOBJ->participantDataExist()) {
829  $startingtime->setDisabled(true);
830  }
831 
832  // ending time
833  $endingtime = new ilDateTimeInputGUI($this->lng->txt("tst_ending_time"), 'ending_time');
834  $endingtime->setInfo($this->lng->txt("tst_ending_time_desc"));
835  $endingtime->setShowTime(true);
836  if ($this->testOBJ->getEndingTime() != 0) {
837  $endingtime->setDate(new ilDateTime($this->testOBJ->getEndingTime(), IL_CAL_UNIX));
838  } else {
839  $endingtime->setDate(null);
840  }
841  $form->addItem($endingtime);
842 
843  // test password
844  $pwEnabled = new ilCheckboxInputGUI($this->lng->txt('tst_password'), 'password_enabled');
845  $pwEnabled->setChecked($this->testOBJ->isPasswordEnabled());
846  $pwEnabled->setInfo($this->lng->txt("tst_password_details"));
847  $password = new ilTextInputGUI($this->lng->txt("tst_password_enter"), "password");
848  $password->setRequired(true);
849  $password->setSize(20);
850  $password->setMaxLength(20);
851  $password->setValue($this->testOBJ->getPassword());
852  $pwEnabled->addSubItem($password);
853  $form->addItem($pwEnabled);
854 
855  // fixed participants
856  $fixedparticipants = new ilCheckboxInputGUI($this->lng->txt('participants_invitation'), "fixedparticipants");
857  $fixedparticipants->setValue(1);
858  $fixedparticipants->setChecked($this->testOBJ->getFixedParticipants());
859  $fixedparticipants->setInfo($this->lng->txt("participants_invitation_description"));
860  if ($this->testOBJ->participantDataExist()) {
861  $fixedparticipants->setDisabled(true);
862  }
863  $form->addItem($fixedparticipants);
864 
865  // simultaneous users
866  $simulLimited = new ilCheckboxInputGUI($this->lng->txt("tst_allowed_users"), 'limitUsers');
867  $simulLimited->setInfo($this->lng->txt("tst_allowed_users_desc"));
868  $simulLimited->setChecked($this->testOBJ->isLimitUsersEnabled());
869 
870  // allowed simultaneous users
871  $simul = new ilNumberInputGUI($this->lng->txt("tst_allowed_users_max"), "allowedUsers");
872  $simul->setRequired(true);
873  $simul->allowDecimals(false);
874  $simul->setMinValue(1);
875  $simul->setMinvalueShouldBeGreater(false);
876  $simul->setSize(4);
877  $simul->setValue(($this->testOBJ->getAllowedUsers()) ? $this->testOBJ->getAllowedUsers() : '');
878  $simulLimited->addSubItem($simul);
879 
880  // idle time
881  $idle = new ilNumberInputGUI($this->lng->txt("tst_allowed_users_time_gap"), "allowedUsersTimeGap");
882  $idle->setInfo($this->lng->txt("tst_allowed_users_time_gap_desc"));
883  $idle->setSize(4);
884  $idle->setSuffix($this->lng->txt("seconds"));
885  $idle->setValue(($this->testOBJ->getAllowedUsersTimeGap()) ? $this->testOBJ->getAllowedUsersTimeGap() : 300);
886  $simulLimited->addSubItem($idle);
887 
888  $form->addItem($simulLimited);
889  return $header;
890  }
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
const IL_CAL_UNIX
This class represents a date/time property in a property form.
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
Date and time handling
$password
Definition: cron.php:14
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTestFinishProperties()

ilObjTestSettingsGeneralGUI::addTestFinishProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1450 of file class.ilObjTestSettingsGeneralGUI.php.

References ilPropertyFormGUI\addItem(), ilRadioGroupInputGUI\addOption(), REDIRECT_ALWAYS, REDIRECT_KIOSK, ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), and ilRadioOption\setValue().

Referenced by buildForm().

1451  {
1452  $testFinishHeader = new ilFormSectionHeaderGUI();
1453  $testFinishHeader->setTitle($this->lng->txt("tst_final_information"));
1454  $form->addItem($testFinishHeader);
1455 
1456  // examview
1457  $enable_examview = new ilCheckboxInputGUI($this->lng->txt("enable_examview"), 'enable_examview');
1458  $enable_examview->setValue(1);
1459  $enable_examview->setChecked($this->testOBJ->getEnableExamview());
1460  $enable_examview->setInfo($this->lng->txt("enable_examview_desc"));
1461  $show_examview_pdf = new ilCheckboxInputGUI('', 'show_examview_pdf');
1462  $show_examview_pdf->setValue(1);
1463  $show_examview_pdf->setChecked($this->testOBJ->getShowExamviewPdf());
1464  $show_examview_pdf->setOptionTitle($this->lng->txt("show_examview_pdf"));
1465  $enable_examview->addSubItem($show_examview_pdf);
1466  $form->addItem($enable_examview);
1467 
1468  // show final statement
1469  $showfinal = new ilCheckboxInputGUI($this->lng->txt("final_statement"), "showfinalstatement");
1470  $showfinal->setChecked($this->testOBJ->getShowFinalStatement());
1471  $showfinal->setInfo($this->lng->txt("final_statement_show_desc"));
1472  $form->addItem($showfinal);
1473  // final statement
1474  $finalstatement = new ilTextAreaInputGUI($this->lng->txt("final_statement"), "finalstatement");
1475  $finalstatement->setRequired(true);
1476  $finalstatement->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getFinalStatement(), false, true));
1477  $finalstatement->setRows(10);
1478  $finalstatement->setCols(80);
1479  $finalstatement->setUseRte(true);
1480  $finalstatement->addPlugin("latex");
1481  $finalstatement->addButton("latex");
1482  $finalstatement->setRTESupport($this->testOBJ->getId(), "tst", "assessment");
1483  $finalstatement->setRteTagSet('full');
1484  $showfinal->addSubItem($finalstatement);
1485 
1486  $redirection_mode = $this->testOBJ->getRedirectionMode();
1487  $rm_enabled = new ilCheckboxInputGUI($this->lng->txt('redirect_after_finishing_tst'), 'redirection_enabled');
1488  $rm_enabled->setInfo($this->lng->txt('redirect_after_finishing_tst_desc'));
1489  $rm_enabled->setChecked($redirection_mode == '0' ? false : true);
1490  $radio_rm = new ilRadioGroupInputGUI($this->lng->txt('redirect_after_finishing_rule'), 'redirection_mode');
1491  $always = new ilRadioOption($this->lng->txt('redirect_always'), REDIRECT_ALWAYS);
1492  $radio_rm->addOption($always);
1493  $kiosk = new ilRadioOption($this->lng->txt('redirect_in_kiosk_mode'), REDIRECT_KIOSK);
1494  $radio_rm->addOption($kiosk);
1495  $radio_rm->setValue(in_array($redirection_mode, array(REDIRECT_ALWAYS, REDIRECT_KIOSK)) ? $redirection_mode : REDIRECT_ALWAYS);
1496  $rm_enabled->addSubItem($radio_rm);
1497  $redirection_url = new ilTextInputGUI($this->lng->txt('redirection_url'), 'redirection_url');
1498  $redirection_url->setValue((string) $this->testOBJ->getRedirectionUrl());
1499  $redirection_url->setRequired(true);
1500  $rm_enabled->addSubItem($redirection_url);
1501 
1502  $form->addItem($rm_enabled);
1503 
1504  // Sign submission
1505  $sign_submission = $this->testOBJ->getSignSubmission();
1506  $sign_submission_enabled = new ilCheckboxInputGUI($this->lng->txt('sign_submission'), 'sign_submission');
1507  $sign_submission_enabled->setChecked($sign_submission);
1508  $sign_submission_enabled->setInfo($this->lng->txt('sign_submission_info'));
1509  $form->addItem($sign_submission_enabled);
1510 
1511  // mail notification
1512  $mailnotification = new ilCheckboxInputGUI($this->lng->txt("tst_finish_notification"), "mailnotification");
1513  $mailnotification->setInfo($this->lng->txt("tst_finish_notification_desc"));
1514  $mailnotification->setChecked($this->testOBJ->getMailNotification() > 0);
1515  $form->addItem($mailnotification);
1516 
1517  $mailnotificationContent = new ilRadioGroupInputGUI($this->lng->txt("tst_finish_notification_content"), "mailnotification_content");
1518  $mailnotificationContent->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_simple"), 1, ''));
1519  $mailnotificationContent->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_advanced"), 2, ''));
1520  $mailnotificationContent->setValue($this->testOBJ->getMailNotification() ? $this->testOBJ->getMailNotification() : 1);
1521  $mailnotificationContent->setRequired(true);
1522  $mailnotification->addSubItem($mailnotificationContent);
1523 
1524  $mailnottype = new ilCheckboxInputGUI('', "mailnottype");
1525  $mailnottype->setValue(1);
1526  $mailnottype->setOptionTitle($this->lng->txt("mailnottype"));
1527  $mailnottype->setChecked($this->testOBJ->getMailNotificationType());
1528  $mailnotification->addSubItem($mailnottype);
1529  }
This class represents an option in a radio group.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
const REDIRECT_ALWAYS
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
addOption($a_option)
Add Option.
setValue($a_value)
Set Value.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
const REDIRECT_KIOSK
This class represents a text area property in a property form.
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTestIntroProperties()

ilObjTestSettingsGeneralGUI::addTestIntroProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 757 of file class.ilObjTestSettingsGeneralGUI.php.

References $section, ilPropertyFormGUI\addItem(), ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setRequired(), and ilCheckboxInputGUI\setValue().

Referenced by buildForm().

758  {
760  $section->setTitle($this->lng->txt('tst_settings_header_intro'));
761  $form->addItem($section);
762 
763  // introduction
764  $introEnabled = new ilCheckboxInputGUI($this->lng->txt("tst_introduction"), 'intro_enabled');
765  $introEnabled->setChecked($this->testOBJ->isIntroductionEnabled());
766  $introEnabled->setInfo($this->lng->txt('tst_introduction_desc'));
767  $form->addItem($introEnabled);
768  $intro = new ilTextAreaInputGUI($this->lng->txt("tst_introduction_text"), "introduction");
769  $intro->setRequired(true);
770  $intro->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getIntroduction(), false, true));
771  $intro->setRows(10);
772  $intro->setCols(80);
773  $intro->setUseRte(true);
774  $intro->addPlugin("latex");
775  $intro->addButton("latex");
776  $intro->setRTESupport($this->testOBJ->getId(), "tst", "assessment");
777  $intro->setRteTagSet('full');
778  $introEnabled->addSubItem($intro);
779 
780  // showinfo
781  $showinfo = new ilCheckboxInputGUI($this->lng->txt("showinfo"), "showinfo");
782  $showinfo->setValue(1);
783  $showinfo->setChecked($this->testOBJ->getShowInfo());
784  $showinfo->setInfo($this->lng->txt("showinfo_desc"));
785  $form->addItem($showinfo);
786  }
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
$section
Definition: Utf8Test.php:83
setChecked($a_checked)
Set Checked.
setValue($a_value)
Set Value.
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTestRunProperties()

ilObjTestSettingsGeneralGUI::addTestRunProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 948 of file class.ilObjTestSettingsGeneralGUI.php.

References $header, $values, ilPropertyFormGUI\addItem(), ilCheckboxGroupInputGUI\addOption(), ilNumberInputGUI\allowDecimals(), ilTestSettingsGUI\getTemplateSettingValue(), ilFormPropertyGUI\setInfo(), ilDurationInputGUI\setShowMonths(), ilNumberInputGUI\setSize(), and ilCheckboxInputGUI\setValue().

Referenced by buildForm().

949  {
950  // section header test run
952  $header->setTitle($this->lng->txt("tst_settings_header_test_run"));
953  $form->addItem($header);
954 
955  // max. number of passes
956  $limitPasses = new ilCheckboxInputGUI($this->lng->txt("tst_limit_nr_of_tries"), 'limitPasses');
957  $limitPasses->setInfo($this->lng->txt("tst_nr_of_tries_desc"));
958  $limitPasses->setChecked($this->testOBJ->getNrOfTries() > 0);
959  $nr_of_tries = new ilNumberInputGUI($this->lng->txt("tst_nr_of_tries"), "nr_of_tries");
960  $nr_of_tries->setSize(3);
961  $nr_of_tries->allowDecimals(false);
962  $nr_of_tries->setMinValue(1);
963  $nr_of_tries->setMinvalueShouldBeGreater(false);
964  $nr_of_tries->setValue($this->testOBJ->getNrOfTries() ? $this->testOBJ->getNrOfTries() : 1);
965  $nr_of_tries->setRequired(true);
966  if ($this->testOBJ->participantDataExist()) {
967  $limitPasses->setDisabled(true);
968  $nr_of_tries->setDisabled(true);
969  }
970  $limitPasses->addSubItem($nr_of_tries);
971  $form->addItem($limitPasses);
972 
973  // pass_waiting time between testruns
974  $pass_waiting_enabled = new ilCheckboxInputGUI($this->lng->txt('tst_pass_waiting_enabled'), 'pass_waiting_enabled');
975  $pass_waiting_enabled->setInfo($this->lng->txt('tst_pass_waiting_info'));
976  $pass_waiting_enabled->setChecked($this->testOBJ->isPassWaitingEnabled());
977 
978  // pass_waiting
979  $duration = new ilDurationInputGUI($this->lng->txt("tst_pass_waiting_time"), "pass_waiting");
980 
981  $duration->setShowMonths(true);
982  $duration->setShowDays(true);
983  $duration->setShowHours(true);
984  $duration->setShowMinutes(true);
985 
986  $pw_time_array = explode(':', $this->testOBJ->getPassWaiting());
987  $duration->setMonths($pw_time_array[0]);
988  $duration->setDays($pw_time_array[1]);
989  $duration->setHours($pw_time_array[2]);
990  $duration->setMinutes($pw_time_array[3]);
991  $duration->setRequired(false);
992  $pass_waiting_enabled->addSubItem($duration);
993 
994  $form->addItem($pass_waiting_enabled);
995 
996  // enable max. processing time
997  $processing = new ilCheckboxInputGUI($this->lng->txt("tst_processing_time"), "chb_processing_time");
998  $processing->setInfo($this->lng->txt("tst_processing_time_desc"));
999  $processing->setValue(1);
1000 
1001  if ($this->settingsTemplate && $this->getTemplateSettingValue('chb_processing_time')) {
1002  $processing->setChecked(true);
1003  } else {
1004  $processing->setChecked($this->testOBJ->getEnableProcessingTime());
1005  }
1006 
1007  // max. processing time
1008  $processingtime = new ilNumberInputGUI($this->lng->txt("tst_processing_time_duration"), 'processing_time');
1009  $processingtime->allowDecimals(false);
1010  $processingtime->setMinValue(1);
1011  $processingtime->setMinvalueShouldBeGreater(false);
1012  $processingtime->setValue($this->testOBJ->getProcessingTimeAsMinutes());
1013  $processingtime->setSize(5);
1014  $processingtime->setSuffix($this->lng->txt('minutes'));
1015  $processingtime->setInfo($this->lng->txt("tst_processing_time_duration_desc"));
1016  $processing->addSubItem($processingtime);
1017 
1018  // reset max. processing time
1019  $resetprocessing = new ilCheckboxInputGUI('', "chb_reset_processing_time");
1020  $resetprocessing->setValue(1);
1021  $resetprocessing->setOptionTitle($this->lng->txt("tst_reset_processing_time"));
1022  $resetprocessing->setChecked($this->testOBJ->getResetProcessingTime());
1023  $resetprocessing->setInfo($this->lng->txt("tst_reset_processing_time_desc"));
1024  $processing->addSubItem($resetprocessing);
1025  $form->addItem($processing);
1026 
1027  if ($this->testOBJ->participantDataExist()) {
1028  $processing->setDisabled(true);
1029  $processingtime->setDisabled(true);
1030  $resetprocessing->setDisabled(true);
1031 
1032  $duration->setDisabled(true);
1033  $pass_waiting_enabled->setDisabled(true);
1034  }
1035 
1036  // kiosk mode
1037  $kiosk = new ilCheckboxInputGUI($this->lng->txt("kiosk"), "kiosk");
1038  $kiosk->setValue(1);
1039  $kiosk->setChecked($this->testOBJ->getKioskMode());
1040  $kiosk->setInfo($this->lng->txt("kiosk_description"));
1041 
1042  // kiosk mode options
1043  $kiosktitle = new ilCheckboxGroupInputGUI($this->lng->txt("kiosk_options"), "kiosk_options");
1044  $kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_title"), 'kiosk_title', ''));
1045  $kiosktitle->addOption(new ilCheckboxOption($this->lng->txt("kiosk_show_participant"), 'kiosk_participant', ''));
1046  $values = array();
1047  if ($this->testOBJ->getShowKioskModeTitle()) {
1048  array_push($values, 'kiosk_title');
1049  }
1050  if ($this->testOBJ->getShowKioskModeParticipant()) {
1051  array_push($values, 'kiosk_participant');
1052  }
1053  $kiosktitle->setValue($values);
1054  $kiosktitle->setInfo($this->lng->txt("kiosk_options_desc"));
1055  $kiosk->addSubItem($kiosktitle);
1056 
1057  $form->addItem($kiosk);
1058 
1059  $examIdInPass = new ilCheckboxInputGUI($this->lng->txt('examid_in_test_pass'), 'examid_in_test_pass');
1060  $examIdInPass->setInfo($this->lng->txt('examid_in_test_pass_desc'));
1061  $examIdInPass->setChecked($this->testOBJ->isShowExamIdInTestPassEnabled());
1062  $form->addItem($examIdInPass);
1063  }
This class represents a duration (typical hh:mm:ss) property in a property form.
This class represents an option in a checkbox group.
setShowMonths($a_show_months)
Set show months.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
allowDecimals($a_value)
Toggle Decimals.
setInfo($a_info)
Set Information Text.
This class represents a number property in a property form.
$values
setValue($a_value)
Set Value.
This class represents a property in a property form.
setSize($a_size)
Set Size.
getTemplateSettingValue($settingName)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTestSequenceProperties()

ilObjTestSettingsGeneralGUI::addTestSequenceProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1343 of file class.ilObjTestSettingsGeneralGUI.php.

References $values, ilPropertyFormGUI\addItem(), ilRadioGroupInputGUI\addOption(), and ilCheckboxInputGUI\setValue().

Referenced by buildForm().

1344  {
1345  // sequence properties
1346  $seqheader = new ilFormSectionHeaderGUI();
1347  $seqheader->setTitle($this->lng->txt("tst_sequence_properties"));
1348  $form->addItem($seqheader);
1349 
1350  // use previous answers
1351  $prevanswers = new ilCheckboxInputGUI($this->lng->txt("tst_use_previous_answers"), "chb_use_previous_answers");
1352  $prevanswers->setValue(1);
1353  $prevanswers->setChecked($this->testOBJ->getUsePreviousAnswers());
1354  $prevanswers->setInfo($this->lng->txt("tst_use_previous_answers_description"));
1355  $form->addItem($prevanswers);
1356 
1357  // show suspend test
1358  $cancel = new ilCheckboxInputGUI($this->lng->txt("tst_show_cancel"), "chb_show_cancel");
1359  $cancel->setValue(1);
1360  $cancel->setChecked($this->testOBJ->getShowCancel());
1361  $cancel->setInfo($this->lng->txt("tst_show_cancel_description"));
1362  $form->addItem($cancel);
1363 
1364  // postpone questions
1365  $postpone = new ilRadioGroupInputGUI($this->lng->txt("tst_postpone"), "postpone");
1366  $postpone->addOption(new ilRadioOption(
1367  $this->lng->txt("tst_postpone_off"),
1368  0,
1369  $this->lng->txt("tst_postpone_off_desc")
1370  ));
1371  $postpone->addOption(new ilRadioOption(
1372  $this->lng->txt("tst_postpone_on"),
1373  1,
1374  $this->lng->txt("tst_postpone_on_desc")
1375  ));
1376  $postpone->setValue((int) $this->testOBJ->getSequenceSettings());
1377  $form->addItem($postpone);
1378 
1379  // show list of questions
1380  $list_of_questions = new ilCheckboxInputGUI($this->lng->txt("tst_show_summary"), "list_of_questions");
1381  //$list_of_questions->setOptionTitle($this->lng->txt("tst_show_summary"));
1382  $list_of_questions->setValue(1);
1383  $list_of_questions->setChecked($this->testOBJ->getListOfQuestions());
1384  $list_of_questions->setInfo($this->lng->txt("tst_show_summary_description"));
1385 
1386  $list_of_questions_options = new ilCheckboxGroupInputGUI('', "list_of_questions_options");
1387  $list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_start"), 'chb_list_of_questions_start', ''));
1388  $list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_end"), 'chb_list_of_questions_end', ''));
1389  $list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_with_description"), 'chb_list_of_questions_with_description', ''));
1390  $values = array();
1391  if ($this->testOBJ->getListOfQuestionsStart()) {
1392  array_push($values, 'chb_list_of_questions_start');
1393  }
1394  if ($this->testOBJ->getListOfQuestionsEnd()) {
1395  array_push($values, 'chb_list_of_questions_end');
1396  }
1397  if ($this->testOBJ->getListOfQuestionsDescription()) {
1398  array_push($values, 'chb_list_of_questions_with_description');
1399  }
1400  $list_of_questions_options->setValue($values);
1401 
1402  $list_of_questions->addSubItem($list_of_questions_options);
1403  $form->addItem($list_of_questions);
1404 
1405  // show question marking
1406  $marking = new ilCheckboxInputGUI($this->lng->txt("question_marking"), "chb_show_marker");
1407  $marking->setValue(1);
1408  $marking->setChecked($this->testOBJ->getShowMarker());
1409  $marking->setInfo($this->lng->txt("question_marking_description"));
1410  $form->addItem($marking);
1411  }
This class represents an option in a radio group.
This class represents an option in a checkbox group.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
addOption($a_option)
Add Option.
$values
setValue($a_value)
Set Value.
This class represents a property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildForm()

ilObjTestSettingsGeneralGUI::buildForm ( )
private

Definition at line 437 of file class.ilObjTestSettingsGeneralGUI.php.

References $form, addAvailabilityProperties(), addGeneralProperties(), addPresentationProperties(), addQuestionBehaviourProperties(), addTestAccessProperties(), addTestFinishProperties(), addTestIntroProperties(), addTestRunProperties(), addTestSequenceProperties(), ilOrgUnitGlobalSettings\getInstance(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjTest\isSkillManagementGloballyActivated(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilTestSettingsGUI\removeHiddenItems(), and ilFormPropertyGUI\setInfo().

Referenced by saveFormCmd(), and showFormCmd().

438  {
439  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
440  $form = new ilPropertyFormGUI();
441  $form->setFormAction($this->ctrl->getFormAction($this));
442  $form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt("save"));
443  $form->setTableWidth("100%");
444  $form->setId("test_properties");
445 
446  $this->addGeneralProperties($form);
451  $this->addTestRunProperties($form);
455 
456  // Edit ecs export settings
457  include_once 'Modules/Test/classes/class.ilECSTestSettings.php';
458  $ecs = new ilECSTestSettings($this->testOBJ);
459  $ecs->addSettingsToForm($form, 'tst');
460 
461  // additional features
462 
463  $orgunitServiceActive = ilOrgUnitGlobalSettings::getInstance()->getObjectPositionSettingsByType(
464  $this->testOBJ->getType()
465  )->isActive();
466 
467  $skillServiceActive = ilObjTest::isSkillManagementGloballyActivated();
468 
469 
470  if ($orgunitServiceActive || $skillServiceActive) {
471  $otherHead = new ilFormSectionHeaderGUI();
472  $otherHead->setTitle($this->lng->txt('obj_features'));
473  $form->addItem($otherHead);
474  }
475 
476  require_once 'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
477  ilObjectServiceSettingsGUI::initServiceSettingsForm($this->testOBJ->getId(), $form, array(
479  ));
480 
481  // skill service activation for FIXED tests only
482  if ($skillServiceActive) {
483  $skillService = new ilCheckboxInputGUI($this->lng->txt('tst_activate_skill_service'), 'skill_service');
484  $skillService->setInfo($this->lng->txt('tst_activate_skill_service_desc'));
485  $skillService->setChecked($this->testOBJ->isSkillServiceEnabled());
486  if ($this->testOBJ->participantDataExist()) {
487  $skillService->setDisabled(true);
488  }
489  $form->addItem($skillService);
490  }
491 
492  // remove items when using template
493  $this->removeHiddenItems($form);
494 
495  return $form;
496  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
removeHiddenItems(ilPropertyFormGUI $form)
setInfo($a_info)
Set Information Text.
addQuestionBehaviourProperties(ilPropertyFormGUI $form)
if(isset($_POST['submit'])) $form
Class ilECSTestSettings.
static isSkillManagementGloballyActivated()
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmedResetTemplateCmd()

ilObjTestSettingsGeneralGUI::confirmedResetTemplateCmd ( )
private

Enable all settings - remove template.

Definition at line 402 of file class.ilObjTestSettingsGeneralGUI.php.

403  {
404  $this->testOBJ->setTemplate(null);
405  $this->testOBJ->saveToDB();
406 
407  ilUtil::sendSuccess($this->lng->txt("test_template_reset"), true);
408  $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
409  }

◆ confirmedSaveFormCmd()

ilObjTestSettingsGeneralGUI::confirmedSaveFormCmd ( )
private

Definition at line 197 of file class.ilObjTestSettingsGeneralGUI.php.

References saveFormCmd().

198  {
199  return $this->saveFormCmd(true);
200  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjTestSettingsGeneralGUI::executeCommand ( )

Command Execution.

Definition at line 112 of file class.ilObjTestSettingsGeneralGUI.php.

References $DIC, ilUtil\sendInfo(), and ilTestTabsManager\TAB_ID_SETTINGS.

113  {
114  global $DIC; /* @var ILIAS\DI\Container $DIC */
115 
116  // allow only write access
117 
118  if (!$this->access->checkAccess("write", "", $this->testGUI->ref_id)) {
119  ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
120  $this->ctrl->redirect($this->testGUI, "infoScreen");
121  }
122 
123  $DIC->tabs()->activateTab(ilTestTabsManager::TAB_ID_SETTINGS);
124 
125  // process command
126 
127  $nextClass = $this->ctrl->getNextClass();
128 
129  switch ($nextClass) {
130  default:
131  $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM) . 'Cmd';
132  $this->$cmd();
133  }
134  }
global $DIC
Definition: saml.php:7
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ getAnswerFixationSettingsAsFormValue()

ilObjTestSettingsGeneralGUI::getAnswerFixationSettingsAsFormValue ( )
protected

Definition at line 1590 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by addQuestionBehaviourProperties().

1591  {
1592  if ($this->testOBJ->isInstantFeedbackAnswerFixationEnabled() && $this->testOBJ->isFollowupQuestionAnswerFixationEnabled()) {
1593  return self::ANSWER_FIXATION_ON_IFB_OR_FUQST;
1594  }
1595 
1596  if ($this->testOBJ->isFollowupQuestionAnswerFixationEnabled()) {
1597  return self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION;
1598  }
1599 
1600  if ($this->testOBJ->isInstantFeedbackAnswerFixationEnabled()) {
1601  return self::ANSWER_FIXATION_ON_INSTANT_FEEDBACK;
1602  }
1603 
1604  return self::ANSWER_FIXATION_NONE;
1605  }
+ Here is the caller graph for this function:

◆ getSettingsTemplateMessageHTML()

ilObjTestSettingsGeneralGUI::getSettingsTemplateMessageHTML ( )
protected

Definition at line 169 of file class.ilObjTestSettingsGeneralGUI.php.

References $DIC, $title, and $tpl.

Referenced by showFormCmd().

170  {
171  if ($this->settingsTemplate) {
172  $title = $this->settingsTemplate->getTitle();
173 
174  if ($this->settingsTemplate->getAutoGenerated()) {
175  $title = $this->lng->txt($title);
176  }
177 
178  global $DIC;
179  $tpl = $DIC['tpl'];
180 
181  $link = $this->ctrl->getLinkTarget($this, self::CMD_SHOW_RESET_TPL_CONFIRM);
182  $link = "<a href=\"" . $link . "\">" . $this->lng->txt("test_using_template_link") . "</a>";
183 
184  $msgHTML = $tpl->getMessageHTML(
185  sprintf($this->lng->txt("test_using_template"), $title, $link),
186  "info"
187  );
188 
189  $msgHTML = "<div style=\"margin-top:10px\">$msgHTML</div>";
190  } else {
191  $msgHTML = '';
192  }
193 
194  return $msgHTML;
195  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ isCharSelectorPropertyRequired()

ilObjTestSettingsGeneralGUI::isCharSelectorPropertyRequired ( )
private

Definition at line 428 of file class.ilObjTestSettingsGeneralGUI.php.

References $DIC, and $ilSetting.

Referenced by addQuestionBehaviourProperties(), and saveQuestionBehaviourProperties().

429  {
430  global $DIC;
431  $ilSetting = $DIC['ilSetting'];
432 
433  return $ilSetting->get('char_selector_availability') > 0;
434  }
global $DIC
Definition: saml.php:7
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

◆ isSkillServiceSettingToBeAdjusted()

ilObjTestSettingsGeneralGUI::isSkillServiceSettingToBeAdjusted ( ilPropertyFormGUI  $form)
private

Definition at line 411 of file class.ilObjTestSettingsGeneralGUI.php.

References ilPropertyFormGUI\getItemByPostVar(), and ilObjTest\isSkillManagementGloballyActivated().

412  {
413  if (!($form->getItemByPostVar('skill_service') instanceof ilFormPropertyGUI)) {
414  return false;
415  }
416 
418  return false;
419  }
420 
421  if (!$form->getItemByPostVar('skill_service')->getChecked()) {
422  return false;
423  }
424 
425  return true;
426  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
static isSkillManagementGloballyActivated()
This class represents a property in a property form.
+ Here is the call graph for this function:

◆ performSaveForm()

ilObjTestSettingsGeneralGUI::performSaveForm ( ilPropertyFormGUI  $form)
private

Definition at line 498 of file class.ilObjTestSettingsGeneralGUI.php.

References $form, ilPropertyFormGUI\getItemByPostVar(), ilObjTest\isSkillManagementGloballyActivated(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, saveAvailabilityProperties(), saveGeneralProperties(), savePresentationProperties(), saveQuestionBehaviourProperties(), saveTestAccessProperties(), saveTestFinishProperties(), saveTestIntroProperties(), saveTestRunProperties(), saveTestSequenceSettings(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

Referenced by saveFormCmd().

499  {
500  $this->saveGeneralProperties($form);
501  $this->savePresentationProperties($form);
502  $this->saveAvailabilityProperties($form);
503  $this->saveTestIntroProperties($form);
504  $this->saveTestAccessProperties($form);
505  $this->saveTestRunProperties($form);
506  $this->saveQuestionBehaviourProperties($form);
507  $this->saveTestSequenceSettings($form);
508  $this->saveTestFinishProperties($form);
509 
510  if (!$this->testOBJ->participantDataExist()) {
511  // skill service
512  if (ilObjTest::isSkillManagementGloballyActivated() && $form->getItemByPostVar('skill_service') instanceof ilFormPropertyGUI) {
513  $this->testOBJ->setSkillServiceEnabled($form->getItemByPostVar('skill_service')->getChecked());
514  }
515  }
516 
517  require_once 'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
518  ilObjectServiceSettingsGUI::updateServiceSettingsForm($this->testOBJ->getId(), $form, array(
520  ));
521 
522  // store settings to db
523  $this->testOBJ->saveToDb(true);
524 
525  // Update ecs export settings
526  include_once 'Modules/Test/classes/class.ilECSTestSettings.php';
527  $ecs = new ilECSTestSettings($this->testOBJ);
528  $ecs->handleSettingsUpdate();
529  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
if(isset($_POST['submit'])) $form
Class ilECSTestSettings.
saveQuestionBehaviourProperties(ilPropertyFormGUI $form)
static isSkillManagementGloballyActivated()
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
This class represents a property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAvailabilityProperties()

ilObjTestSettingsGeneralGUI::saveAvailabilityProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 715 of file class.ilObjTestSettingsGeneralGUI.php.

References ilPropertyFormGUI\getItemByPostVar(), and IL_CAL_UNIX.

Referenced by performSaveForm().

716  {
717  // activation
718  if ($form->getItemByPostVar('activation_type')->getChecked()) {
719  $this->testOBJ->setActivationLimited(true);
720  $this->testOBJ->setActivationVisibility($form->getItemByPostVar('activation_visibility')->getChecked());
721 
722  $period = $form->getItemByPostVar("access_period");
723  $this->testOBJ->setActivationStartingTime($period->getStart()->get(IL_CAL_UNIX));
724  $this->testOBJ->setActivationEndingTime($period->getEnd()->get(IL_CAL_UNIX));
725  } else {
726  $this->testOBJ->setActivationLimited(false);
727  }
728  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
const IL_CAL_UNIX
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveFormCmd()

ilObjTestSettingsGeneralGUI::saveFormCmd (   $isConfirmedSave = false)
private

Definition at line 202 of file class.ilObjTestSettingsGeneralGUI.php.

References $errors, $form, buildForm(), performSaveForm(), ilObjTest\QUESTION_SET_TYPE_DYNAMIC, ilObjTest\QUESTION_SET_TYPE_FIXED, ilUtil\sendFailure(), ilUtil\sendInfo(), showConfirmation(), and showFormCmd().

Referenced by confirmedSaveFormCmd().

203  {
204  $form = $this->buildForm();
205 
206  // form validation and initialisation
207 
208  if ($isConfirmedSave) {
209  // since confirmation does only pickup POST and no FILES
210  // mocking the tile image file upload field is neccessary
211  // due to checkInput() behaviour (fixes mantis #24226)
212  $_FILES['tile_image'] = array(
213  'name' => '', 'type' => '', 'size' => '', 'tmp_name' => '', 'error' => ''
214  );
215 
216  // TODO: get rid of question selection mode setting in settings form (move to creation screen)
217  }
218 
219  $errors = !$form->checkInput(); // ALWAYS CALL BEFORE setValuesByPost()
220  $form->setValuesByPost(); // NEVER CALL THIS BEFORE checkInput()
221  // Sarcasm? No. Because checkInput checks the form graph against the POST without
222  // actually setting the values into the form. Sounds ridiculous? Indeed, and it is.
223 
224  // return to form when any form validation errors exist
225 
226  if ($errors) {
227  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
228  return $this->showFormCmd($form);
229  }
230 
231  // return to form when online is to be set, but no questions are configured
232 
233  $currentQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
234  if ($form->getItemByPostVar('online')->getChecked() && !$this->testOBJ->isComplete($currentQuestionSetConfig)) {
235  $form->getItemByPostVar('online')->setAlert(
236  $this->lng->txt("cannot_switch_to_online_no_questions_andor_no_mark_steps")
237  );
238 
239  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
240  return $this->showFormCmd($form);
241  }
242 
243  // avoid settings conflict "ctm" and "do not show question titles"
244 
245  $qstSetSetting = $form->getItemByPostVar('question_set_type');
246  $qTitleSetting = $form->getItemByPostVar('title_output');
247 
248  if ($qstSetSetting->getValue() == ilObjTest::QUESTION_SET_TYPE_DYNAMIC && $qTitleSetting->getValue() == 2) {
249  $qstSetSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
250  $qTitleSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
251 
252  ilUtil::sendFailure($this->lng->txt('tst_settings_conflict_message'));
253  return $this->showFormCmd($form);
254  }
255 
256  // avoid settings conflict "obligate questions" and "freeze answer"
257 
258  $obligationsSetting = $form->getItemByPostVar('obligations_enabled');
259  $answerFixationSetting = $form->getItemByPostVar('answer_fixation_handling');
260 
261  if ($obligationsSetting->getChecked() && $answerFixationSetting->getValue() != self::ANSWER_FIXATION_NONE) {
262  $obligationsSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
263  $answerFixationSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
264 
265  ilUtil::sendFailure($this->lng->txt('tst_settings_conflict_message'));
266  return $this->showFormCmd($form);
267  }
268 
269  // avoid settings conflict "freeze answer on followup question" and "question postponing"
270 
271  $postponeSetting = $form->getItemByPostVar('postpone');
272  $answerFixationSetting = $form->getItemByPostVar('answer_fixation_handling');
273  $conflictModes = array(self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION, self::ANSWER_FIXATION_ON_IFB_OR_FUQST);
274 
275  if ($postponeSetting->getValue() && in_array($answerFixationSetting->getValue(), $conflictModes)) {
276  $postponeSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
277  $answerFixationSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
278 
279  ilUtil::sendFailure($this->lng->txt('tst_settings_conflict_message'));
280  return $this->showFormCmd($form);
281  }
282 
283  // avoid settings conflict "freeze answer on followup question" and "question shuffling"
284 
285  $shuffleSetting = $form->getItemByPostVar('chb_shuffle_questions');
286  $answerFixationSetting = $form->getItemByPostVar('answer_fixation_handling');
287  $conflictModes = array(self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION, self::ANSWER_FIXATION_ON_IFB_OR_FUQST);
288 
289  if ($shuffleSetting->getChecked() && in_array($answerFixationSetting->getValue(), $conflictModes)) {
290  $shuffleSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
291  $answerFixationSetting->setAlert($this->lng->txt('tst_conflicting_setting'));
292 
293  ilUtil::sendFailure($this->lng->txt('tst_settings_conflict_message'));
294  return $this->showFormCmd($form);
295  }
296 
297  $infoMsg = array();
298 
299  // solve conflicts with question set type setting with confirmation screen if required
300  // determine wether question set type relating data is to be removed (questions/pools)
301 
302  $questionSetTypeRelatingDataCleanupRequired = false;
303 
304  $oldQuestionSetType = $this->testOBJ->getQuestionSetType();
305  if ($form->getItemByPostVar('question_set_type') instanceof ilFormPropertyGUI) {
306  $newQuestionSetType = $form->getItemByPostVar('question_set_type')->getValue();
307 
308  if (!$this->testOBJ->participantDataExist() && $newQuestionSetType != $oldQuestionSetType) {
309  $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType(
310  $oldQuestionSetType
311  );
312 
313  if ($oldQuestionSetConfig->doesQuestionSetRelatedDataExist()) {
314  if (!$isConfirmedSave) {
315  if ($oldQuestionSetType == ilObjTest::QUESTION_SET_TYPE_FIXED) {
316  return $this->showConfirmation(
317  $form,
318  $oldQuestionSetType,
319  $newQuestionSetType,
320  $this->testOBJ->hasQuestionsWithoutQuestionpool()
321  );
322  }
323 
324  return $this->showConfirmation(
325  $form,
326  $oldQuestionSetType,
327  $newQuestionSetType,
328  false
329  );
330  }
331 
332  $questionSetTypeRelatingDataCleanupRequired = true;
333  }
334 
335  if ($form->getItemByPostVar('online')->getChecked()) {
336  $form->getItemByPostVar('online')->setChecked(false);
337 
338  if (!$this->testOBJ->getOfflineStatus()) {
339  $infoMsg[] = $this->lng->txt("tst_set_offline_due_to_switched_question_set_type_setting");
340  } else {
341  $infoMsg[] = $this->lng->txt("tst_cannot_online_due_to_switched_quest_set_type_setting");
342  }
343  }
344  }
345  } else {
346  $newQuestionSetType = $oldQuestionSetType;
347  }
348 
349  // adjust settings due to chosen question set type
350 
351  if ($newQuestionSetType != ilObjTest::QUESTION_SET_TYPE_FIXED) {
352  $form->getItemByPostVar('chb_use_previous_answers')->setChecked(false);
353  }
354 
355  // perform saving the form data
356 
357  $this->performSaveForm($form);
358 
359  // clean up test mode relating configuration data (questions/questionpools)
360 
361  if ($questionSetTypeRelatingDataCleanupRequired) {
362  $oldQuestionSetConfig->removeQuestionSetRelatedData();
363  }
364 
365  // disinvite all invited users if required
366 
367  if (!$this->testOBJ->participantDataExist() && !$this->testOBJ->getFixedParticipants()) {
368  foreach ($this->testOBJ->getInvitedUsers() as $usrId => $usrData) {
369  $this->testOBJ->disinviteUser($usrId);
370  }
371  }
372 
373  // redirect to form output
374 
375  if (count($infoMsg)) {
376  ilUtil::sendInfo(implode('<br />', $infoMsg), true);
377  }
378 
379  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
380  $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
381  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$errors
Definition: index.php:6
showConfirmation(ilPropertyFormGUI $form, $oldQuestionSetType, $newQuestionSetType, $hasQuestionsWithoutQuestionpool)
This class represents a property in a property form.
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGeneralProperties()

ilObjTestSettingsGeneralGUI::saveGeneralProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 618 of file class.ilObjTestSettingsGeneralGUI.php.

References ilTestSettingsGUI\formPropertyExists(), ilMD\getGeneral(), ilPropertyFormGUI\getItemByPostVar(), ilMDBase\save(), ilUtil\stripSlashes(), and ilMDBase\update().

Referenced by performSaveForm().

619  {
620  include_once 'Services/MetaData/classes/class.ilMD.php';
621  $md_obj = new ilMD($this->testOBJ->getId(), 0, "tst");
622  $md_section = $md_obj->getGeneral();
623 
624  // title
625  $md_section->setTitle(ilUtil::stripSlashes($form->getItemByPostVar('title')->getValue()));
626  $md_section->update();
627 
628  // Description
629  $md_desc_ids = $md_section->getDescriptionIds();
630  if ($md_desc_ids) {
631  $md_desc = $md_section->getDescription(array_pop($md_desc_ids));
632  $md_desc->setDescription(ilUtil::stripSlashes($form->getItemByPostVar('description')->getValue()));
633  $md_desc->update();
634  } else {
635  $md_desc = $md_section->addDescription();
636  $md_desc->setDescription(ilUtil::stripSlashes($form->getItemByPostVar('description')->getValue()));
637  $md_desc->save();
638  }
639 
640  $this->testOBJ->setTitle(ilUtil::stripSlashes($form->getItemByPostVar('title')->getValue()));
641  $this->testOBJ->setDescription(ilUtil::stripSlashes($form->getItemByPostVar('description')->getValue()));
642  $this->testOBJ->setOfflineStatus(!$form->getItemByPostVar('online')->getChecked());
643  $this->testOBJ->update();
644 
645  // pool usage setting
646  if ($form->getItemByPostVar('use_pool') instanceof ilFormPropertyGUI) {
647  $this->testOBJ->setPoolUsage((int) $form->getItemByPostVar('use_pool')->getValue());
648  }
649 
650  if (!$this->testOBJ->participantDataExist()) {
651  // question set type
652  if ($form->getItemByPostVar('question_set_type') instanceof ilFormPropertyGUI) {
653  $this->testOBJ->setQuestionSetType($form->getItemByPostVar('question_set_type')->getValue());
654  }
655  }
656 
657  // anonymity setting
658  if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 'anonymity')) {
659  $this->testOBJ->setAnonymity($form->getItemByPostVar('anonymity')->getValue());
660  }
661  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
& getGeneral()
Definition: class.ilMD.php:40
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
This class represents a property in a property form.
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ savePresentationProperties()

ilObjTestSettingsGeneralGUI::savePresentationProperties ( ilPropertyFormGUI  $form)
protected
Parameters
ilPropertyFormGUI$form

Definition at line 747 of file class.ilObjTestSettingsGeneralGUI.php.

References $DIC.

Referenced by performSaveForm().

748  {
749  global $DIC; /* @var ILIAS\DI\Container $DIC */
750 
751  $DIC->object()->commonSettings()->legacyForm($form, $this->testOBJ)->saveTileImage();
752  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ saveQuestionBehaviourProperties()

ilObjTestSettingsGeneralGUI::saveQuestionBehaviourProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1285 of file class.ilObjTestSettingsGeneralGUI.php.

References ilCharSelectorConfig\CONTEXT_TEST, ilTestSettingsGUI\formPropertyExists(), ilPropertyFormGUI\getItemByPostVar(), isCharSelectorPropertyRequired(), and setAnswerFixationSettingsByFormValue().

Referenced by performSaveForm().

1286  {
1287  if ($form->getItemByPostVar('title_output') instanceof ilFormPropertyGUI) {
1288  $this->testOBJ->setTitleOutput($form->getItemByPostVar('title_output')->getValue());
1289  }
1290 
1291  if ($form->getItemByPostVar('autosave') instanceof ilFormPropertyGUI) {
1292  $this->testOBJ->setAutosave($form->getItemByPostVar('autosave')->getChecked());
1293  $this->testOBJ->setAutosaveIval($form->getItemByPostVar('autosave_ival')->getValue() * 1000);
1294  }
1295 
1296  if ($form->getItemByPostVar('chb_shuffle_questions') instanceof ilFormPropertyGUI) {
1297  $this->testOBJ->setShuffleQuestions($form->getItemByPostVar('chb_shuffle_questions')->getChecked());
1298  }
1299 
1300  if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 'offer_hints')) {
1301  $this->testOBJ->setOfferingQuestionHintsEnabled($form->getItemByPostVar('offer_hints')->getChecked());
1302  }
1303 
1304  if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 'instant_feedback_enabled')) {
1305  if ($form->getItemByPostVar('instant_feedback_enabled')->getChecked()) {
1306  if ($this->formPropertyExists($form, 'instant_feedback_contents')) {
1307  $this->testOBJ->setInstantFeedbackOptionsByArray(
1308  $form->getItemByPostVar('instant_feedback_contents')->getValue()
1309  );
1310  }
1311  if ($this->formPropertyExists($form, 'instant_feedback_trigger')) {
1312  $this->testOBJ->setForceInstantFeedbackEnabled(
1313  (bool) $form->getItemByPostVar('instant_feedback_trigger')->getValue()
1314  );
1315  }
1316  } else {
1317  $this->testOBJ->setInstantFeedbackOptionsByArray(array());
1318  $this->testOBJ->setForceInstantFeedbackEnabled(false);
1319  }
1320  }
1321 
1322  if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 'answer_fixation_handling')) {
1323  $this->setAnswerFixationSettingsByFormValue($form->getItemByPostVar('answer_fixation_handling')->getValue());
1324  }
1325 
1326  if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 'obligations_enabled')) {
1327  $this->testOBJ->setObligationsEnabled($form->getItemByPostVar('obligations_enabled')->getChecked());
1328  }
1329 
1330  if ($this->isCharSelectorPropertyRequired()) {
1331  require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
1333  $char_selector->addFormProperties($form);
1334  $char_selector->getFormValues($form);
1335  $this->testOBJ->setCharSelectorAvailability($char_selector->getConfig()->getAvailability());
1336  $this->testOBJ->setCharSelectorDefinition($char_selector->getConfig()->getDefinition());
1337  }
1338  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
This shows a character selector.
This class represents a property in a property form.
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTestAccessProperties()

ilObjTestSettingsGeneralGUI::saveTestAccessProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 895 of file class.ilObjTestSettingsGeneralGUI.php.

References ilTestSettingsGUI\formPropertyExists(), and ilPropertyFormGUI\getItemByPostVar().

Referenced by performSaveForm().

896  {
897  if (!$this->testOBJ->participantDataExist()) {
898  // starting time
899  $starting_time = $form->getItemByPostVar('starting_time')->getDate();
900  if ($starting_time instanceof ilDateTime) {
901  $this->testOBJ->setStartingTime($starting_time->getUnixtime());
902  $this->testOBJ->setStartingTimeEnabled(true);
903  } else {
904  $this->testOBJ->setStartingTime(null);
905  $this->testOBJ->setStartingTimeEnabled(false);
906  }
907  }
908 
909  // ending time
910  $ending_time = $form->getItemByPostVar('ending_time')->getDate();
911  if ($ending_time instanceof ilDateTime) {
912  $this->testOBJ->setEndingTime($ending_time->getUnixtime());
913  $this->testOBJ->setEndingTimeEnabled(true);
914  } else {
915  $this->testOBJ->setEndingTime(null);
916  $this->testOBJ->setEndingTimeEnabled(false);
917  }
918 
919  if ($this->formPropertyExists($form, 'password_enabled')) {
920  $this->testOBJ->setPasswordEnabled($form->getItemByPostVar('password_enabled')->getChecked());
921 
922  if ($form->getItemByPostVar('password_enabled')->getChecked()) {
923  $this->testOBJ->setPassword($form->getItemByPostVar('password')->getValue());
924  } else {
925  $this->testOBJ->setPassword(''); // otherwise test will still respect value
926  }
927  }
928 
929  if ($this->formPropertyExists($form, 'fixedparticipants') && !$this->testOBJ->participantDataExist()) {
930  $this->testOBJ->setFixedParticipants($form->getItemByPostVar('fixedparticipants')->getChecked());
931  }
932 
933  if ($this->formPropertyExists($form, 'limitUsers')) {
934  $this->testOBJ->setLimitUsersEnabled($form->getItemByPostVar('limitUsers')->getChecked());
935 
936  if ($form->getItemByPostVar('limitUsers')->getChecked()) {
937  $this->testOBJ->setAllowedUsers($form->getItemByPostVar('allowedUsers')->getValue());
938  $this->testOBJ->setAllowedUsersTimeGap($form->getItemByPostVar('allowedUsersTimeGap')->getValue());
939  } else {
940  $this->testOBJ->setAllowedUsers(''); // otherwise test will still respect value
941  }
942  }
943  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
Date and time handling
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTestFinishProperties()

ilObjTestSettingsGeneralGUI::saveTestFinishProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1534 of file class.ilObjTestSettingsGeneralGUI.php.

References ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), ilTestSettingsGUI\formPropertyExists(), ilPropertyFormGUI\getItemByPostVar(), and REDIRECT_NONE.

Referenced by performSaveForm().

1535  {
1536  if ($this->formPropertyExists($form, 'enable_examview')) {
1537  $this->testOBJ->setEnableExamview($form->getItemByPostVar('enable_examview')->getChecked());
1538  $this->testOBJ->setShowExamviewPdf($form->getItemByPostVar('show_examview_pdf')->getChecked());
1539  }
1540 
1541  $this->testOBJ->setShowFinalStatement($form->getItemByPostVar('showfinalstatement')->getChecked());
1542  $this->testOBJ->setFinalStatement($form->getItemByPostVar('finalstatement')->getValue(), false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment"));
1543 
1544  if ($form->getItemByPostVar('redirection_enabled')->getChecked()) {
1545  $this->testOBJ->setRedirectionMode($form->getItemByPostVar('redirection_mode')->getValue());
1546  } else {
1547  $this->testOBJ->setRedirectionMode(REDIRECT_NONE);
1548  }
1549  if (strlen($form->getItemByPostVar('redirection_url')->getValue())) {
1550  $this->testOBJ->setRedirectionUrl($form->getItemByPostVar('redirection_url')->getValue());
1551  } else {
1552  $this->testOBJ->setRedirectionUrl(null);
1553  }
1554 
1555  if ($this->formPropertyExists($form, 'sign_submission')) {
1556  $this->testOBJ->setSignSubmission($form->getItemByPostVar('sign_submission')->getChecked());
1557  }
1558 
1559  if ($this->formPropertyExists($form, 'mailnotification') && $form->getItemByPostVar('mailnotification')->getChecked()) {
1560  $this->testOBJ->setMailNotification($form->getItemByPostVar('mailnotification_content')->getValue());
1561  $this->testOBJ->setMailNotificationType($form->getItemByPostVar('mailnottype')->getChecked());
1562  } else {
1563  $this->testOBJ->setMailNotification(0);
1564  $this->testOBJ->setMailNotificationType(false);
1565  }
1566  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
const REDIRECT_NONE
Redirect after finishing test constants.
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTestIntroProperties()

ilObjTestSettingsGeneralGUI::saveTestIntroProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 791 of file class.ilObjTestSettingsGeneralGUI.php.

References ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), and ilPropertyFormGUI\getItemByPostVar().

Referenced by performSaveForm().

792  {
793  if ($form->getItemByPostVar('intro_enabled') instanceof ilFormPropertyGUI) {
794  $this->testOBJ->setIntroductionEnabled($form->getItemByPostVar('intro_enabled')->getChecked());
795 
796  if ($form->getItemByPostVar('intro_enabled')->getChecked()) {
797  $this->testOBJ->setIntroduction($form->getItemByPostVar('introduction')->getValue(), false, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("assessment"));
798  } else {
799  $this->testOBJ->setIntroduction('');
800  }
801  }
802 
803  if ($form->getItemByPostVar('showinfo') instanceof ilFormPropertyGUI) {
804  $this->testOBJ->setShowInfo($form->getItemByPostVar('showinfo')->getChecked());
805  }
806  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
This class represents a property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTestRunProperties()

ilObjTestSettingsGeneralGUI::saveTestRunProperties ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1068 of file class.ilObjTestSettingsGeneralGUI.php.

References ilPropertyFormGUI\getInput(), and ilPropertyFormGUI\getItemByPostVar().

Referenced by performSaveForm().

1069  {
1070  if (!$this->testOBJ->participantDataExist()) {
1071  // nr of tries (max passes)
1072  if ($form->getItemByPostVar('limitPasses') instanceof ilFormPropertyGUI) {
1073  if ($form->getItemByPostVar('limitPasses')->getChecked()) {
1074  $this->testOBJ->setNrOfTries($form->getItemByPostVar('nr_of_tries')->getValue());
1075  } else {
1076  $this->testOBJ->setNrOfTries(0);
1077  }
1078  }
1079 
1080  // pass_waiting
1081  if ($form->getItemByPostVar('pass_waiting_enabled') instanceof ilFormPropertyGUI) {
1082  if ($form->getItemByPostVar('pass_waiting_enabled')->getChecked()) {
1083  $pass_waiting_values = $form->getItemByPostVar('pass_waiting');
1084 
1085  $pass_waiting_duration[] = sprintf("%'.02d", $pass_waiting_values->getMonths());
1086  $pass_waiting_duration[] = sprintf("%'.03d", $pass_waiting_values->getDays());
1087  $pass_waiting_duration[] = sprintf("%'.02d", $pass_waiting_values->getHours());
1088  $pass_waiting_duration[] = sprintf("%'.02d", $pass_waiting_values->getMinutes());
1089  $pass_waiting_duration[] = sprintf("%'.02d", $pass_waiting_values->getSeconds());
1090 
1091  $pass_waiting_string = implode(':', $pass_waiting_duration);
1092  $this->testOBJ->setPassWaiting($pass_waiting_string);
1093  } else {
1094  $this->testOBJ->setPassWaiting("00:000:00:00:00");
1095  }
1096  }
1097 
1098  $this->testOBJ->setEnableProcessingTime($form->getItemByPostVar('chb_processing_time')->getChecked());
1099  if ($this->testOBJ->getEnableProcessingTime()) {
1100  $this->testOBJ->setProcessingTimeByMinutes($form->getItemByPostVar('processing_time')->getValue());
1101  $this->testOBJ->setResetProcessingTime($form->getItemByPostVar('chb_reset_processing_time')->getChecked());
1102  } else {
1103  $this->testOBJ->setProcessingTime('');
1104  $this->testOBJ->setResetProcessingTime(false);
1105  }
1106  }
1107 
1108  if ($form->getItemByPostVar('kiosk') instanceof ilFormPropertyGUI) {
1109  $this->testOBJ->setKioskMode($form->getInput('kiosk'));
1110  $kioskOptions = $form->getItemByPostVar('kiosk_options')->getValue();
1111  if (is_array($kioskOptions)) {
1112  $this->testOBJ->setShowKioskModeTitle(in_array('kiosk_title', $kioskOptions));
1113  $this->testOBJ->setShowKioskModeParticipant(in_array('kiosk_participant', $kioskOptions));
1114  } else {
1115  $this->testOBJ->setShowKioskModeTitle(false);
1116  $this->testOBJ->setShowKioskModeParticipant(false);
1117  }
1118  }
1119 
1120  if ($form->getItemByPostVar('examid_in_test_pass') instanceof ilFormPropertyGUI) {
1121  $value = $form->getItemByPostVar('examid_in_test_pass')->getChecked();
1122  $this->testOBJ->setShowExamIdInTestPassEnabled($value);
1123  }
1124  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
This class represents a property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveTestSequenceSettings()

ilObjTestSettingsGeneralGUI::saveTestSequenceSettings ( ilPropertyFormGUI  $form)
private
Parameters
ilPropertyFormGUI$form

Definition at line 1416 of file class.ilObjTestSettingsGeneralGUI.php.

References ilTestSettingsGUI\formPropertyExists(), ilPropertyFormGUI\getInput(), and ilPropertyFormGUI\getItemByPostVar().

Referenced by performSaveForm().

1417  {
1418  if ($this->formPropertyExists($form, 'chb_use_previous_answers')) {
1419  $this->testOBJ->setUsePreviousAnswers($form->getInput('chb_use_previous_answers'));
1420  }
1421 
1422  if ($this->formPropertyExists($form, 'chb_show_cancel')) {
1423  $this->testOBJ->setShowCancel($form->getItemByPostVar('chb_show_cancel')->getChecked());
1424  }
1425 
1426  if ($this->formPropertyExists($form, 'postpone')) {
1427  $this->testOBJ->setPostponingEnabled((bool) $form->getItemByPostVar('postpone')->getValue());
1428  }
1429 
1430  $this->testOBJ->setListOfQuestions($form->getItemByPostVar('list_of_questions')->getChecked());
1431  $listOfQuestionsOptions = $form->getItemByPostVar('list_of_questions_options')->getValue();
1432  if (is_array($listOfQuestionsOptions)) {
1433  $this->testOBJ->setListOfQuestionsStart(in_array('chb_list_of_questions_start', $listOfQuestionsOptions));
1434  $this->testOBJ->setListOfQuestionsEnd(in_array('chb_list_of_questions_end', $listOfQuestionsOptions));
1435  $this->testOBJ->setListOfQuestionsDescription(in_array('chb_list_of_questions_with_description', $listOfQuestionsOptions));
1436  } else {
1437  $this->testOBJ->setListOfQuestionsStart(0);
1438  $this->testOBJ->setListOfQuestionsEnd(0);
1439  $this->testOBJ->setListOfQuestionsDescription(0);
1440  }
1441 
1442  if ($this->formPropertyExists($form, 'chb_show_marker')) {
1443  $this->testOBJ->setShowMarker($form->getItemByPostVar('chb_show_marker')->getChecked());
1444  }
1445  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAnswerFixationSettingsByFormValue()

ilObjTestSettingsGeneralGUI::setAnswerFixationSettingsByFormValue (   $formValue)
protected

Definition at line 1568 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by saveQuestionBehaviourProperties().

1569  {
1570  switch ($formValue) {
1571  case self::ANSWER_FIXATION_NONE:
1572  $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(false);
1573  $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(false);
1574  break;
1575  case self::ANSWER_FIXATION_ON_INSTANT_FEEDBACK:
1576  $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(true);
1577  $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(false);
1578  break;
1579  case self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION:
1580  $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(false);
1581  $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(true);
1582  break;
1583  case self::ANSWER_FIXATION_ON_IFB_OR_FUQST:
1584  $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(true);
1585  $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(true);
1586  break;
1587  }
1588  }
+ Here is the caller graph for this function:

◆ showConfirmation()

ilObjTestSettingsGeneralGUI::showConfirmation ( ilPropertyFormGUI  $form,
  $oldQuestionSetType,
  $newQuestionSetType,
  $hasQuestionsWithoutQuestionpool 
)
private

Definition at line 150 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by saveFormCmd().

151  {
152  require_once 'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
153  $confirmation = new ilTestSettingsChangeConfirmationGUI($this->lng, $this->testOBJ);
154 
155  $confirmation->setFormAction($this->ctrl->getFormAction($this));
156  $confirmation->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
157  $confirmation->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_SAVE_FORM);
158 
159  $confirmation->setOldQuestionSetType($oldQuestionSetType);
160  $confirmation->setNewQuestionSetType($newQuestionSetType);
161  $confirmation->setQuestionLossInfoEnabled($hasQuestionsWithoutQuestionpool);
162  $confirmation->build();
163 
164  $confirmation->populateParametersFromPropertyForm($form, $this->activeUser->getTimeZone());
165 
166  $this->tpl->setContent($this->ctrl->getHTML($confirmation));
167  }
+ Here is the caller graph for this function:

◆ showFormCmd()

ilObjTestSettingsGeneralGUI::showFormCmd ( ilPropertyFormGUI  $form = null)
private

Definition at line 136 of file class.ilObjTestSettingsGeneralGUI.php.

References $form, buildForm(), and getSettingsTemplateMessageHTML().

Referenced by saveFormCmd().

137  {
138  $this->tpl->addJavascript("./Services/JavaScript/js/Basic.js");
139 
140  if ($form === null) {
141  $form = $this->buildForm();
142  }
143 
144  $formHTML = $this->ctrl->getHTML($form);
145  $msgHTML = $this->getSettingsTemplateMessageHTML();
146 
147  $this->tpl->setContent($formHTML . $msgHTML);
148  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showResetTemplateConfirmationCmd()

ilObjTestSettingsGeneralGUI::showResetTemplateConfirmationCmd ( )
private

Enable all settings - Confirmation.

Definition at line 386 of file class.ilObjTestSettingsGeneralGUI.php.

387  {
388  require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
389  $confirmationGUI = new ilConfirmationGUI();
390 
391  $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
392  $confirmationGUI->setHeaderText($this->lng->txt("test_confirm_template_reset"));
393  $confirmationGUI->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
394  $confirmationGUI->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_RESET_TPL);
395 
396  $this->tpl->setContent($this->ctrl->getHTML($confirmationGUI));
397  }
Confirmation screen class.

Field Documentation

◆ $access

ilObjTestSettingsGeneralGUI::$access = null
protected

Definition at line 43 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ $activeUser

ilObjTestSettingsGeneralGUI::$activeUser = null
protected

Definition at line 61 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ $ctrl

ilObjTestSettingsGeneralGUI::$ctrl = null
protected

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

Referenced by __construct().

◆ $db

ilObjTestSettingsGeneralGUI::$db = null
protected

Definition at line 55 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ $lng

ilObjTestSettingsGeneralGUI::$lng = null
protected

Definition at line 46 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ $pluginAdmin

ilObjTestSettingsGeneralGUI::$pluginAdmin = null
protected

Definition at line 58 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ $testGUI

ilObjTestSettingsGeneralGUI::$testGUI = null
protected

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

Referenced by __construct().

◆ $testQuestionSetConfigFactory

ilObjTestSettingsGeneralGUI::$testQuestionSetConfigFactory = null
private

Definition at line 67 of file class.ilObjTestSettingsGeneralGUI.php.

◆ $tpl

ilObjTestSettingsGeneralGUI::$tpl = null
protected

◆ $tree

ilObjTestSettingsGeneralGUI::$tree = null
protected

Definition at line 52 of file class.ilObjTestSettingsGeneralGUI.php.

Referenced by __construct().

◆ ANSWER_FIXATION_NONE

const ilObjTestSettingsGeneralGUI::ANSWER_FIXATION_NONE = 'none'

◆ ANSWER_FIXATION_ON_FOLLOWUP_QUESTION

const ilObjTestSettingsGeneralGUI::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION = 'followup_question'

◆ ANSWER_FIXATION_ON_IFB_OR_FUQST

const ilObjTestSettingsGeneralGUI::ANSWER_FIXATION_ON_IFB_OR_FUQST = 'ifb_or_fuqst'

◆ ANSWER_FIXATION_ON_INSTANT_FEEDBACK

const ilObjTestSettingsGeneralGUI::ANSWER_FIXATION_ON_INSTANT_FEEDBACK = 'instant_feedback'

◆ CMD_CONFIRMED_RESET_TPL

const ilObjTestSettingsGeneralGUI::CMD_CONFIRMED_RESET_TPL = 'confirmedResetTemplate'

Definition at line 29 of file class.ilObjTestSettingsGeneralGUI.php.

◆ CMD_CONFIRMED_SAVE_FORM

const ilObjTestSettingsGeneralGUI::CMD_CONFIRMED_SAVE_FORM = 'confirmedSaveForm'

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

◆ CMD_SAVE_FORM

const ilObjTestSettingsGeneralGUI::CMD_SAVE_FORM = 'saveForm'

Definition at line 26 of file class.ilObjTestSettingsGeneralGUI.php.

◆ CMD_SHOW_FORM

const ilObjTestSettingsGeneralGUI::CMD_SHOW_FORM = 'showForm'

◆ CMD_SHOW_RESET_TPL_CONFIRM

const ilObjTestSettingsGeneralGUI::CMD_SHOW_RESET_TPL_CONFIRM = 'showResetTemplateConfirmation'

Definition at line 28 of file class.ilObjTestSettingsGeneralGUI.php.

◆ INSTANT_FEEDBACK_TRIGGER_FORCED

const ilObjTestSettingsGeneralGUI::INSTANT_FEEDBACK_TRIGGER_FORCED = 1

◆ INSTANT_FEEDBACK_TRIGGER_MANUAL

const ilObjTestSettingsGeneralGUI::INSTANT_FEEDBACK_TRIGGER_MANUAL = 0

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