4require_once 
'Modules/Test/classes/class.ilTestSettingsGUI.php';
 
    5require_once 
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
 
   96        $this->tpl = 
$DIC->ui()->mainTemplate();
 
  104        require_once 
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
 
  119        if (!$this->access->checkAccess(
"write", 
"", $this->testGUI->ref_id)) {
 
  121            $this->ctrl->redirect($this->testGUI, 
"infoScreen");
 
  128        $nextClass = $this->ctrl->getNextClass();
 
  130        switch ($nextClass) {
 
  132                $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM) . 
'Cmd';
 
  139        $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
 
  141        if ($form === 
null) {
 
  145        $formHTML = $this->ctrl->getHTML($form);
 
  148        $this->tpl->setContent($formHTML . $msgHTML);
 
  153        require_once 
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
 
  156        $confirmation->setFormAction($this->ctrl->getFormAction($this));
 
  157        $confirmation->setCancel($this->lng->txt(
'cancel'), self::CMD_SHOW_FORM);
 
  158        $confirmation->setConfirm($this->lng->txt(
'confirm'), self::CMD_CONFIRMED_SAVE_FORM);
 
  160        $confirmation->setOldQuestionSetType($oldQuestionSetType);
 
  161        $confirmation->setNewQuestionSetType($newQuestionSetType);
 
  162        $confirmation->setQuestionLossInfoEnabled($hasQuestionsWithoutQuestionpool);
 
  163        $confirmation->build();
 
  165        $confirmation->populateParametersFromPropertyForm($form, $this->activeUser->getTimeZone());
 
  167        $this->tpl->setContent($this->ctrl->getHTML($confirmation));
 
  172        if ($this->settingsTemplate) {
 
  173            $title = $this->settingsTemplate->getTitle();
 
  175            if ($this->settingsTemplate->getAutoGenerated()) {
 
  176                $title = $this->lng->txt($title);
 
  182            $link = $this->ctrl->getLinkTarget($this, self::CMD_SHOW_RESET_TPL_CONFIRM);
 
  183            $link = 
"<a href=\"" . $link . 
"\">" . $this->lng->txt(
"test_using_template_link") . 
"</a>";
 
  186                sprintf($this->lng->txt(
"test_using_template"), $title, $link),
 
  190            $msgHTML = 
"<div style=\"margin-top:10px\">$msgHTML</div>";
 
  209        if ($isConfirmedSave) {
 
  213            $_FILES[
'tile_image'] = array(
 
  214                'name' => 
'', 
'type' => 
'', 
'size' => 
'', 
'tmp_name' => 
'', 
'error' => 
'' 
  220        $errors = !$form->checkInput(); 
 
  224            $form->setValuesByPost();
 
  232        $currentQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
 
  233        if ($form->getInput(
'online') && !$this->testOBJ->isComplete($currentQuestionSetConfig)) {
 
  234            $form->getItemByPostVar(
'online')->setAlert(
 
  235                $this->lng->txt(
"cannot_switch_to_online_no_questions_andor_no_mark_steps")
 
  238            $form->setValuesByPost();
 
  246            $form->getItemByPostVar(
'question_set_type')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  247            $form->getItemByPostVar(
'title_output')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  249            $form->setValuesByPost();
 
  256        if ($form->getInput(
'obligations_enabled') && $form->getInput(
'answer_fixation_handling') != self::ANSWER_FIXATION_NONE) {
 
  257            $form->getItemByPostVar(
'obligations_enabled')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  258            $form->getItemByPostVar(
'answer_fixation_handling')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  260            $form->setValuesByPost();
 
  267        $conflictModes = array(self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION, self::ANSWER_FIXATION_ON_IFB_OR_FUQST);
 
  268        if ($form->getInput(
'postpone') &&
 
  269            in_array($form->getInput(
'answer_fixation_handling'), $conflictModes, 
true)) {
 
  270            $form->getItemByPostVar(
'postpone')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  271            $form->getItemByPostVar(
'answer_fixation_handling')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  273            $form->setValuesByPost();
 
  280        $conflictModes = array(self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION, self::ANSWER_FIXATION_ON_IFB_OR_FUQST);
 
  281        if ($form->getInput(
'chb_shuffle_questions') &&
 
  282            in_array($form->getInput(
'answer_fixation_handling'), $conflictModes, 
true)) {
 
  283            $form->getItemByPostVar(
'chb_shuffle_questions')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  284            $form->getItemByPostVar(
'answer_fixation_handling')->setAlert($this->lng->txt(
'tst_conflicting_setting'));
 
  286            $form->setValuesByPost();
 
  297        $questionSetTypeRelatingDataCleanupRequired = 
false;
 
  299        $oldQuestionSetType = $this->testOBJ->getQuestionSetType();
 
  301            $newQuestionSetType = $form->getInput(
'question_set_type');
 
  303            if (!$this->testOBJ->participantDataExist() && $newQuestionSetType != $oldQuestionSetType) {
 
  304                $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType(
 
  308                if ($oldQuestionSetConfig->doesQuestionSetRelatedDataExist()) {
 
  309                    if (!$isConfirmedSave) {
 
  310                        $form->setValuesByPost();
 
  316                                $this->testOBJ->hasQuestionsWithoutQuestionpool()
 
  330                    $questionSetTypeRelatingDataCleanupRequired = 
true;
 
  333                if ($form->getInput(
'online')) {
 
  334                    $form->getItemByPostVar(
'online')->setChecked(
false);
 
  336                    if (!$this->testOBJ->getOfflineStatus()) {
 
  337                        $infoMsg[] = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
 
  339                        $infoMsg[] = $this->lng->txt(
"tst_cannot_online_due_to_switched_quest_set_type_setting");
 
  344            $newQuestionSetType = $oldQuestionSetType;
 
  350            $form->getItemByPostVar(
'chb_use_previous_answers')->setChecked(
false);
 
  353        $ending_time = $form->getInput(
'ending_time');
 
  354        $starting_time = $form->getInput(
'starting_time');
 
  355        if (is_string($ending_time) && $ending_time !== 
'' 
  356                && is_string($starting_time) && $starting_time !== 
'' 
  357            && ($starting_time > $ending_time
 
  361            $form->setValuesByPost();
 
  362            $form->getItemByPostVar(
'starting_time')->setDate(
new ilDateTime($this->testOBJ->getStartingTime(), 
IL_CAL_UNIX));
 
  373        if ($questionSetTypeRelatingDataCleanupRequired) {
 
  374            $oldQuestionSetConfig->removeQuestionSetRelatedData();
 
  379        if (!$this->testOBJ->participantDataExist() && !$this->testOBJ->getFixedParticipants()) {
 
  380            foreach ($this->testOBJ->getInvitedUsers() as $usrId => $usrData) {
 
  381                $this->testOBJ->disinviteUser($usrId);
 
  387        if (count($infoMsg)) {
 
  391        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
  392        $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
 
  400        require_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  403        $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
 
  404        $confirmationGUI->setHeaderText($this->lng->txt(
"test_confirm_template_reset"));
 
  405        $confirmationGUI->setCancel($this->lng->txt(
'cancel'), self::CMD_SHOW_FORM);
 
  406        $confirmationGUI->setConfirm($this->lng->txt(
'confirm'), self::CMD_CONFIRMED_RESET_TPL);
 
  408        $this->tpl->setContent($this->ctrl->getHTML($confirmationGUI));
 
  416        $this->testOBJ->setTemplate(
null);
 
  417        $this->testOBJ->saveToDB();
 
  419        ilUtil::sendSuccess($this->lng->txt(
"test_template_reset"), 
true);
 
  420        $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
 
  433        if (!$form->
getInput(
'skill_service')) {
 
  445        return $ilSetting->get(
'char_selector_availability') > 0;
 
  451        require_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  453        $form->setFormAction($this->ctrl->getFormAction($this));
 
  454        $form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt(
"save"));
 
  455        $form->setTableWidth(
"100%");
 
  456        $form->setId(
"test_properties");
 
  469        include_once 
'Modules/Test/classes/class.ilECSTestSettings.php';
 
  471        $ecs->addSettingsToForm($form, 
'tst');
 
  476            $this->testOBJ->getType()
 
  482        if ($orgunitServiceActive || $skillServiceActive) {
 
  484            $otherHead->setTitle($this->lng->txt(
'obj_features'));
 
  485            $form->addItem($otherHead);
 
  488        require_once 
'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  494        if ($skillServiceActive) {
 
  495            $skillService = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_activate_skill_service'), 
'skill_service');
 
  496            $skillService->setInfo($this->lng->txt(
'tst_activate_skill_service_desc'));
 
  497            $skillService->setChecked($this->testOBJ->isSkillServiceEnabled());
 
  498            if ($this->testOBJ->participantDataExist()) {
 
  499                $skillService->setDisabled(
true);
 
  501            $form->addItem($skillService);
 
  522        if (!$this->testOBJ->participantDataExist()) {
 
  525                $this->testOBJ->setSkillServiceEnabled((
bool) $form->
getInput(
'skill_service'));
 
  529        require_once 
'Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
 
  535        $this->testOBJ->saveToDb(
true);
 
  538        include_once 
'Modules/Test/classes/class.ilECSTestSettings.php';
 
  540        $ecs->handleSettingsUpdate();
 
  549        $header->setTitle($this->lng->txt(
"tst_general_properties"));
 
  554        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
  555        $md_obj = 
new ilMD($this->testOBJ->getId(), 0, 
"tst");
 
  556        $md_section = $md_obj->getGeneral();
 
  559        $title->setRequired(
true);
 
  560        $title->setValue($md_section->getTitle());
 
  563        $ids = $md_section->getDescriptionIds();
 
  565            $desc_obj = $md_section->getDescription(array_pop($ids));
 
  570            $desc->setValue($desc_obj->getDescription());
 
  575        $pool_usage = 
new ilRadioGroupInputGUI($this->lng->txt(
'test_question_pool_usage'), 
'use_pool');
 
  577        $optional_qpl = 
new ilRadioOption($this->lng->txt(
'test_question_pool_usage_optional'), 1);
 
  578        $optional_qpl->setInfo($this->lng->txt(
'test_question_pool_usage_optional_info'));
 
  579        $pool_usage->addOption($optional_qpl);
 
  581        $tst_directly = 
new ilRadioOption($this->lng->txt(
'test_question_pool_usage_tst_directly'), 0);
 
  582        $tst_directly->setInfo($this->lng->txt(
'test_question_pool_usage_tst_directly_info'));
 
  583        $pool_usage->addOption($tst_directly);
 
  585        $pool_usage->setValue($this->testOBJ->getPoolUsage() ? 1 : 0);
 
  589        $questSetType = 
new ilRadioGroupInputGUI($this->lng->txt(
"tst_question_set_type"), 
'question_set_type');
 
  591            $this->lng->txt(
"tst_question_set_type_fixed"),
 
  593            $this->lng->txt(
"tst_question_set_type_fixed_desc")
 
  595        $questSetType->addOption($questSetTypeFixed);
 
  597            $this->lng->txt(
"tst_question_set_type_random"),
 
  599            $this->lng->txt(
"tst_question_set_type_random_desc")
 
  601        $questSetType->addOption($questSetTypeRandom);
 
  603            $this->lng->txt(
"tst_question_set_type_dynamic"),
 
  605            $this->lng->txt(
"tst_question_set_type_dynamic_desc")
 
  607        $questSetType->addOption($questSetTypeContinues);
 
  608        $questSetType->setValue($this->testOBJ->getQuestionSetType());
 
  609        if ($this->testOBJ->participantDataExist()) {
 
  610            $questSetType->setDisabled(
true);
 
  616        if ($this->testOBJ->participantDataExist()) {
 
  617            $anonymity->setDisabled(
true);
 
  619        $rb = 
new ilRadioOption($this->lng->txt(
'tst_anonymity_no_anonymization'), 0);
 
  620        $anonymity->addOption($rb);
 
  621        $rb = 
new ilRadioOption($this->lng->txt(
'tst_anonymity_anonymous_test'), 1);
 
  622        $anonymity->addOption($rb);
 
  623        $anonymity->setValue((
int) $this->testOBJ->getAnonymity());
 
  632        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
  633        $md_obj = 
new ilMD($this->testOBJ->getId(), 0, 
"tst");
 
  634        $md_section = $md_obj->getGeneral();
 
  637        $md_section->setTitle($form->
getInput(
'title'));
 
  638        $md_section->update();
 
  641        $md_desc_ids = $md_section->getDescriptionIds();
 
  643            $md_desc = $md_section->getDescription(array_pop($md_desc_ids));
 
  644            $md_desc->setDescription($form->
getInput(
'description'));
 
  647            $md_desc = $md_section->addDescription();
 
  648            $md_desc->setDescription($form->
getInput(
'description'));
 
  652        $this->testOBJ->setTitle($form->
getInput(
'title'));
 
  653        $this->testOBJ->setDescription($form->
getInput(
'description'));
 
  654        $this->testOBJ->setOfflineStatus(!$form->
getInput(
'online'));
 
  655        $this->testOBJ->update();
 
  659            $this->testOBJ->setPoolUsage((
bool) $form->
getInput(
'use_pool'));
 
  662        if (!$this->testOBJ->participantDataExist()) {
 
  665                $this->testOBJ->setQuestionSetType($form->
getInput(
'question_set_type'));
 
  670        if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'anonymity')) {
 
  671            $this->testOBJ->setAnonymity((
int) $form->
getInput(
'anonymity'));
 
  680        include_once 
"Services/Object/classes/class.ilObjectActivation.php";
 
  681        $this->lng->loadLanguageModule(
'rep');
 
  684        $section->setTitle($this->lng->txt(
'rep_activation_availability'));
 
  688        $act_obj_info = $act_ref_info = 
"";
 
  690            $act_obj_info = 
' ' . $this->lng->txt(
'rep_activation_online_object_info');
 
  691            $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
 
  695        $online->setChecked(!$this->testOBJ->getOfflineStatus());
 
  696        $online->setInfo($this->lng->txt(
'tst_activation_online_info') . $act_obj_info);
 
  699        $act_type = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_visibility_until'), 
'activation_type');
 
  700        $act_type->setChecked($this->testOBJ->isActivationLimited());
 
  703        include_once 
"Services/Form/classes/class.ilDateDurationInputGUI.php";
 
  705        $dur->setRequired(
true);
 
  706        $dur->setShowTime(
true);
 
  707        $date = $this->testOBJ->getActivationStartingTime();
 
  709        $dur->setStartText($this->lng->txt(
'rep_activation_limited_start'));
 
  710        $date = $this->testOBJ->getActivationEndingTime();
 
  712        $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
 
  713        $act_type->addSubItem($dur);
 
  715        $visible = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'), 
'activation_visibility');
 
  716        $visible->setInfo($this->lng->txt(
'tst_activation_limited_visibility_info'));
 
  717        $visible->setChecked($this->testOBJ->getActivationVisibility());
 
  718        $act_type->addSubItem($visible);
 
  729        if ($form->
getInput(
'activation_type')) {
 
  730            $this->testOBJ->setActivationLimited(
true);
 
  731            $this->testOBJ->setActivationVisibility((
bool) $form->
getInput(
'activation_visibility'));
 
  734            $this->testOBJ->setActivationStartingTime($period->getStart()->get(
IL_CAL_UNIX));
 
  735            $this->testOBJ->setActivationEndingTime($period->getEnd()->get(
IL_CAL_UNIX));
 
  737            $this->testOBJ->setActivationLimited(
false);
 
  749        $section->setTitle($this->lng->txt(
'tst_presentation_settings_section'));
 
  752        $DIC->object()->commonSettings()->legacyForm($form, $this->testOBJ)->addTileImage();
 
  762        $DIC->object()->commonSettings()->legacyForm($form, $this->testOBJ)->saveTileImage();
 
  771        $section->setTitle($this->lng->txt(
'tst_settings_header_intro'));
 
  775        $introEnabled = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_introduction"), 
'intro_enabled');
 
  776        $introEnabled->setChecked($this->testOBJ->isIntroductionEnabled());
 
  777        $introEnabled->setInfo($this->lng->txt(
'tst_introduction_desc'));
 
  779        $intro = 
new ilTextAreaInputGUI($this->lng->txt(
"tst_introduction_text"), 
"introduction");
 
  780        $intro->setRequired(
true);
 
  781        $intro->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getIntroduction(), 
false, 
true));
 
  784        $intro->setUseRte(
true);
 
  785        $intro->addPlugin(
"latex");
 
  786        $intro->addButton(
"latex");
 
  787        $intro->setRTESupport($this->testOBJ->getId(), 
"tst", 
"assessment");
 
  788        $intro->setRteTagSet(
'full');
 
  789        $introEnabled->addSubItem($intro);
 
  793        $showinfo->setValue(1);
 
  794        $showinfo->setChecked($this->testOBJ->getShowInfo());
 
  795        $showinfo->setInfo($this->lng->txt(
"showinfo_desc"));
 
  805            $this->testOBJ->setIntroductionEnabled((
bool) $form->
getInput(
'intro_enabled'));
 
  807            if ($form->
getInput(
'intro_enabled')) {
 
  808                $this->testOBJ->setIntroduction($form->
getInput(
'introduction'));
 
  810                $this->testOBJ->setIntroduction(
'');
 
  815            $this->testOBJ->setShowInfo((
bool) $form->
getInput(
'showinfo'));
 
  825        $header->setTitle($this->lng->txt(
"tst_settings_header_execution"));
 
  829        $startingtime = 
new ilDateTimeInputGUI($this->lng->txt(
"tst_starting_time"), 
'starting_time');
 
  830        $startingtime->setInfo($this->lng->txt(
"tst_starting_time_desc"));
 
  831        $startingtime->setShowTime(
true);
 
  832        if ((
int) $this->testOBJ->getStartingTime() !== 0) {
 
  835            $startingtime->setDate(
null);
 
  839        if ($this->testOBJ->participantDataExist()) {
 
  840            $startingtime->setDisabled(
true);
 
  844        $endingtime = 
new ilDateTimeInputGUI($this->lng->txt(
"tst_ending_time"), 
'ending_time');
 
  845        $endingtime->setInfo($this->lng->txt(
"tst_ending_time_desc"));
 
  846        $endingtime->setShowTime(
true);
 
  847        if ((
int) $this->testOBJ->getEndingTime() !== 0) {
 
  850            $endingtime->setDate(
null);
 
  855        $pwEnabled = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_password'), 
'password_enabled');
 
  856        $pwEnabled->setChecked($this->testOBJ->isPasswordEnabled());
 
  857        $pwEnabled->setInfo($this->lng->txt(
"tst_password_details"));
 
  862        $password->setValue($this->testOBJ->getPassword());
 
  867        $fixedparticipants = 
new ilCheckboxInputGUI($this->lng->txt(
'participants_invitation'), 
"fixedparticipants");
 
  868        $fixedparticipants->setValue(1);
 
  869        $fixedparticipants->setChecked($this->testOBJ->getFixedParticipants());
 
  870        $fixedparticipants->setInfo($this->lng->txt(
"participants_invitation_description"));
 
  871        if ($this->testOBJ->participantDataExist()) {
 
  872            $fixedparticipants->setDisabled(
true);
 
  874        $form->
addItem($fixedparticipants);
 
  877        $simulLimited = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_allowed_users"), 
'limitUsers');
 
  878        $simulLimited->setInfo($this->lng->txt(
"tst_allowed_users_desc"));
 
  879        $simulLimited->setChecked($this->testOBJ->isLimitUsersEnabled());
 
  882        $simul = 
new ilNumberInputGUI($this->lng->txt(
"tst_allowed_users_max"), 
"allowedUsers");
 
  883        $simul->setRequired(
true);
 
  884        $simul->allowDecimals(
false);
 
  885        $simul->setMinValue(1);
 
  886        $simul->setMinvalueShouldBeGreater(
false);
 
  888        $simul->setValue(($this->testOBJ->getAllowedUsers()) ?: 
'');
 
  889        $simulLimited->addSubItem($simul);
 
  892        $idle = 
new ilNumberInputGUI($this->lng->txt(
"tst_allowed_users_time_gap"), 
"allowedUsersTimeGap");
 
  893        $idle->setInfo($this->lng->txt(
"tst_allowed_users_time_gap_desc"));
 
  895        $idle->setSuffix($this->lng->txt(
"seconds"));
 
  896        $idle->setValue(($this->testOBJ->getAllowedUsersTimeGap()) ?: 300);
 
  897        $simulLimited->addSubItem($idle);
 
  908        if (!$this->testOBJ->participantDataExist()) {
 
  909            $starting_time = $form->
getInput(
'starting_time');
 
  910            if (is_string($starting_time) && $starting_time !== 
'') {
 
  912                $this->testOBJ->setStartingTimeEnabled(
true);
 
  914                $this->testOBJ->setStartingTime(
null);
 
  915                $this->testOBJ->setStartingTimeEnabled(
false);
 
  919        $ending_time = $form->
getInput(
'ending_time');
 
  920        if (is_string($ending_time) && $ending_time !== 
'') {
 
  922            $this->testOBJ->setEndingTimeEnabled(
true);
 
  924            $this->testOBJ->setEndingTime(
null);
 
  925            $this->testOBJ->setEndingTimeEnabled(
false);
 
  929            $this->testOBJ->setPasswordEnabled((
bool) $form->
getInput(
'password_enabled'));
 
  931            if ($form->
getInput(
'password_enabled')) {
 
  932                $this->testOBJ->setPassword($form->
getInput(
'password'));
 
  934                $this->testOBJ->setPassword(
''); 
 
  938        if ($this->
formPropertyExists($form, 
'fixedparticipants') && !$this->testOBJ->participantDataExist()) {
 
  939            $this->testOBJ->setFixedParticipants((
bool) $form->
getInput(
'fixedparticipants'));
 
  943            $this->testOBJ->setLimitUsersEnabled((
bool) $form->
getInput(
'limitUsers'));
 
  945            if ($form->
getInput(
'limitUsers')) {
 
  946                $this->testOBJ->setAllowedUsers($form->
getInput(
'allowedUsers'));
 
  947                $this->testOBJ->setAllowedUsersTimeGap($form->
getInput(
'allowedUsersTimeGap'));
 
  949                $this->testOBJ->setAllowedUsers(
''); 
 
  961        $header->setTitle($this->lng->txt(
"tst_settings_header_test_run"));
 
  965        $limitPasses = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_limit_nr_of_tries"), 
'limitPasses');
 
  966        $limitPasses->setInfo($this->lng->txt(
"tst_nr_of_tries_desc"));
 
  967        $limitPasses->setChecked($this->testOBJ->getNrOfTries() > 0);
 
  968        $nr_of_tries = 
new ilNumberInputGUI($this->lng->txt(
"tst_nr_of_tries"), 
"nr_of_tries");
 
  969        $nr_of_tries->setSize(3);
 
  970        $nr_of_tries->allowDecimals(
false);
 
  971        $nr_of_tries->setMinValue(1);
 
  972        $nr_of_tries->setMinvalueShouldBeGreater(
false);
 
  973        $nr_of_tries->setValue($this->testOBJ->getNrOfTries() ? $this->testOBJ->getNrOfTries() : 1);
 
  974        $nr_of_tries->setRequired(
true);
 
  975        $limitPasses->addSubItem($nr_of_tries);
 
  977            $this->lng->txt(
'tst_block_passes_after_passed'),
 
  980        $blockAfterPassed->setInfo($this->lng->txt(
'tst_block_passes_after_passed_info'));
 
  981        $blockAfterPassed->setChecked($this->testOBJ->isBlockPassesAfterPassedEnabled());
 
  982        $limitPasses->addSubItem($blockAfterPassed);
 
  983        if ($this->testOBJ->participantDataExist()) {
 
  984            $limitPasses->setDisabled(
true);
 
  985            $blockAfterPassed->setDisabled(
true);
 
  986            $nr_of_tries->setDisabled(
true);
 
  991        $pass_waiting_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_pass_waiting_enabled'), 
'pass_waiting_enabled');
 
  992        $pass_waiting_enabled->setInfo($this->lng->txt(
'tst_pass_waiting_info'));
 
  993        $pass_waiting_enabled->setChecked($this->testOBJ->isPassWaitingEnabled());
 
  996        $duration = 
new ilDurationInputGUI($this->lng->txt(
"tst_pass_waiting_time"), 
"pass_waiting");
 
  998        $duration->setShowMonths(
true);
 
  999        $duration->setShowDays(
true);
 
 1000        $duration->setShowHours(
true);
 
 1001        $duration->setShowMinutes(
true);
 
 1003        $pw_time_array = explode(
':', $this->testOBJ->getPassWaiting());
 
 1004        $duration->setMonths($pw_time_array[0]);
 
 1005        $duration->setDays($pw_time_array[1]);
 
 1006        $duration->setHours($pw_time_array[2]);
 
 1007        $duration->setMinutes($pw_time_array[3]);
 
 1008        $duration->setRequired(
false);
 
 1009        $pass_waiting_enabled->addSubItem($duration);
 
 1011        $form->
addItem($pass_waiting_enabled);
 
 1014        $processing = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_processing_time"), 
"chb_processing_time");
 
 1015        $processing->setInfo($this->lng->txt(
"tst_processing_time_desc"));
 
 1016        $processing->setValue(1);
 
 1019            $processing->setChecked(
true);
 
 1021            $processing->setChecked($this->testOBJ->getEnableProcessingTime());
 
 1025        $processingtime = 
new ilNumberInputGUI($this->lng->txt(
"tst_processing_time_duration"), 
'processing_time');
 
 1026        $processingtime->allowDecimals(
false);
 
 1027        $processingtime->setMinValue(1);
 
 1028        $processingtime->setMinvalueShouldBeGreater(
false);
 
 1029        $processingtime->setValue($this->testOBJ->getProcessingTimeAsMinutes());
 
 1030        $processingtime->setSize(5);
 
 1031        $processingtime->setSuffix($this->lng->txt(
'minutes'));
 
 1032        $processingtime->setInfo($this->lng->txt(
"tst_processing_time_duration_desc"));
 
 1033        $processing->addSubItem($processingtime);
 
 1037        $resetprocessing->setValue(1);
 
 1038        $resetprocessing->setOptionTitle($this->lng->txt(
"tst_reset_processing_time"));
 
 1039        $resetprocessing->setChecked($this->testOBJ->getResetProcessingTime());
 
 1040        $resetprocessing->setInfo($this->lng->txt(
"tst_reset_processing_time_desc"));
 
 1041        $processing->addSubItem($resetprocessing);
 
 1044        if ($this->testOBJ->participantDataExist()) {
 
 1045            $processing->setDisabled(
true);
 
 1046            $processingtime->setDisabled(
true);
 
 1047            $resetprocessing->setDisabled(
true);
 
 1049            $duration->setDisabled(
true);
 
 1050            $pass_waiting_enabled->setDisabled(
true);
 
 1055        $kiosk->setValue(1);
 
 1056        $kiosk->setChecked($this->testOBJ->getKioskMode());
 
 1057        $kiosk->setInfo($this->lng->txt(
"kiosk_description"));
 
 1061        $kiosktitle->addOption(
new ilCheckboxOption($this->lng->txt(
"kiosk_show_title"), 
'kiosk_title', 
''));
 
 1062        $kiosktitle->addOption(
new ilCheckboxOption($this->lng->txt(
"kiosk_show_participant"), 
'kiosk_participant', 
''));
 
 1064        if ($this->testOBJ->getShowKioskModeTitle()) {
 
 1065            array_push($values, 
'kiosk_title');
 
 1067        if ($this->testOBJ->getShowKioskModeParticipant()) {
 
 1068            array_push($values, 
'kiosk_participant');
 
 1070        $kiosktitle->setValue($values);
 
 1071        $kiosktitle->setInfo($this->lng->txt(
"kiosk_options_desc"));
 
 1072        $kiosk->addSubItem($kiosktitle);
 
 1076        $examIdInPass = 
new ilCheckboxInputGUI($this->lng->txt(
'examid_in_test_pass'), 
'examid_in_test_pass');
 
 1077        $examIdInPass->setInfo($this->lng->txt(
'examid_in_test_pass_desc'));
 
 1078        $examIdInPass->setChecked($this->testOBJ->isShowExamIdInTestPassEnabled());
 
 1079        $form->
addItem($examIdInPass);
 
 1087        if (!$this->testOBJ->participantDataExist()) {
 
 1090                if ($form->
getInput(
'limitPasses')) {
 
 1091                    $this->testOBJ->setNrOfTries($form->
getInput(
'nr_of_tries'));
 
 1093                    $this->testOBJ->setBlockPassesAfterPassedEnabled(
 
 1094                        (
bool) $form->
getInput(
'block_after_passed')
 
 1097                    $this->testOBJ->setNrOfTries(0);
 
 1098                    $this->testOBJ->setBlockPassesAfterPassedEnabled(
false);
 
 1104                if ($form->
getInput(
'pass_waiting_enabled')) {
 
 1105                    $pass_waiting_values = $form->
getInput(
'pass_waiting');
 
 1106                    $pass_waiting_duration[] = sprintf(
"%'.02d", $pass_waiting_values[
'MM'] ?? 0);
 
 1107                    $pass_waiting_duration[] = sprintf(
"%'.03d", $pass_waiting_values[
'dd'] ?? 0);
 
 1108                    $pass_waiting_duration[] = sprintf(
"%'.02d", $pass_waiting_values[
'hh'] ?? 0);
 
 1109                    $pass_waiting_duration[] = sprintf(
"%'.02d", $pass_waiting_values[
'mm'] ?? 0);
 
 1110                    $pass_waiting_duration[] = sprintf(
"%'.02d", $pass_waiting_values[
'ss'] ?? 0);
 
 1112                    $pass_waiting_string = implode(
':', $pass_waiting_duration);
 
 1113                    $this->testOBJ->setPassWaiting($pass_waiting_string);
 
 1115                    $this->testOBJ->setPassWaiting(
"00:000:00:00:00");
 
 1119            $this->testOBJ->setEnableProcessingTime($form->
getInput(
'chb_processing_time'));
 
 1120            if ($this->testOBJ->getEnableProcessingTime()) {
 
 1121                $this->testOBJ->setProcessingTimeByMinutes($form->
getInput(
'processing_time'));
 
 1122                $this->testOBJ->setResetProcessingTime($form->
getInput(
'chb_reset_processing_time'));
 
 1124                $this->testOBJ->setProcessingTime(
'');
 
 1125                $this->testOBJ->setResetProcessingTime(
false);
 
 1130            $this->testOBJ->setKioskMode($form->
getInput(
'kiosk'));
 
 1131            $kioskOptions = $form->
getInput(
'kiosk_options');
 
 1132            if (is_array($kioskOptions)) {
 
 1133                $this->testOBJ->setShowKioskModeTitle(in_array(
'kiosk_title', $kioskOptions, 
true));
 
 1134                $this->testOBJ->setShowKioskModeParticipant(in_array(
'kiosk_participant', $kioskOptions, 
true));
 
 1136                $this->testOBJ->setShowKioskModeTitle(
false);
 
 1137                $this->testOBJ->setShowKioskModeParticipant(
false);
 
 1142            $this->testOBJ->setShowExamIdInTestPassEnabled((
bool) $form->
getInput(
'examid_in_test_pass'));
 
 1152            'title_output', 
'autosave', 
'chb_shuffle_questions', 
'chb_shuffle_questions',
 
 1153            'offer_hints', 
'instant_feedback_contents', 
'instant_feedback_trigger',
 
 1154            'answer_fixation_handling', 
'obligations_enabled' 
 1160            $seqheader->setTitle($this->lng->txt(
"tst_presentation_properties"));
 
 1166        $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_full"), 0, 
''));
 
 1167        $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_hide_points"), 1, 
''));
 
 1168        $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_no_title"), 2, 
''));
 
 1169        $title_output->setValue($this->testOBJ->getTitleOutput());
 
 1170        $form->
addItem($title_output);
 
 1174        $autosave_output->setValue(1);
 
 1175        $autosave_output->setChecked($this->testOBJ->getAutosave());
 
 1176        $autosave_output->setInfo($this->lng->txt(
'autosave_info'));
 
 1177        $autosave_interval = 
new ilTextInputGUI($this->lng->txt(
'autosave_ival'), 
'autosave_ival');
 
 1178        $autosave_interval->setSize(10);
 
 1179        $autosave_interval->setValue($this->testOBJ->getAutosaveIval() / 1000);
 
 1180        $autosave_interval->setSuffix($this->lng->txt(
'seconds'));
 
 1181        $autosave_output->addSubItem($autosave_interval);
 
 1182        $form->
addItem($autosave_output);
 
 1185        $shuffle = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_shuffle_questions"), 
"chb_shuffle_questions");
 
 1186        $shuffle->setValue(1);
 
 1187        $shuffle->setChecked($this->testOBJ->getShuffleQuestions());
 
 1188        $shuffle->setInfo($this->lng->txt(
"tst_shuffle_questions_description"));
 
 1192        $checkBoxOfferHints = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_setting_offer_hints_label'), 
'offer_hints');
 
 1193        $checkBoxOfferHints->setChecked($this->testOBJ->isOfferingQuestionHintsEnabled());
 
 1194        $checkBoxOfferHints->setInfo($this->lng->txt(
'tst_setting_offer_hints_info'));
 
 1195        $form->
addItem($checkBoxOfferHints);
 
 1198        $instant_feedback_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_instant_feedback'), 
'instant_feedback_enabled');
 
 1199        $instant_feedback_enabled->setInfo($this->lng->txt(
'tst_instant_feedback_desc'));
 
 1200        $instant_feedback_enabled->setChecked($this->testOBJ->isAnyInstantFeedbackOptionEnabled());
 
 1201        $form->
addItem($instant_feedback_enabled);
 
 1202        $instant_feedback_contents = 
new ilCheckboxGroupInputGUI($this->lng->txt(
'tst_instant_feedback_contents'), 
'instant_feedback_contents');
 
 1203        $instant_feedback_contents->setRequired(
true);
 
 1205            $this->lng->txt(
'tst_instant_feedback_results'),
 
 1206            'instant_feedback_points',
 
 1207            $this->lng->txt(
'tst_instant_feedback_results_desc')
 
 1210            $this->lng->txt(
'tst_instant_feedback_answer_generic'),
 
 1211            'instant_feedback_generic',
 
 1212            $this->lng->txt(
'tst_instant_feedback_answer_generic_desc')
 
 1215            $this->lng->txt(
'tst_instant_feedback_answer_specific'),
 
 1216            'instant_feedback_specific',
 
 1217            $this->lng->txt(
'tst_instant_feedback_answer_specific_desc')
 
 1220            $this->lng->txt(
'tst_instant_feedback_solution'),
 
 1221            'instant_feedback_solution',
 
 1222            $this->lng->txt(
'tst_instant_feedback_solution_desc')
 
 1224        $instant_feedback_contents->setValue($this->testOBJ->getInstantFeedbackOptionsAsArray());
 
 1225        $instant_feedback_enabled->addSubItem($instant_feedback_contents);
 
 1227            $this->lng->txt(
'tst_instant_feedback_trigger'),
 
 1228            'instant_feedback_trigger' 
 1231            $this->lng->txt(
'tst_instant_feedback_trigger_manual'),
 
 1232            self::INSTANT_FEEDBACK_TRIGGER_MANUAL
 
 1234        $ifbTriggerOpt->setInfo($this->lng->txt(
'tst_instant_feedback_trigger_manual_desc'));
 
 1235        $instant_feedback_trigger->addOption($ifbTriggerOpt);
 
 1237            $this->lng->txt(
'tst_instant_feedback_trigger_forced'),
 
 1238            self::INSTANT_FEEDBACK_TRIGGER_FORCED
 
 1240        $ifbTriggerOpt->setInfo($this->lng->txt(
'tst_instant_feedback_trigger_forced_desc'));
 
 1241        $instant_feedback_trigger->addOption($ifbTriggerOpt);
 
 1242        $instant_feedback_trigger->setValue($this->testOBJ->isForceInstantFeedbackEnabled());
 
 1243        $instant_feedback_enabled->addSubItem($instant_feedback_trigger);
 
 1246            $this->lng->txt(
'tst_answer_fixation_handling'),
 
 1247            'answer_fixation_handling' 
 1250            $this->lng->txt(
'tst_answer_fixation_none'),
 
 1251            self::ANSWER_FIXATION_NONE
 
 1253        $radioOption->setInfo($this->lng->txt(
'tst_answer_fixation_none_desc'));
 
 1254        $answerFixation->addOption($radioOption);
 
 1256            $this->lng->txt(
'tst_answer_fixation_on_instant_feedback'),
 
 1257            self::ANSWER_FIXATION_ON_INSTANT_FEEDBACK
 
 1259        $radioOption->setInfo($this->lng->txt(
'tst_answer_fixation_on_instant_feedback_desc'));
 
 1260        $answerFixation->addOption($radioOption);
 
 1262            $this->lng->txt(
'tst_answer_fixation_on_followup_question'),
 
 1263            self::ANSWER_FIXATION_ON_FOLLOWUP_QUESTION
 
 1265        $radioOption->setInfo($this->lng->txt(
'tst_answer_fixation_on_followup_question_desc'));
 
 1266        $answerFixation->addOption($radioOption);
 
 1268            $this->lng->txt(
'tst_answer_fixation_on_instantfb_or_followupqst'),
 
 1269            self::ANSWER_FIXATION_ON_IFB_OR_FUQST
 
 1271        $radioOption->setInfo($this->lng->txt(
'tst_answer_fixation_on_instantfb_or_followupqst_desc'));
 
 1272        $answerFixation->addOption($radioOption);
 
 1274        $form->
addItem($answerFixation);
 
 1277        $checkBoxEnableObligations = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_setting_enable_obligations_label'), 
'obligations_enabled');
 
 1278        $checkBoxEnableObligations->setChecked($this->testOBJ->areObligationsEnabled());
 
 1279        $checkBoxEnableObligations->setInfo($this->lng->txt(
'tst_setting_enable_obligations_info'));
 
 1280        $form->
addItem($checkBoxEnableObligations);
 
 1284            require_once 
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
 
 1286            $char_selector->getConfig()->setAvailability($this->testOBJ->getCharSelectorAvailability());
 
 1287            $char_selector->getConfig()->setDefinition($this->testOBJ->getCharSelectorDefinition());
 
 1288            $char_selector->addFormProperties($form);
 
 1289            $char_selector->setFormValues($form);
 
 1292        if ($this->testOBJ->participantDataExist()) {
 
 1293            $checkBoxOfferHints->setDisabled(
true);
 
 1294            $instant_feedback_enabled->setDisabled(
true);
 
 1295            $instant_feedback_trigger->setDisabled(
true);
 
 1296            $instant_feedback_contents->setDisabled(
true);
 
 1297            $answerFixation->setDisabled(
true);
 
 1298            $checkBoxEnableObligations->setDisabled(
true);
 
 1308            $this->testOBJ->setTitleOutput($form->
getInput(
'title_output'));
 
 1312            $this->testOBJ->setAutosave((
bool) $form->
getInput(
'autosave'));
 
 1313            $this->testOBJ->setAutosaveIval($form->
getInput(
'autosave_ival') * 1000);
 
 1317            $this->testOBJ->setShuffleQuestions((
bool) $form->
getInput(
'chb_shuffle_questions'));
 
 1320        if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'offer_hints')) {
 
 1321            $this->testOBJ->setOfferingQuestionHintsEnabled((
bool) $form->
getInput(
'offer_hints'));
 
 1324        if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'instant_feedback_enabled')) {
 
 1325            if ($form->
getInput(
'instant_feedback_enabled')) {
 
 1327                    $this->testOBJ->setInstantFeedbackOptionsByArray(
 
 1328                        $form->
getInput(
'instant_feedback_contents')
 
 1332                    $this->testOBJ->setForceInstantFeedbackEnabled(
 
 1333                        (
bool) $form->
getInput(
'instant_feedback_trigger')
 
 1337                $this->testOBJ->setInstantFeedbackOptionsByArray(array());
 
 1338                $this->testOBJ->setForceInstantFeedbackEnabled(
false);
 
 1342        if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'answer_fixation_handling')) {
 
 1346        if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'obligations_enabled')) {
 
 1347            $this->testOBJ->setObligationsEnabled($form->
getInput(
'obligations_enabled'));
 
 1351            require_once 
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
 
 1353            $char_selector->addFormProperties($form);
 
 1354            $char_selector->getFormValues($form);
 
 1355            $this->testOBJ->setCharSelectorAvailability($char_selector->getConfig()->getAvailability());
 
 1356            $this->testOBJ->setCharSelectorDefinition($char_selector->getConfig()->getDefinition());
 
 1367        $seqheader->setTitle($this->lng->txt(
"tst_sequence_properties"));
 
 1371        $prevanswers = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_use_previous_answers"), 
"chb_use_previous_answers");
 
 1372        $prevanswers->setValue(1);
 
 1373        $prevanswers->setChecked($this->testOBJ->getUsePreviousAnswers());
 
 1374        $prevanswers->setInfo($this->lng->txt(
"tst_use_previous_answers_description"));
 
 1378        $cancel = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_cancel"), 
"chb_show_cancel");
 
 1379        $cancel->setValue(1);
 
 1380        $cancel->setChecked($this->testOBJ->getShowCancel());
 
 1381        $cancel->setInfo($this->lng->txt(
"tst_show_cancel_description"));
 
 1387            $this->lng->txt(
"tst_postpone_off"),
 
 1389            $this->lng->txt(
"tst_postpone_off_desc")
 
 1392            $this->lng->txt(
"tst_postpone_on"),
 
 1394            $this->lng->txt(
"tst_postpone_on_desc")
 
 1396        $postpone->setValue((
int) $this->testOBJ->getSequenceSettings());
 
 1400        $list_of_questions = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_summary"), 
"list_of_questions");
 
 1402        $list_of_questions->setValue(1);
 
 1403        $list_of_questions->setChecked($this->testOBJ->getListOfQuestions());
 
 1404        $list_of_questions->setInfo($this->lng->txt(
"tst_show_summary_description"));
 
 1407        $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_start"), 
'chb_list_of_questions_start', 
''));
 
 1408        $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_end"), 
'chb_list_of_questions_end', 
''));
 
 1409        $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_with_description"), 
'chb_list_of_questions_with_description', 
''));
 
 1411        if ($this->testOBJ->getListOfQuestionsStart()) {
 
 1412            array_push($values, 
'chb_list_of_questions_start');
 
 1414        if ($this->testOBJ->getListOfQuestionsEnd()) {
 
 1415            array_push($values, 
'chb_list_of_questions_end');
 
 1417        if ($this->testOBJ->getListOfQuestionsDescription()) {
 
 1418            array_push($values, 
'chb_list_of_questions_with_description');
 
 1420        $list_of_questions_options->setValue($values);
 
 1422        $list_of_questions->addSubItem($list_of_questions_options);
 
 1423        $form->
addItem($list_of_questions);
 
 1426        $marking = 
new ilCheckboxInputGUI($this->lng->txt(
"question_marking"), 
"chb_show_marker");
 
 1427        $marking->setValue(1);
 
 1428        $marking->setChecked($this->testOBJ->getShowMarker());
 
 1429        $marking->setInfo($this->lng->txt(
"question_marking_description"));
 
 1439            $this->testOBJ->setUsePreviousAnswers($form->
getInput(
'chb_use_previous_answers'));
 
 1443            $this->testOBJ->setShowCancel((
bool) $form->
getInput(
'chb_show_cancel'));
 
 1447            $this->testOBJ->setPostponingEnabled((
bool) $form->
getInput(
'postpone'));
 
 1450        $this->testOBJ->setListOfQuestions((
bool) $form->
getInput(
'list_of_questions'));
 
 1451        $listOfQuestionsOptions = $form->
getInput(
'list_of_questions_options');
 
 1452        if (is_array($listOfQuestionsOptions)) {
 
 1453            $this->testOBJ->setListOfQuestionsStart(in_array(
'chb_list_of_questions_start', $listOfQuestionsOptions));
 
 1454            $this->testOBJ->setListOfQuestionsEnd(in_array(
'chb_list_of_questions_end', $listOfQuestionsOptions));
 
 1455            $this->testOBJ->setListOfQuestionsDescription(in_array(
'chb_list_of_questions_with_description', $listOfQuestionsOptions));
 
 1457            $this->testOBJ->setListOfQuestionsStart(0);
 
 1458            $this->testOBJ->setListOfQuestionsEnd(0);
 
 1459            $this->testOBJ->setListOfQuestionsDescription(0);
 
 1463            $this->testOBJ->setShowMarker((
bool) $form->
getInput(
'chb_show_marker'));
 
 1473        $testFinishHeader->setTitle($this->lng->txt(
"tst_final_information"));
 
 1474        $form->
addItem($testFinishHeader);
 
 1477        $enable_examview = 
new ilCheckboxInputGUI($this->lng->txt(
"enable_examview"), 
'enable_examview');
 
 1478        $enable_examview->setValue(1);
 
 1479        $enable_examview->setChecked($this->testOBJ->getEnableExamview());
 
 1480        $enable_examview->setInfo($this->lng->txt(
"enable_examview_desc"));
 
 1482        $show_examview_pdf->setValue(1);
 
 1483        $show_examview_pdf->setChecked($this->testOBJ->getShowExamviewPdf());
 
 1484        $show_examview_pdf->setOptionTitle($this->lng->txt(
"show_examview_pdf"));
 
 1485        $enable_examview->addSubItem($show_examview_pdf);
 
 1486        $form->
addItem($enable_examview);
 
 1489        $showfinal = 
new ilCheckboxInputGUI($this->lng->txt(
"final_statement"), 
"showfinalstatement");
 
 1490        $showfinal->setChecked($this->testOBJ->getShowFinalStatement());
 
 1491        $showfinal->setInfo($this->lng->txt(
"final_statement_show_desc"));
 
 1494        $finalstatement = 
new ilTextAreaInputGUI($this->lng->txt(
"final_statement"), 
"finalstatement");
 
 1495        $finalstatement->setRequired(
true);
 
 1496        $finalstatement->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getFinalStatement(), 
false, 
true));
 
 1497        $finalstatement->setRows(10);
 
 1498        $finalstatement->setCols(80);
 
 1499        $finalstatement->setUseRte(
true);
 
 1500        $finalstatement->addPlugin(
"latex");
 
 1501        $finalstatement->addButton(
"latex");
 
 1502        $finalstatement->setRTESupport($this->testOBJ->getId(), 
"tst", 
"assessment");
 
 1503        $finalstatement->setRteTagSet(
'full');
 
 1504        $showfinal->addSubItem($finalstatement);
 
 1506        $redirection_mode = $this->testOBJ->getRedirectionMode();
 
 1507        $rm_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'redirect_after_finishing_tst'), 
'redirection_enabled');
 
 1508        $rm_enabled->setInfo($this->lng->txt(
'redirect_after_finishing_tst_desc'));
 
 1509        $rm_enabled->setChecked($redirection_mode == 
'0' ? 
false : 
true);
 
 1510        $radio_rm = 
new ilRadioGroupInputGUI($this->lng->txt(
'redirect_after_finishing_rule'), 
'redirection_mode');
 
 1512        $radio_rm->addOption($always);
 
 1514        $radio_rm->addOption($kiosk);
 
 1516        $rm_enabled->addSubItem($radio_rm);
 
 1517        $redirection_url = 
new ilTextInputGUI($this->lng->txt(
'redirection_url'), 
'redirection_url');
 
 1518        $redirection_url->setValue((
string) $this->testOBJ->getRedirectionUrl());
 
 1519        $redirection_url->setRequired(
true);
 
 1520        $redirection_url->setMaxLength(128);
 
 1521        $rm_enabled->addSubItem($redirection_url);
 
 1526        $sign_submission = $this->testOBJ->getSignSubmission();
 
 1527        $sign_submission_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'sign_submission'), 
'sign_submission');
 
 1528        $sign_submission_enabled->setChecked($sign_submission);
 
 1529        $sign_submission_enabled->setInfo($this->lng->txt(
'sign_submission_info'));
 
 1530        $form->
addItem($sign_submission_enabled);
 
 1533        $mailnotification = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_finish_notification"), 
"mailnotification");
 
 1534        $mailnotification->setInfo($this->lng->txt(
"tst_finish_notification_desc"));
 
 1535        $mailnotification->setChecked($this->testOBJ->getMailNotification() > 0);
 
 1536        $form->
addItem($mailnotification);
 
 1538        $mailnotificationContent = 
new ilRadioGroupInputGUI($this->lng->txt(
"tst_finish_notification_content"), 
"mailnotification_content");
 
 1539        $mailnotificationContent->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_simple"), 1, 
''));
 
 1540        $mailnotificationContent->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_advanced"), 2, 
''));
 
 1541        $mailnotificationContent->setValue($this->testOBJ->getMailNotification() ? $this->testOBJ->getMailNotification() : 1);
 
 1542        $mailnotificationContent->setRequired(
true);
 
 1543        $mailnotification->addSubItem($mailnotificationContent);
 
 1546        $mailnottype->setValue(1);
 
 1547        $mailnottype->setOptionTitle($this->lng->txt(
"mailnottype"));
 
 1548        $mailnottype->setInfo($this->lng->txt(
"mailnottype_desc"));
 
 1549        $mailnottype->setChecked($this->testOBJ->getMailNotificationType());
 
 1550        $mailnotification->addSubItem($mailnottype);
 
 1559            $this->testOBJ->setEnableExamview((
bool) $form->
getInput(
'enable_examview'));
 
 1560            $this->testOBJ->setShowExamviewPdf((
bool) $form->
getInput(
'show_examview_pdf'));
 
 1563        $this->testOBJ->setShowFinalStatement((
bool) $form->
getInput(
'showfinalstatement'));
 
 1564        $this->testOBJ->setFinalStatement($form->
getInput(
'finalstatement'));
 
 1566        if ($form->
getInput(
'redirection_enabled')) {
 
 1567            $this->testOBJ->setRedirectionMode($form->
getInput(
'redirection_mode'));
 
 1571        if ((
string) $form->
getInput(
'redirection_url') !== 
'') {
 
 1572            $this->testOBJ->setRedirectionUrl($form->
getInput(
'redirection_url'));
 
 1574            $this->testOBJ->setRedirectionUrl(
null);
 
 1578            $this->testOBJ->setSignSubmission((
bool) $form->
getInput(
'sign_submission'));
 
 1582            $this->testOBJ->setMailNotification($form->
getInput(
'mailnotification_content'));
 
 1583            $this->testOBJ->setMailNotificationType((
bool) $form->
getInput(
'mailnottype'));
 
 1585            $this->testOBJ->setMailNotification(0);
 
 1586            $this->testOBJ->setMailNotificationType(
false);
 
 1592        switch ($formValue) {
 
 1594                $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(
false);
 
 1595                $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(
false);
 
 1598                $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(
true);
 
 1599                $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(
false);
 
 1602                $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(
false);
 
 1603                $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(
true);
 
 1606                $this->testOBJ->setInstantFeedbackAnswerFixationEnabled(
true);
 
 1607                $this->testOBJ->setFollowupQuestionAnswerFixationEnabled(
true);
 
 1614        if ($this->testOBJ->isInstantFeedbackAnswerFixationEnabled() && $this->testOBJ->isFollowupQuestionAnswerFixationEnabled()) {
 
 1618        if ($this->testOBJ->isFollowupQuestionAnswerFixationEnabled()) {
 
 1622        if ($this->testOBJ->isInstantFeedbackAnswerFixationEnabled()) {
 
An exception for terminatinating execution or to throw for unit testing.
This shows a character selector.
This class represents an option in a checkbox group.
Confirmation screen class.
This class provides processing control methods.
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilCtrl $ctrl, ilAccessHandler $access, ilLanguage $lng, ilTree $tree, ilDBInterface $db, ilPluginAdmin $pluginAdmin, ilObjUser $activeUser, ilObjTestGUI $testGUI)
Constructor.
performSaveForm(ilPropertyFormGUI $form)
savePresentationProperties(ilPropertyFormGUI $form)
const CMD_SHOW_RESET_TPL_CONFIRM
getSettingsTemplateMessageHTML()
const INSTANT_FEEDBACK_TRIGGER_MANUAL
setAnswerFixationSettingsByFormValue($formValue)
addPresentationProperties(ilPropertyFormGUI $form)
addTestAccessProperties(ilPropertyFormGUI $form)
addGeneralProperties(ilPropertyFormGUI $form)
saveTestRunProperties(ilPropertyFormGUI $form)
saveQuestionBehaviourProperties(ilPropertyFormGUI $form)
const ANSWER_FIXATION_ON_IFB_OR_FUQST
confirmedResetTemplateCmd()
Enable all settings - remove template.
addTestFinishProperties(ilPropertyFormGUI $form)
addTestSequenceProperties(ilPropertyFormGUI $form)
saveAvailabilityProperties(ilPropertyFormGUI $form)
const CMD_CONFIRMED_SAVE_FORM
saveFormCmd($isConfirmedSave=false)
getAnswerFixationSettingsAsFormValue()
const ANSWER_FIXATION_ON_INSTANT_FEEDBACK
const ANSWER_FIXATION_NONE
addAvailabilityProperties(ilPropertyFormGUI $form)
showFormCmd(ilPropertyFormGUI $form=null)
showResetTemplateConfirmationCmd()
Enable all settings - Confirmation.
addTestIntroProperties(ilPropertyFormGUI $form)
saveTestAccessProperties(ilPropertyFormGUI $form)
isSkillServiceSettingToBeAdjusted(ilPropertyFormGUI $form)
const CMD_SHOW_FORM
command constants
executeCommand()
Command Execution.
saveTestFinishProperties(ilPropertyFormGUI $form)
saveTestSequenceSettings(ilPropertyFormGUI $form)
showConfirmation(ilPropertyFormGUI $form, $oldQuestionSetType, $newQuestionSetType, $hasQuestionsWithoutQuestionpool)
saveGeneralProperties(ilPropertyFormGUI $form)
saveTestIntroProperties(ilPropertyFormGUI $form)
const INSTANT_FEEDBACK_TRIGGER_FORCED
const CMD_CONFIRMED_RESET_TPL
isCharSelectorPropertyRequired()
$testQuestionSetConfigFactory
addTestRunProperties(ilPropertyFormGUI $form)
const ANSWER_FIXATION_ON_FOLLOWUP_QUESTION
addQuestionBehaviourProperties(ilPropertyFormGUI $form)
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
static isSkillManagementGloballyActivated()
const ORGU_POSITION_ACCESS
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static _getAllReferences($a_id)
get all reference ids of object
static getInstance()
Get instance.
Administration class for plugins.
This class represents an option in a radio group.
formPropertyExists(ilPropertyFormGUI $form, $propertyId)
getTemplateSettingValue($settingName)
isSectionHeaderRequired($fields)
removeHiddenItems(ilPropertyFormGUI $form)
This class represents a text area property in a property form.
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getSystemMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
const REDIRECT_NONE
Redirect after finishing test constants.
Interface ilAccessHandler.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc