4require_once 
'Modules/Test/classes/class.ilTestSettingsGUI.php';
 
    5require_once 
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
 
   96                require_once 
'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
 
   99                parent::__construct(
$testGUI->object);
 
  109                if (!$this->access->checkAccess(
"write", 
"", $this->testGUI->ref_id))
 
  112                        $this->ctrl->redirect($this->testGUI, 
"infoScreen");
 
  117                $nextClass = $this->ctrl->getNextClass();
 
  122                                $cmd = $this->ctrl->getCmd(self::CMD_SHOW_FORM).
'Cmd';
 
  129                $this->tpl->addJavascript(
"./Services/JavaScript/js/Basic.js");
 
  136                $formHTML = $this->ctrl->getHTML($form);
 
  139                $this->tpl->setContent($formHTML.$msgHTML);
 
  144                require_once 
'Modules/Test/classes/confirmations/class.ilTestSettingsChangeConfirmationGUI.php';
 
  147                $confirmation->setFormAction( $this->ctrl->getFormAction($this) );
 
  148                $confirmation->setCancel($this->lng->txt(
'cancel'), self::CMD_SHOW_FORM);
 
  149                $confirmation->setConfirm($this->lng->txt(
'confirm'), self::CMD_CONFIRMED_SAVE_FORM);
 
  151                $confirmation->setOldQuestionSetType($oldQuestionSetType);
 
  152                $confirmation->setNewQuestionSetType($newQuestionSetType);
 
  153                $confirmation->setQuestionLossInfoEnabled($hasQuestionsWithoutQuestionpool);
 
  154                $confirmation->build();
 
  156                $confirmation->populateParametersFromPropertyForm($form, $this->activeUser->getTimeZone());
 
  158                $this->tpl->setContent( $this->ctrl->getHTML($confirmation) );
 
  163                if( $this->settingsTemplate )
 
  167                        $link = $this->ctrl->getLinkTarget($this, self::CMD_SHOW_RESET_TPL_CONFIRM);
 
  168                        $link = 
"<a href=\"".$link.
"\">".$this->lng->txt(
"test_using_template_link").
"</a>";
 
  170                        $msgHTML = 
$tpl->getMessageHTML(
 
  171                                sprintf($this->lng->txt(
"test_using_template"), $this->settingsTemplate->getTitle(), $link), 
"info" 
  174                        $msgHTML = 
"<div style=\"margin-top:10px\">$msgHTML</div>";
 
  195                $errors = !$form->checkInput(); 
 
  196                $form->setValuesByPost(); 
 
  210                $currentQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
 
  211                if( $form->getItemByPostVar(
'online')->getChecked() && !$this->testOBJ->isComplete($currentQuestionSetConfig) )
 
  213                        $form->getItemByPostVar(
'online')->setAlert(
 
  214                                        $this->lng->txt(
"cannot_switch_to_online_no_questions_andor_no_mark_steps")
 
  226                $questionSetTypeRelatingDataCleanupRequired = 
false;
 
  228                $oldQuestionSetType = $this->testOBJ->getQuestionSetType();
 
  231                        $newQuestionSetType = $form->getItemByPostVar(
'question_set_type')->getValue();
 
  233                        if( !$this->testOBJ->participantDataExist() && $newQuestionSetType != $oldQuestionSetType )
 
  235                                $oldQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfigByType(
 
  239                                if( $oldQuestionSetConfig->doesQuestionSetRelatedDataExist() )
 
  241                                        if( !$isConfirmedSave )
 
  246                                                                        $form, $oldQuestionSetType, $newQuestionSetType,
 
  247                                                                        $this->testOBJ->hasQuestionsWithoutQuestionpool()
 
  252                                                                $form, $oldQuestionSetType, $newQuestionSetType, 
false 
  256                                        $questionSetTypeRelatingDataCleanupRequired = 
true;
 
  259                                if( $form->getItemByPostVar(
'online')->getChecked() )
 
  261                                        $form->getItemByPostVar(
'online')->setChecked(
false);
 
  263                                        if( $this->testOBJ->isOnline() )
 
  265                                                $infoMsg[] = $this->lng->txt(
"tst_set_offline_due_to_switched_question_set_type_setting");
 
  269                                                $infoMsg[] = $this->lng->txt(
"tst_cannot_online_due_to_switched_quest_set_type_setting");
 
  276                        $newQuestionSetType = $oldQuestionSetType;
 
  283                        $form->getItemByPostVar(
'chb_use_previous_answers')->setChecked(
false);
 
  287                                $form->getItemByPostVar(
'skill_service')->setChecked(
false);
 
  289                                if( $this->testOBJ->isSkillServiceEnabled() )
 
  291                                        $infoMsg[] = $this->lng->txt(
"tst_disabled_skl_due_to_non_fixed_quest_set_type");
 
  295                                        $infoMsg[] = $this->lng->txt(
"tst_cannot_enable_skl_due_to_non_fixed_quest_set_type");
 
  302                if( $form->getItemByPostVar(
'obligations_enabled')->getChecked() )
 
  304                        $values = $form->getItemByPostVar(
'instant_feedback')->getValue();
 
  306                        if( in_array(
'instant_feedback_answer_fixation', $values) )
 
  308                                $values = array_diff($values, array(
'instant_feedback_answer_fixation'));
 
  309                                $form->getItemByPostVar(
'instant_feedback')->setValue($values);
 
  311                                $infoMsg[] = $this->lng->txt(
"tst_conflict_fbh_oblig_quest");
 
  312                                $infoMsg[] = $this->lng->txt(
"tst_conflict_reset_non_fbh");
 
  322                if( $questionSetTypeRelatingDataCleanupRequired )
 
  324                        $oldQuestionSetConfig->removeQuestionSetRelatedData();
 
  329                if( !$this->testOBJ->participantDataExist() && !$this->testOBJ->getFixedParticipants() )
 
  331                        foreach ($this->testOBJ->getInvitedUsers() as $usrId => $usrData)
 
  333                                $this->testOBJ->disinviteUser($usrId);
 
  339                if( count($infoMsg) )
 
  345                $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
 
  353                require_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  356                $confirmationGUI->setFormAction($this->ctrl->getFormAction($this));
 
  357                $confirmationGUI->setHeaderText($this->lng->txt(
"test_confirm_template_reset"));
 
  358                $confirmationGUI->setCancel($this->lng->txt(
'cancel'), self::CMD_SHOW_FORM);
 
  359                $confirmationGUI->setConfirm($this->lng->txt(
'confirm'), self::CMD_CONFIRMED_RESET_TPL);
 
  361                $this->tpl->setContent( $this->ctrl->getHTML($confirmationGUI) );
 
  369                $this->testOBJ->setTemplate(
null);
 
  370                $this->testOBJ->saveToDB();
 
  373                $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
 
  400                return $ilSetting->get(
'char_selector_availability') > 0;
 
  406                require_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  408                $form->setFormAction($this->ctrl->getFormAction($this));
 
  409                $form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt(
"save"));
 
  410                $form->setTableWidth(
"100%");
 
  411                $form->setId(
"test_properties");
 
  423                include_once 
'Modules/Test/classes/class.ilECSTestSettings.php';
 
  425                $ecs->addSettingsToForm($form, 
'tst');
 
  431                        $otherHead->setTitle($this->lng->txt(
'other'));
 
  432                        $form->addItem($otherHead);
 
  434                        $skillService = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_activate_skill_service'), 
'skill_service');
 
  435                        $skillService->setInfo($this->lng->txt(
'tst_activate_skill_service_desc'));
 
  436                        $skillService->setChecked($this->testOBJ->isSkillServiceEnabled());
 
  437                        if($this->testOBJ->participantDataExist()) $skillService->setDisabled(
true);
 
  438                        $form->addItem($skillService);
 
  458                if( !$this->testOBJ->participantDataExist() )
 
  463                                $this->testOBJ->setSkillServiceEnabled($form->
getItemByPostVar(
'skill_service')->getChecked());
 
  468                $this->testOBJ->saveToDb(
true);
 
  471                include_once 
'Modules/Test/classes/class.ilECSTestSettings.php';
 
  473                $ecs->handleSettingsUpdate();
 
  482                $header->setTitle($this->lng->txt(
"tst_general_properties"));
 
  487                include_once 
'Services/MetaData/classes/class.ilMD.php';
 
  488                $md_obj = 
new ilMD($this->testOBJ->getId(), 0, 
"tst");
 
  489                $md_section = $md_obj->getGeneral();
 
  492                $title->setRequired(
true);
 
  493                $title->setValue($md_section->getTitle());
 
  496                $ids = $md_section->getDescriptionIds();
 
  498                        $desc_obj = $md_section->getDescription(array_pop($ids));
 
  503                        $desc->setValue($desc_obj->getDescription());
 
  508                $pool_usage = 
new ilRadioGroupInputGUI($this->lng->txt(
'test_question_pool_usage'), 
'use_pool');
 
  510                $optional_qpl = 
new ilRadioOption($this->lng->txt(
'test_question_pool_usage_optional'), 1);
 
  511                $optional_qpl->setInfo($this->lng->txt(
'test_question_pool_usage_optional_info'));
 
  512                $pool_usage->addOption($optional_qpl);
 
  514                $tst_directly = 
new ilRadioOption($this->lng->txt(
'test_question_pool_usage_tst_directly'), 0);
 
  515                $tst_directly->setInfo($this->lng->txt(
'test_question_pool_usage_tst_directly_info'));
 
  516                $pool_usage->addOption($tst_directly);
 
  518                $pool_usage->setValue($this->testOBJ->getPoolUsage() ? 1 : 0);
 
  522                $questSetType = 
new ilRadioGroupInputGUI($this->lng->txt(
"tst_question_set_type"), 
'question_set_type');
 
  525                        $this->lng->txt(
"tst_question_set_type_fixed_desc")
 
  527                $questSetType->addOption($questSetTypeFixed);
 
  530                        $this->lng->txt(
"tst_question_set_type_random_desc")
 
  532                $questSetType->addOption($questSetTypeRandom);
 
  535                        $this->lng->txt(
"tst_question_set_type_dynamic_desc")
 
  537                $questSetType->addOption($questSetTypeContinues);
 
  538                $questSetType->setValue($this->testOBJ->getQuestionSetType());
 
  539                if ($this->testOBJ->participantDataExist()) {
 
  540                        $questSetType->setDisabled(
true);
 
  550                include_once 
'Services/MetaData/classes/class.ilMD.php';
 
  551                $md_obj =& 
new ilMD($this->testOBJ->getId(), 0, 
"tst");
 
  552                $md_section = $md_obj->getGeneral();
 
  556                $md_section->update();
 
  559                $md_desc_ids = $md_section->getDescriptionIds();
 
  562                        $md_desc = $md_section->getDescription(array_pop($md_desc_ids));
 
  568                        $md_desc = $md_section->addDescription();
 
  575                $this->testOBJ->update();
 
  580                        $this->testOBJ->setPoolUsage((
int)$form->
getItemByPostVar(
'use_pool')->getValue());
 
  583                if (!$this->testOBJ->participantDataExist())
 
  588                                $this->testOBJ->setQuestionSetType($form->
getItemByPostVar(
'question_set_type')->getValue());
 
  598                include_once 
"Services/Object/classes/class.ilObjectActivation.php";
 
  599                $this->lng->loadLanguageModule(
'rep');
 
  602                $section->setTitle($this->lng->txt(
'rep_activation_availability'));
 
  606                $act_obj_info = $act_ref_info = 
"";
 
  608                        $act_obj_info = 
' ' . $this->lng->txt(
'rep_activation_online_object_info');
 
  609                        $act_ref_info = $this->lng->txt(
'rep_activation_access_ref_info');
 
  613                $online->setChecked($this->testOBJ->isOnline());
 
  614                $online->setInfo($this->lng->txt(
'tst_activation_online_info') . $act_obj_info);
 
  617                $act_type = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_visibility_until'), 
'activation_type');
 
  618                $act_type->setChecked($this->testOBJ->isActivationLimited());
 
  621                $this->tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
 
  622                include_once 
"Services/Form/classes/class.ilDateDurationInputGUI.php";
 
  624                $dur->setShowTime(
true);
 
  625                $date = $this->testOBJ->getActivationStartingTime();
 
  627                $dur->setStartText($this->lng->txt(
'rep_activation_limited_start'));
 
  628                $date = $this->testOBJ->getActivationEndingTime();
 
  630                $dur->setEndText($this->lng->txt(
'rep_activation_limited_end'));
 
  631                $act_type->addSubItem($dur);
 
  633                $visible = 
new ilCheckboxInputGUI($this->lng->txt(
'rep_activation_limited_visibility'), 
'activation_visibility');
 
  634                $visible->setInfo($this->lng->txt(
'tst_activation_limited_visibility_info'));
 
  635                $visible->setChecked($this->testOBJ->getActivationVisibility());
 
  636                $act_type->addSubItem($visible);
 
  652                        $this->testOBJ->setActivationLimited(
true);
 
  653                        $this->testOBJ->setActivationVisibility($form->
getItemByPostVar(
'activation_visibility')->getChecked());
 
  656                        $this->testOBJ->setActivationStartingTime($period->getStart()->get(
IL_CAL_UNIX));
 
  657                        $this->testOBJ->setActivationEndingTime($period->getEnd()->get(
IL_CAL_UNIX));
 
  661                        $this->testOBJ->setActivationLimited(
false);
 
  671                $section->setTitle($this->lng->txt(
'tst_settings_header_intro'));
 
  675                $introEnabled = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_introduction"), 
'intro_enabled');
 
  676                $introEnabled->setChecked($this->testOBJ->isIntroductionEnabled());
 
  677                $introEnabled->setInfo($this->lng->txt(
'tst_introduction_desc'));
 
  679                $intro = 
new ilTextAreaInputGUI($this->lng->txt(
"tst_introduction_text"), 
"introduction");
 
  680                $intro->setRequired(
true);
 
  681                $intro->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getIntroduction(), 
false, 
true));
 
  684                $intro->setUseRte(TRUE);
 
  685                $intro->addPlugin(
"latex");
 
  686                $intro->addButton(
"latex");
 
  687                $intro->setRTESupport($this->testOBJ->getId(), 
"tst", 
"assessment");
 
  688                $intro->setRteTagSet(
'full');
 
  689                $introEnabled->addSubItem($intro);
 
  693                $showinfo->setValue(1);
 
  694                $showinfo->setChecked($this->testOBJ->getShowInfo());
 
  695                $showinfo->setInfo($this->lng->txt(
"showinfo_desc"));
 
  706                        $this->testOBJ->setIntroductionEnabled($form->
getItemByPostVar(
'intro_enabled')->getChecked());
 
  714                                $this->testOBJ->setIntroduction(
'');
 
  720                        $this->testOBJ->setShowInfo($form->
getItemByPostVar(
'showinfo')->getChecked());
 
  730                $header->setTitle($this->lng->txt(
"tst_settings_header_execution"));
 
  734                $enablestartingtime = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_starting_time"), 
"chb_starting_time");
 
  735                $enablestartingtime->setInfo($this->lng->txt(
"tst_starting_time_desc"));
 
  736                $enablestartingtime->setChecked($this->testOBJ->isStartingTimeEnabled());
 
  740                $startingtime->setShowTime(
true);
 
  741                if( strlen($this->testOBJ->getStartingTime()) )
 
  749                $enablestartingtime->addSubItem($startingtime);
 
  750                $form->
addItem($enablestartingtime);
 
  751                if ($this->testOBJ->participantDataExist())
 
  753                        $enablestartingtime->setDisabled(
true);
 
  754                        $startingtime->setDisabled(
true);
 
  758                $enableendingtime = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_ending_time"), 
"chb_ending_time");
 
  759                $enableendingtime->setInfo($this->lng->txt(
"tst_ending_time_desc"));
 
  760                $enableendingtime->setChecked($this->testOBJ->isEndingTimeEnabled());
 
  764                $endingtime->setShowTime(
true);
 
  765                if (strlen($this->testOBJ->getEndingTime()))
 
  773                $enableendingtime->addSubItem($endingtime);
 
  774                $form->
addItem($enableendingtime);
 
  777                $pwEnabled = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_password'), 
'password_enabled');
 
  778                $pwEnabled->setChecked($this->testOBJ->isPasswordEnabled());
 
  779                $pwEnabled->setInfo($this->lng->txt(
"tst_password_details"));
 
  780                $password = 
new ilTextInputGUI($this->lng->txt(
"tst_password_enter"), 
"password");
 
  781                $password->setRequired(
true);
 
  782                $password->setSize(20);
 
  783                $password->setValue($this->testOBJ->getPassword());
 
  784                $pwEnabled->addSubItem($password);
 
  788                $fixedparticipants = 
new ilCheckboxInputGUI($this->lng->txt(
'participants_invitation'), 
"fixedparticipants");
 
  789                $fixedparticipants->setValue(1);
 
  790                $fixedparticipants->setChecked($this->testOBJ->getFixedParticipants());
 
  791                $fixedparticipants->setInfo($this->lng->txt(
"participants_invitation_description"));
 
  792                $invited_users = $this->testOBJ->getInvitedUsers();
 
  793                if ($this->testOBJ->participantDataExist() && (count($invited_users) == 0))
 
  795                        $fixedparticipants->setDisabled(
true);
 
  797                $form->
addItem($fixedparticipants);
 
  800                $simulLimited = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_allowed_users"), 
'limitUsers');
 
  801                $simulLimited->setInfo($this->lng->txt(
"tst_allowed_users_desc"));
 
  802                $simulLimited->setChecked($this->testOBJ->isLimitUsersEnabled());
 
  805                $simul = 
new ilNumberInputGUI($this->lng->txt(
"tst_allowed_users_max"), 
"allowedUsers");
 
  806                $simul->setRequired(
true);
 
  807                $simul->allowDecimals(
false);
 
  808                $simul->setMinValue(1);
 
  809                $simul->setMinvalueShouldBeGreater(
false);
 
  811                $simul->setValue(($this->testOBJ->getAllowedUsers()) ? $this->testOBJ->getAllowedUsers() : 
'');
 
  812                $simulLimited->addSubItem($simul);
 
  815                $idle = 
new ilNumberInputGUI($this->lng->txt(
"tst_allowed_users_time_gap"), 
"allowedUsersTimeGap");
 
  816                $idle->setInfo($this->lng->txt(
"tst_allowed_users_time_gap_desc"));
 
  818                $idle->setSuffix($this->lng->txt(
"seconds"));
 
  819                $idle->setValue(($this->testOBJ->getAllowedUsersTimeGap()) ? $this->testOBJ->getAllowedUsersTimeGap() : 300);
 
  820                $simulLimited->addSubItem($idle);
 
  832                if( $this->
formPropertyExists($form, 
'chb_starting_time') && !$this->testOBJ->participantDataExist() )
 
  840                                $this->testOBJ->setStartingTimeEnabled(
true);
 
  844                                $this->testOBJ->setStartingTimeEnabled(
false);
 
  857                                $this->testOBJ->setEndingTimeEnabled(
true);
 
  861                                $this->testOBJ->setEndingTimeEnabled(
false);
 
  867                        $this->testOBJ->setPasswordEnabled($form->
getItemByPostVar(
'password_enabled')->getChecked());
 
  871                                $this->testOBJ->setPassword($form->
getItemByPostVar(
'password')->getValue());
 
  875                                $this->testOBJ->setPassword(
''); 
 
  879                if( $this->
formPropertyExists($form, 
'fixedparticipants') && !$this->testOBJ->participantDataExist() )
 
  881                        $this->testOBJ->setFixedParticipants($form->
getItemByPostVar(
'fixedparticipants')->getChecked());
 
  886                        $this->testOBJ->setLimitUsersEnabled($form->
getItemByPostVar(
'limitUsers')->getChecked());
 
  890                                $this->testOBJ->setAllowedUsers($form->
getItemByPostVar(
'allowedUsers')->getValue());
 
  891                                $this->testOBJ->setAllowedUsersTimeGap($form->
getItemByPostVar(
'allowedUsersTimeGap')->getValue());
 
  895                                $this->testOBJ->setAllowedUsers(
''); 
 
  907                $header->setTitle($this->lng->txt(
"tst_settings_header_test_run"));
 
  911                $limitPasses = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_limit_nr_of_tries"), 
'limitPasses');
 
  912                $limitPasses->setInfo($this->lng->txt(
"tst_nr_of_tries_desc"));
 
  913                $limitPasses->setChecked($this->testOBJ->getNrOfTries() > 0);
 
  914                $nr_of_tries = 
new ilNumberInputGUI($this->lng->txt(
"tst_nr_of_tries"), 
"nr_of_tries");
 
  915                $nr_of_tries->setSize(3);
 
  916                $nr_of_tries->allowDecimals(
false);
 
  917                $nr_of_tries->setMinValue(1);
 
  918                $nr_of_tries->setMinvalueShouldBeGreater(
false);
 
  919                $nr_of_tries->setValue($this->testOBJ->getNrOfTries() ? $this->testOBJ->getNrOfTries() : 1);
 
  920                $nr_of_tries->setRequired(
true);
 
  921                if( $this->testOBJ->participantDataExist() )
 
  923                        $limitPasses->setDisabled(
true);
 
  924                        $nr_of_tries->setDisabled(
true);
 
  926                $limitPasses->addSubItem($nr_of_tries);
 
  930                $processing = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_processing_time"), 
"chb_processing_time");
 
  931                $processing->setInfo($this->lng->txt(
"tst_processing_time_desc"));
 
  932                $processing->setValue(1);
 
  935                        $processing->setChecked(
true);
 
  937                        $processing->setChecked($this->testOBJ->getEnableProcessingTime());
 
  941                $processingtime = 
new ilNumberInputGUI($this->lng->txt(
"tst_processing_time_duration"), 
'processing_time');
 
  942                $processingtime->allowDecimals(
false);
 
  943                $processingtime->setMinValue(1);
 
  944                $processingtime->setMinvalueShouldBeGreater(
false);
 
  945                $processingtime->setValue($this->testOBJ->getProcessingTimeAsMinutes());
 
  946                $processingtime->setSize(5);
 
  947                $processingtime->setSuffix($this->lng->txt(
'minutes'));
 
  948                $processingtime->setInfo($this->lng->txt(
"tst_processing_time_duration_desc"));
 
  949                $processing->addSubItem($processingtime);
 
  953                $resetprocessing->setValue(1);
 
  954                $resetprocessing->setOptionTitle($this->lng->txt(
"tst_reset_processing_time"));
 
  955                $resetprocessing->setChecked($this->testOBJ->getResetProcessingTime());
 
  956                $resetprocessing->setInfo($this->lng->txt(
"tst_reset_processing_time_desc"));
 
  957                $processing->addSubItem($resetprocessing);
 
  960                if( $this->testOBJ->participantDataExist() )
 
  962                        $processing->setDisabled(
true);
 
  963                        $processingtime->setDisabled(
true);
 
  964                        $resetprocessing->setDisabled(
true);
 
  970                $kiosk->setChecked($this->testOBJ->getKioskMode());
 
  971                $kiosk->setInfo($this->lng->txt(
"kiosk_description"));
 
  975                $kiosktitle->addOption(
new ilCheckboxOption($this->lng->txt(
"kiosk_show_title"), 
'kiosk_title', 
''));
 
  976                $kiosktitle->addOption(
new ilCheckboxOption($this->lng->txt(
"kiosk_show_participant"), 
'kiosk_participant', 
''));
 
  978                if ($this->testOBJ->getShowKioskModeTitle()) array_push($values, 
'kiosk_title');
 
  979                if ($this->testOBJ->getShowKioskModeParticipant()) array_push($values, 
'kiosk_participant');
 
  980                $kiosktitle->setValue($values);
 
  981                $kiosktitle->setInfo($this->lng->txt(
"kiosk_options_desc"));
 
  982                $kiosk->addSubItem($kiosktitle);
 
  986                $examIdInPass = 
new ilCheckboxInputGUI($this->lng->txt(
'examid_in_test_pass'), 
'examid_in_test_pass');
 
  987                $examIdInPass->setInfo($this->lng->txt(
'examid_in_test_pass_desc'));
 
  988                $examIdInPass->setChecked($this->testOBJ->isShowExamIdInTestPassEnabled());
 
  997                if (!$this->testOBJ->participantDataExist())
 
 1004                                        $this->testOBJ->setNrOfTries($form->
getItemByPostVar(
'nr_of_tries')->getValue());
 
 1008                                        $this->testOBJ->setNrOfTries(0);
 
 1012                        $this->testOBJ->setEnableProcessingTime($form->
getItemByPostVar(
'chb_processing_time')->getChecked());
 
 1013                        if ($this->testOBJ->getEnableProcessingTime())
 
 1015                                $this->testOBJ->setProcessingTimeByMinutes($form->
getItemByPostVar(
'processing_time')->getValue());
 
 1016                                $this->testOBJ->setResetProcessingTime($form->
getItemByPostVar(
'chb_reset_processing_time')->getChecked());
 
 1020                                $this->testOBJ->setProcessingTime(
'');
 
 1021                                $this->testOBJ->setResetProcessingTime(
false);
 
 1027                        $this->testOBJ->setKioskMode($form->
getInput(
'kiosk'));
 
 1029                        if (is_array($kioskOptions))
 
 1031                                $this->testOBJ->setShowKioskModeTitle(in_array(
'kiosk_title', $kioskOptions));
 
 1032                                $this->testOBJ->setShowKioskModeParticipant(in_array(
'kiosk_participant', $kioskOptions));
 
 1036                                $this->testOBJ->setShowKioskModeTitle(
false);
 
 1037                                $this->testOBJ->setShowKioskModeParticipant(
false);
 
 1044                        $this->testOBJ->setShowExamIdInTestPassEnabled($value);
 
 1054                        'title_output', 
'autosave', 
'chb_shuffle_questions', 
'chb_shuffle_questions',
 
 1055                        'offer_hints', 
'instant_feedback', 
'obligations_enabled',
 
 1062                        $seqheader->setTitle($this->lng->txt(
"tst_presentation_properties"));
 
 1068                $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_full"), 0, 
''));
 
 1069                $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_hide_points"), 1, 
''));
 
 1070                $title_output->addOption(
new ilRadioOption($this->lng->txt(
"tst_title_output_no_title"), 2, 
''));
 
 1071                $title_output->setValue($this->testOBJ->getTitleOutput());
 
 1072                $form->
addItem($title_output);
 
 1076                $autosave_output->setValue(1);
 
 1077                $autosave_output->setChecked($this->testOBJ->getAutosave());
 
 1078                $autosave_output->setInfo($this->lng->txt(
'autosave_info'));
 
 1079                $autosave_interval = 
new ilTextInputGUI($this->lng->txt(
'autosave_ival'), 
'autosave_ival');
 
 1080                $autosave_interval->setSize(10);
 
 1081                $autosave_interval->setValue($this->testOBJ->getAutosaveIval()/1000);
 
 1082                $autosave_interval->setSuffix($this->lng->txt(
'seconds'));
 
 1083                $autosave_output->addSubItem($autosave_interval);
 
 1084                $form->
addItem($autosave_output);
 
 1087                $shuffle = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_shuffle_questions"), 
"chb_shuffle_questions");
 
 1088                $shuffle->setValue(1);
 
 1089                $shuffle->setChecked($this->testOBJ->getShuffleQuestions());
 
 1090                $shuffle->setInfo($this->lng->txt(
"tst_shuffle_questions_description"));
 
 1094                $checkBoxOfferHints = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_setting_offer_hints_label'), 
'offer_hints');
 
 1095                $checkBoxOfferHints->setChecked($this->testOBJ->isOfferingQuestionHintsEnabled());
 
 1096                $checkBoxOfferHints->setInfo($this->lng->txt(
'tst_setting_offer_hints_info'));
 
 1097                if( $this->testOBJ->participantDataExist() )
 
 1099                        $checkBoxOfferHints->setDisabled(
true);
 
 1101                $form->
addItem($checkBoxOfferHints);
 
 1106                        $this->lng->txt(
'tst_instant_feedback_results'), 
'instant_feedback_points',
 
 1107                        $this->lng->txt(
'tst_instant_feedback_results_desc')
 
 1110                        $this->lng->txt(
'tst_instant_feedback_answer_generic'), 
'instant_feedback_generic',
 
 1111                        $this->lng->txt(
'tst_instant_feedback_answer_generic_desc')
 
 1114                        $this->lng->txt(
'tst_instant_feedback_answer_specific'), 
'instant_feedback_specific',
 
 1115                        $this->lng->txt(
'tst_instant_feedback_answer_specific_desc')
 
 1118                        $this->lng->txt(
'tst_instant_feedback_solution'), 
'instant_feedback_solution',
 
 1119                        $this->lng->txt(
'tst_instant_feedback_solution_desc')
 
 1122                        $this->lng->txt(
'tst_instant_feedback_fix_usr_answer'), 
'instant_feedback_answer_fixation',
 
 1123                        $this->lng->txt(
'tst_instant_feedback_fix_usr_answer_desc')
 
 1126                if ($this->testOBJ->getSpecificAnswerFeedback()) array_push($values, 
'instant_feedback_specific');
 
 1127                if ($this->testOBJ->getGenericAnswerFeedback()) array_push($values, 
'instant_feedback_generic');
 
 1128                if ($this->testOBJ->getAnswerFeedbackPoints()) array_push($values, 
'instant_feedback_points');
 
 1129                if ($this->testOBJ->getInstantFeedbackSolution()) array_push($values, 
'instant_feedback_solution');
 
 1130                if( $this->testOBJ->isInstantFeedbackAnswerFixationEnabled() ) array_push($values, 
'instant_feedback_answer_fixation');
 
 1131                $instant_feedback->setValue($values);
 
 1132                $form->
addItem($instant_feedback);
 
 1135                $checkBoxEnableObligations = 
new ilCheckboxInputGUI($this->lng->txt(
'tst_setting_enable_obligations_label'), 
'obligations_enabled');
 
 1136                $checkBoxEnableObligations->setChecked($this->testOBJ->areObligationsEnabled());
 
 1137                $checkBoxEnableObligations->setInfo($this->lng->txt(
'tst_setting_enable_obligations_info'));
 
 1138                if( $this->testOBJ->participantDataExist() )
 
 1140                        $checkBoxEnableObligations->setDisabled(
true);
 
 1142                $form->
addItem($checkBoxEnableObligations);
 
 1147                        require_once 
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
 
 1149                        $char_selector->getConfig()->setAvailability($this->testOBJ->getCharSelectorAvailability());
 
 1150                        $char_selector->getConfig()->setDefinition($this->testOBJ->getCharSelectorDefinition());
 
 1151                        $char_selector->addFormProperties($form);
 
 1152                        $char_selector->setFormValues($form);
 
 1163                        $this->testOBJ->setTitleOutput($form->
getItemByPostVar(
'title_output')->getValue());
 
 1168                        $this->testOBJ->setAutosave($form->
getItemByPostVar(
'autosave')->getChecked());
 
 1169                        $this->testOBJ->setAutosaveIval($form->
getItemByPostVar(
'autosave_ival')->getValue() * 1000);
 
 1174                        $this->testOBJ->setShuffleQuestions($form->
getItemByPostVar(
'chb_shuffle_questions')->getChecked());
 
 1177                if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'offer_hints'))
 
 1179                        $this->testOBJ->setOfferingQuestionHintsEnabled($form->
getItemByPostVar(
'offer_hints')->getChecked());
 
 1184                        $this->testOBJ->setScoringFeedbackOptionsByArray($form->
getItemByPostVar(
'instant_feedback')->getValue());
 
 1187                if (!$this->testOBJ->participantDataExist() && $this->formPropertyExists($form, 
'obligations_enabled'))
 
 1189                        $this->testOBJ->setObligationsEnabled($form->
getItemByPostVar(
'obligations_enabled')->getChecked());
 
 1194                        require_once 
'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
 
 1196                        $char_selector->addFormProperties($form);
 
 1197                        $char_selector->getFormValues($form);
 
 1198                        $this->testOBJ->setCharSelectorAvailability($char_selector->getConfig()->getAvailability());
 
 1199                        $this->testOBJ->setCharSelectorDefinition($char_selector->getConfig()->getDefinition());
 
 1210                $seqheader->setTitle($this->lng->txt(
"tst_sequence_properties"));
 
 1214                $prevanswers = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_use_previous_answers"), 
"chb_use_previous_answers");
 
 1215                $prevanswers->setValue(1);
 
 1216                $prevanswers->setChecked($this->testOBJ->getUsePreviousAnswers());
 
 1217                $prevanswers->setInfo($this->lng->txt(
"tst_use_previous_answers_description"));
 
 1221                $cancel = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_cancel"), 
"chb_show_cancel");
 
 1222                $cancel->setValue(1);
 
 1223                $cancel->setChecked($this->testOBJ->getShowCancel());
 
 1224                $cancel->setInfo($this->lng->txt(
"tst_show_cancel_description"));
 
 1229                $postpone->setValue(1);
 
 1230                $postpone->setChecked($this->testOBJ->getSequenceSettings());
 
 1231                $postpone->setInfo($this->lng->txt(
"tst_postpone_description"));
 
 1235                $list_of_questions = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_show_summary"), 
"list_of_questions");
 
 1237                $list_of_questions->setValue(1);
 
 1238                $list_of_questions->setChecked($this->testOBJ->getListOfQuestions());
 
 1239                $list_of_questions->setInfo($this->lng->txt(
"tst_show_summary_description"));
 
 1242                $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_start"), 
'chb_list_of_questions_start', 
''));
 
 1243                $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_end"), 
'chb_list_of_questions_end', 
''));
 
 1244                $list_of_questions_options->addOption(
new ilCheckboxOption($this->lng->txt(
"tst_list_of_questions_with_description"), 
'chb_list_of_questions_with_description', 
''));
 
 1246                if ($this->testOBJ->getListOfQuestionsStart()) array_push($values, 
'chb_list_of_questions_start');
 
 1247                if ($this->testOBJ->getListOfQuestionsEnd()) array_push($values, 
'chb_list_of_questions_end');
 
 1248                if ($this->testOBJ->getListOfQuestionsDescription()) array_push($values, 
'chb_list_of_questions_with_description');
 
 1249                $list_of_questions_options->setValue($values);
 
 1251                $list_of_questions->addSubItem($list_of_questions_options);
 
 1252                $form->
addItem($list_of_questions);
 
 1255                $marking = 
new ilCheckboxInputGUI($this->lng->txt(
"question_marking"), 
"chb_show_marker");
 
 1256                $marking->setValue(1);
 
 1257                $marking->setChecked($this->testOBJ->getShowMarker());
 
 1258                $marking->setInfo($this->lng->txt(
"question_marking_description"));
 
 1269                        $this->testOBJ->setUsePreviousAnswers($form->
getInput(
'chb_use_previous_answers'));
 
 1274                        $this->testOBJ->setShowCancel($form->
getItemByPostVar(
'chb_show_cancel')->getChecked());
 
 1279                        $this->testOBJ->setPostponingEnabled($form->
getItemByPostVar(
'chb_postpone')->getChecked());
 
 1282                $this->testOBJ->setListOfQuestions($form->
getItemByPostVar(
'list_of_questions')->getChecked());
 
 1283                $listOfQuestionsOptions = $form->
getItemByPostVar(
'list_of_questions_options')->getValue();
 
 1284                if(is_array($listOfQuestionsOptions))
 
 1286                        $this->testOBJ->setListOfQuestionsStart(in_array(
'chb_list_of_questions_start', $listOfQuestionsOptions));
 
 1287                        $this->testOBJ->setListOfQuestionsEnd(in_array(
'chb_list_of_questions_end', $listOfQuestionsOptions));
 
 1288                        $this->testOBJ->setListOfQuestionsDescription(in_array(
'chb_list_of_questions_with_description', $listOfQuestionsOptions));
 
 1292                        $this->testOBJ->setListOfQuestionsStart(0);
 
 1293                        $this->testOBJ->setListOfQuestionsEnd(0);
 
 1294                        $this->testOBJ->setListOfQuestionsDescription(0);
 
 1299                        $this->testOBJ->setShowMarker($form->
getItemByPostVar(
'chb_show_marker')->getChecked());
 
 1309                $testFinishHeader->setTitle($this->lng->txt(
"tst_final_information"));
 
 1310                $form->
addItem($testFinishHeader);
 
 1313                $enable_examview = 
new ilCheckboxInputGUI($this->lng->txt(
"enable_examview"), 
'enable_examview');
 
 1314                $enable_examview->setValue(1);
 
 1315                $enable_examview->setChecked($this->testOBJ->getEnableExamview());
 
 1316                $enable_examview->setInfo($this->lng->txt(
"enable_examview_desc"));
 
 1318                $show_examview_pdf->setValue(1);
 
 1319                $show_examview_pdf->setChecked($this->testOBJ->getShowExamviewPdf());
 
 1320                $show_examview_pdf->setOptionTitle($this->lng->txt(
"show_examview_pdf"));
 
 1321                $enable_examview->addSubItem($show_examview_pdf);
 
 1322                $form->
addItem($enable_examview);
 
 1325                $showfinal = 
new ilCheckboxInputGUI($this->lng->txt(
"final_statement"), 
"showfinalstatement");
 
 1326                $showfinal->setChecked($this->testOBJ->getShowFinalStatement());
 
 1327                $showfinal->setInfo($this->lng->txt(
"final_statement_show_desc"));
 
 1330                $finalstatement = 
new ilTextAreaInputGUI($this->lng->txt(
"final_statement"), 
"finalstatement");
 
 1331                $finalstatement->setRequired(
true);
 
 1332                $finalstatement->setValue($this->testOBJ->prepareTextareaOutput($this->testOBJ->getFinalStatement(), 
false, 
true));
 
 1333                $finalstatement->setRows(10);
 
 1334                $finalstatement->setCols(80);
 
 1335                $finalstatement->setUseRte(TRUE);
 
 1336                $finalstatement->addPlugin(
"latex");
 
 1337                $finalstatement->addButton(
"latex");
 
 1338                $finalstatement->setRTESupport($this->testOBJ->getId(), 
"tst", 
"assessment");
 
 1339                $finalstatement->setRteTagSet(
'full');
 
 1340                $showfinal->addSubItem($finalstatement);
 
 1342                $redirection_mode = $this->testOBJ->getRedirectionMode();
 
 1343                $rm_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'redirect_after_finishing_tst'), 
'redirection_enabled');
 
 1344                $rm_enabled->setInfo($this->lng->txt(
'redirect_after_finishing_tst_desc'));
 
 1345                $rm_enabled->setChecked($redirection_mode == 
'0' ? 
false : 
true);
 
 1346                $radio_rm = 
new ilRadioGroupInputGUI($this->lng->txt(
'redirect_after_finishing_rule'), 
'redirection_mode');
 
 1348                $radio_rm->addOption($always);
 
 1350                $radio_rm->addOption($kiosk);
 
 1352                $rm_enabled->addSubItem($radio_rm);
 
 1353                $redirection_url = 
new ilTextInputGUI($this->lng->txt(
'redirection_url'), 
'redirection_url');
 
 1354                $redirection_url->setValue((
string)$this->testOBJ->getRedirectionUrl());
 
 1355                $redirection_url->setRequired(
true);
 
 1356                $rm_enabled->addSubItem($redirection_url);
 
 1361                $sign_submission = $this->testOBJ->getSignSubmission();
 
 1362                $sign_submission_enabled = 
new ilCheckboxInputGUI($this->lng->txt(
'sign_submission'), 
'sign_submission');
 
 1363                $sign_submission_enabled->setChecked($sign_submission);
 
 1364                $sign_submission_enabled->setInfo($this->lng->txt(
'sign_submission_info'));
 
 1365                $form->
addItem($sign_submission_enabled);
 
 1368                $mailnotification = 
new ilCheckboxInputGUI($this->lng->txt(
"tst_finish_notification"), 
"mailnotification");
 
 1369                $mailnotification->setInfo($this->lng->txt(
"tst_finish_notification_desc"));
 
 1370                $mailnotification->setChecked($this->testOBJ->getMailNotification() > 0);
 
 1371                $form->
addItem($mailnotification);
 
 1373                $mailnotificationContent = 
new ilRadioGroupInputGUI($this->lng->txt(
"tst_finish_notification_content"), 
"mailnotification_content");
 
 1374                $mailnotificationContent->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_simple"), 1, 
''));
 
 1375                $mailnotificationContent->addOption(
new ilRadioOption($this->lng->txt(
"tst_finish_notification_advanced"), 2, 
''));
 
 1376                $mailnotificationContent->setValue($this->testOBJ->getMailNotification() ? $this->testOBJ->getMailNotification() : 1);
 
 1377                $mailnotificationContent->setRequired(
true);
 
 1378                $mailnotification->addSubItem($mailnotificationContent);
 
 1381                $mailnottype->setValue(1);
 
 1382                $mailnottype->setOptionTitle($this->lng->txt(
"mailnottype"));
 
 1383                $mailnottype->setChecked($this->testOBJ->getMailNotificationType());
 
 1384                $mailnotification->addSubItem($mailnottype);
 
 1394                        $this->testOBJ->setEnableExamview($form->
getItemByPostVar(
'enable_examview')->getChecked());
 
 1395                        $this->testOBJ->setShowExamviewPdf($form->
getItemByPostVar(
'show_examview_pdf')->getChecked());
 
 1398                $this->testOBJ->setShowFinalStatement($form->
getItemByPostVar(
'showfinalstatement')->getChecked());
 
 1403                        $this->testOBJ->setRedirectionMode($form->
getItemByPostVar(
'redirection_mode')->getValue());
 
 1411                        $this->testOBJ->setRedirectionUrl($form->
getItemByPostVar(
'redirection_url')->getValue());
 
 1415                        $this->testOBJ->setRedirectionUrl(
null);
 
 1420                        $this->testOBJ->setSignSubmission($form->
getItemByPostVar(
'sign_submission')->getChecked());
 
 1425                        $this->testOBJ->setMailNotification($form->
getItemByPostVar(
'mailnotification_content')->getValue());
 
 1426                        $this->testOBJ->setMailNotificationType($form->
getItemByPostVar(
'mailnottype')->getChecked());
 
 1430                        $this->testOBJ->setMailNotification(0);
 
 1431                        $this->testOBJ->setMailNotificationType(
false);
 
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
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
performSaveForm(ilPropertyFormGUI $form)
const CMD_SHOW_RESET_TPL_CONFIRM
getSettingsTemplateMessageHTML()
addTestAccessProperties(ilPropertyFormGUI $form)
addGeneralProperties(ilPropertyFormGUI $form)
saveTestRunProperties(ilPropertyFormGUI $form)
saveQuestionBehaviourProperties(ilPropertyFormGUI $form)
confirmedResetTemplateCmd()
Enable all settings - remove template.
addTestFinishProperties(ilPropertyFormGUI $form)
addTestSequenceProperties(ilPropertyFormGUI $form)
saveAvailabilityProperties(ilPropertyFormGUI $form)
const CMD_CONFIRMED_SAVE_FORM
saveFormCmd($isConfirmedSave=false)
addAvailabilityProperties(ilPropertyFormGUI $form)
showFormCmd(ilPropertyFormGUI $form=null)
showResetTemplateConfirmationCmd()
Enable all settings - Confirmation.
addTestIntroProperties(ilPropertyFormGUI $form)
__construct(ilCtrl $ctrl, ilAccessHandler $access, ilLanguage $lng, ilTemplate $tpl, ilTree $tree, ilDB $db, ilPluginAdmin $pluginAdmin, ilObjUser $activeUser, ilObjTestGUI $testGUI)
Constructor.
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 CMD_CONFIRMED_RESET_TPL
isCharSelectorPropertyRequired()
$testQuestionSetConfigFactory
addTestRunProperties(ilPropertyFormGUI $form)
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()
static _getAllReferences($a_id)
get all reference ids of object
Administration class for plugins.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const REDIRECT_NONE
Redirect after finishing test constants.