当前位置: 首页>>代码示例>>PHP>>正文


PHP ilObjTest::setExportSettingsSingleChoiceShort方法代码示例

本文整理汇总了PHP中ilObjTest::setExportSettingsSingleChoiceShort方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::setExportSettingsSingleChoiceShort方法的具体用法?PHP ilObjTest::setExportSettingsSingleChoiceShort怎么用?PHP ilObjTest::setExportSettingsSingleChoiceShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilObjTest的用法示例。


在下文中一共展示了ilObjTest::setExportSettingsSingleChoiceShort方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveScoringObject

 /**
  * Save the form input of the scoring form
  *
  * @access	public
  */
 function saveScoringObject()
 {
     $hasErrors = $this->scoringObject(true);
     if (!$hasErrors) {
         $total = $this->object->evalTotalPersons();
         $this->object->setCountSystem($_POST["count_system"]);
         $this->object->setMCScoring($_POST["mc_scoring"]);
         $this->object->setScoreCutting($_POST["score_cutting"]);
         $this->object->setPassScoring($_POST["pass_scoring"]);
         if (isset($_POST['obligations_enabled']) && $_POST['obligations_enabled']) {
             $this->object->setObligationsEnabled(true);
         } else {
             $this->object->setObligationsEnabled(false);
         }
         if (isset($_POST['offer_hints']) && $_POST['offer_hints']) {
             $this->object->setOfferingQuestionHintsEnabled(true);
         } else {
             $this->object->setOfferingQuestionHintsEnabled(false);
         }
         /*
         			$this->object->setAnswerFeedback((is_array($_POST['instant_feedback']) && in_array('instant_feedback_answer', $_POST['instant_feedback'])) ? 1 : 0);
         			$this->object->setAnswerFeedbackPoints((is_array($_POST['instant_feedback']) && in_array('instant_feedback_points', $_POST['instant_feedback'])) ? 1 : 0);
         			$this->object->setInstantFeedbackSolution((is_array($_POST['instant_feedback']) && in_array('instant_feedback_solution', $_POST['instant_feedback'])) ? 1 : 0);
         */
         /**
          * I introduced a single setter for instant_feedback options
          * @author jposselt at databay . de
          */
         $this->object->setScoringFeedbackOptionsByArray($_POST['instant_feedback']);
         $this->object->setScoreReporting($_POST["results_access"]);
         if ($this->object->getScoreReporting() == REPORT_AFTER_DATE) {
             $this->object->setReportingDate(str_replace(array(':', '-'), '', $_POST["reporting_date"]['date'] . $_POST["reporting_date"]['time']));
         } else {
             $this->object->setReportingDate('');
         }
         $this->object->setShowPassDetails(is_array($_POST['results_presentation']) && in_array('pass_details', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionDetails(is_array($_POST['results_presentation']) && in_array('solution_details', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionPrintview(is_array($_POST['results_presentation']) && in_array('solution_printview', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionFeedback(is_array($_POST['results_presentation']) && in_array('solution_feedback', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionAnswersOnly(is_array($_POST['results_presentation']) && in_array('solution_answers_only', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionSignature(is_array($_POST['results_presentation']) && in_array('solution_signature', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionSuggested(is_array($_POST['results_presentation']) && in_array('solution_suggested', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setShowSolutionListComparison(is_array($_POST['results_presentation']) && in_array('solution_compare', $_POST['results_presentation']) ? 1 : 0);
         $this->object->setExportSettingsSingleChoiceShort(is_array($_POST['export_settings']) && in_array('exp_sc_short', $_POST['export_settings']) ? 1 : 0);
         $this->object->setPrintBestSolutionWithResult((int) $_POST['print_bs_with_res'] ? true : false);
         $this->object->setPassDeletionAllowed((bool) $_POST['pass_deletion_allowed']);
         $this->object->saveToDb(true);
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), TRUE);
         if ($total != 0) {
             $this->object->recalculateScores();
         }
         $this->ctrl->redirect($this, "scoring");
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:59,代码来源:class.ilObjTestGUI.php

示例2: saveResultDetailsSettings

 /**
  * @param ilPropertyFormGUI $form
  */
 private function saveResultDetailsSettings(ilPropertyFormGUI $form)
 {
     if ($this->formPropertyExists($form, 'solution_details')) {
         if ($form->getItemByPostVar('solution_details')->getChecked()) {
             $this->testOBJ->setShowSolutionDetails(1);
             $this->testOBJ->setPrintBestSolutionWithResult((int) $form->getItemByPostVar('print_bs_with_res')->getChecked());
         } else {
             $this->testOBJ->setShowSolutionDetails(0);
             $this->testOBJ->setPrintBestSolutionWithResult(0);
         }
     }
     if ($this->formPropertyExists($form, 'solution_feedback')) {
         $this->testOBJ->setShowSolutionFeedback($form->getItemByPostVar('solution_feedback')->getChecked());
     }
     if ($this->formPropertyExists($form, 'solution_suggested')) {
         $this->testOBJ->setShowSolutionSuggested($form->getItemByPostVar('solution_suggested')->getChecked());
     }
     if ($this->formPropertyExists($form, 'solution_printview')) {
         if ($form->getItemByPostVar('solution_printview')->getChecked()) {
             $this->testOBJ->setShowSolutionPrintview(1);
             $this->testOBJ->setShowSolutionListComparison((bool) $form->getItemByPostVar('solution_compare')->getChecked());
             $this->testOBJ->setShowSolutionAnswersOnly((int) $form->getItemByPostVar('solution_answers_only')->getChecked());
         } else {
             $this->testOBJ->setShowSolutionPrintview(0);
             $this->testOBJ->setShowSolutionListComparison(false);
             $this->testOBJ->setShowSolutionAnswersOnly(0);
         }
     }
     if ($this->formPropertyExists($form, 'highscore_enabled')) {
         // highscore settings
         $this->testOBJ->setHighscoreEnabled((bool) $form->getItemByPostVar('highscore_enabled')->getChecked());
         $this->testOBJ->setHighscoreAnon((bool) $form->getItemByPostVar('highscore_anon')->getChecked());
         $this->testOBJ->setHighscoreAchievedTS((bool) $form->getItemByPostVar('highscore_achieved_ts')->getChecked());
         $this->testOBJ->setHighscoreScore((bool) $form->getItemByPostVar('highscore_score')->getChecked());
         $this->testOBJ->setHighscorePercentage((bool) $form->getItemByPostVar('highscore_percentage')->getChecked());
         $this->testOBJ->setHighscoreHints((bool) $form->getItemByPostVar('highscore_hints')->getChecked());
         $this->testOBJ->setHighscoreWTime((bool) $form->getItemByPostVar('highscore_wtime')->getChecked());
         $this->testOBJ->setHighscoreMode((int) $form->getItemByPostVar('highscore_mode')->getValue());
         $this->testOBJ->setHighscoreTopNum((int) $form->getItemByPostVar('highscore_top_num')->getValue());
     }
     if ($this->formPropertyExists($form, 'solution_signature')) {
         $this->testOBJ->setShowSolutionSignature($form->getItemByPostVar('solution_signature')->getChecked());
     }
     if ($this->formPropertyExists($form, 'examid_in_test_res')) {
         $this->testOBJ->setShowExamIdInTestResultsEnabled($form->getItemByPostVar('examid_in_test_res')->getChecked());
     }
     if ($this->formPropertyExists($form, 'exp_sc_short')) {
         $this->testOBJ->setExportSettingsSingleChoiceShort((int) $form->getItemByPostVar('exp_sc_short')->getChecked());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:53,代码来源:class.ilObjTestSettingsScoringResultsGUI.php

示例3: performSaveForm

 private function performSaveForm(ilPropertyFormGUI $form)
 {
     if ($this->areScoringSettingsWritable()) {
         if (!$this->isHiddenFormItem('count_system')) {
             $this->testOBJ->setCountSystem($form->getItemByPostVar('count_system')->getValue());
         }
         if (!$this->isHiddenFormItem('mc_scoring')) {
             $this->testOBJ->setMCScoring($form->getItemByPostVar('mc_scoring')->getValue());
         }
         if (!$this->isHiddenFormItem('score_cutting')) {
             $this->testOBJ->setScoreCutting($form->getItemByPostVar('score_cutting')->getValue());
         }
         if (!$this->isHiddenFormItem('pass_scoring')) {
             $this->testOBJ->setPassScoring($form->getItemByPostVar('pass_scoring')->getValue());
         }
     }
     if (!$this->isHiddenFormItem('results_access_enabled')) {
         if ($form->getItemByPostVar('results_access_enabled')->getChecked()) {
             $this->testOBJ->setScoreReporting($form->getItemByPostVar('results_access_setting')->getValue());
             if ($this->testOBJ->getScoreReporting() == REPORT_AFTER_DATE) {
                 $this->testOBJ->setReportingDate($form->getItemByPostVar('reporting_date')->getDate()->get(IL_CAL_FKT_DATE, 'YmdHis'));
             } else {
                 $this->testOBJ->setReportingDate('');
             }
             $this->testOBJ->setShowPassDetails($form->getItemByPostVar('pass_details')->getChecked());
         } else {
             $this->testOBJ->setScoreReporting(4);
             // never
             $this->testOBJ->setShowPassDetails(false);
             $this->testOBJ->setReportingDate('');
         }
     }
     if (!$this->isHiddenFormItem('show_result_grading')) {
         $this->testOBJ->setShowGradingStatusEnabled($form->getItemByPostVar('grading_status')->getChecked());
         $this->testOBJ->setShowGradingMarkEnabled((int) $form->getItemByPostVar('grading_mark')->getChecked());
     }
     if (!$this->isHiddenFormItem('solution_details')) {
         if ($form->getItemByPostVar('solution_details')->getChecked()) {
             $this->testOBJ->setShowSolutionDetails(1);
             $this->testOBJ->setPrintBestSolutionWithResult((int) $form->getItemByPostVar('print_bs_with_res')->getChecked());
         } else {
             $this->testOBJ->setShowSolutionDetails(0);
             $this->testOBJ->setPrintBestSolutionWithResult(0);
         }
     }
     if (!$this->isHiddenFormItem('solution_printview')) {
         if ($form->getItemByPostVar('solution_printview')->getChecked()) {
             $this->testOBJ->setShowSolutionPrintview(1);
             $this->testOBJ->setShowSolutionListComparison((bool) $form->getItemByPostVar('solution_compare')->getChecked());
             $this->testOBJ->setShowSolutionAnswersOnly((int) $form->getItemByPostVar('solution_answers_only')->getChecked());
         } else {
             $this->testOBJ->setShowSolutionPrintview(0);
             $this->testOBJ->setShowSolutionListComparison(false);
             $this->testOBJ->setShowSolutionAnswersOnly(0);
         }
     }
     if (!$this->isHiddenFormItem('solution_feedback')) {
         $this->testOBJ->setShowSolutionFeedback($form->getItemByPostVar('solution_feedback')->getChecked());
     }
     if (!$this->isHiddenFormItem('solution_signature')) {
         $this->testOBJ->setShowSolutionSignature($form->getItemByPostVar('solution_signature')->getChecked());
     }
     if (!$this->isHiddenFormItem('examid_in_test_res')) {
         $this->testOBJ->setShowExamIdInTestResultsEnabled($form->getItemByPostVar('examid_in_test_res')->getChecked());
     }
     if (!$this->isHiddenFormItem('solution_suggested')) {
         $this->testOBJ->setShowSolutionSuggested($form->getItemByPostVar('solution_suggested')->getChecked());
     }
     if (!$this->isHiddenFormItem('exp_sc_short')) {
         $this->testOBJ->setExportSettingsSingleChoiceShort((int) $form->getItemByPostVar('exp_sc_short')->getChecked());
     }
     if (!$this->isHiddenFormItem('pass_deletion_allowed')) {
         $this->testOBJ->setPassDeletionAllowed((bool) $form->getItemByPostVar('pass_deletion_allowed')->getValue());
     }
     // result filter taxonomies
     if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->isResultTaxonomyFilterSupported()) {
         if (!$this->isHiddenFormItem('results_tax_filters') && count($this->getAvailableTaxonomyIds())) {
             $this->testOBJ->setResultFilterTaxIds(array_intersect($this->getAvailableTaxonomyIds(), $form->getItemByPostVar('results_tax_filters')->getValue()));
         }
     }
     if (!$this->isHiddenFormItem('anonymity')) {
         // anonymity setting
         $this->testOBJ->setAnonymity($form->getItemByPostVar('anonymity')->getValue());
     }
     if (!$this->isHiddenFormItem('enable_archiving')) {
         // Archiving
         if ($this->testOBJ->getAnonymity() == true && $form->getItemByPostVar('enable_archiving')->getChecked() == true) {
             $this->testOBJ->setEnableArchiving(false);
             ilUtil::sendInfo($this->lng->txt('no_archive_on_anonymous'), true);
         } else {
             $this->testOBJ->setEnableArchiving($form->getItemByPostVar('enable_archiving')->getChecked());
         }
     }
     if (!$this->isHiddenFormItem('highscore_enabled')) {
         // highscore settings
         $this->testOBJ->setHighscoreEnabled((bool) $form->getItemByPostVar('highscore_enabled')->getChecked());
         $this->testOBJ->setHighscoreAnon((bool) $form->getItemByPostVar('highscore_anon')->getChecked());
         $this->testOBJ->setHighscoreAchievedTS((bool) $form->getItemByPostVar('highscore_achieved_ts')->getChecked());
         $this->testOBJ->setHighscoreScore((bool) $form->getItemByPostVar('highscore_score')->getChecked());
         $this->testOBJ->setHighscorePercentage((bool) $form->getItemByPostVar('highscore_percentage')->getChecked());
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilObjTestSettingsScoringResultsGUI.php


注:本文中的ilObjTest::setExportSettingsSingleChoiceShort方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。