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


PHP ilObjTest::saveCompleteStatus方法代码示例

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


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

示例1: saveEditSourcePoolDefinitionFormCmd

 private function saveEditSourcePoolDefinitionFormCmd()
 {
     $this->questionSetConfig->loadFromDb();
     $defId = $this->fetchSingleSourcePoolDefinitionIdParameter();
     $sourcePoolDefinition = $this->sourcePoolDefinitionFactory->getSourcePoolDefinitionByDefinitionId($defId);
     $availableTaxonomyIds = ilObjTaxonomy::getUsageOfObject($sourcePoolDefinition->getPoolId());
     $form = $this->buildEditSourcePoolDefinitionFormGUI();
     $form->build($sourcePoolDefinition, $availableTaxonomyIds);
     $errors = !$form->checkInput();
     // ALWAYS CALL BEFORE setValuesByPost()
     $form->setValuesByPost();
     // NEVER CALL THIS BEFORE checkInput()
     if ($errors) {
         return $this->showSourcePoolDefinitionListCmd($form);
     }
     $form->applySubmit($sourcePoolDefinition, $availableTaxonomyIds);
     $sourcePoolDefinition->saveToDb();
     $this->sourcePoolDefinitionList->loadDefinitions();
     $this->stagingPool->rebuild($this->sourcePoolDefinitionList);
     $this->questionSetConfig->setLastQuestionSyncTimestamp(time());
     $this->questionSetConfig->saveToDb();
     $this->sourcePoolDefinitionList->saveDefinitions();
     $this->testOBJ->saveCompleteStatus($this->questionSetConfig);
     ilUtil::sendSuccess($this->lng->txt("tst_msg_random_question_set_config_modified"), true);
     $this->ctrl->redirect($this, self::CMD_SHOW_SRC_POOL_DEF_LIST);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilTestRandomQuestionSetConfigGUI.php

示例2: insertQuestionsObject

 /**
  * Insert questions from the questionbrowser into the test 
  *
  * @access	public
  */
 function insertQuestionsObject()
 {
     $selected_array = is_array($_POST['q_id']) ? $_POST['q_id'] : array();
     if (!count($selected_array)) {
         ilUtil::sendInfo($this->lng->txt("tst_insert_missing_question"), true);
         $this->ctrl->redirect($this, "browseForQuestions");
     } else {
         include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
         $manscoring = FALSE;
         foreach ($selected_array as $key => $value) {
             $this->object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
             if (!$manscoring) {
                 $manscoring = $manscoring | assQuestion::_needsManualScoring($value);
             }
         }
         $this->object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
         if ($manscoring) {
             ilUtil::sendInfo($this->lng->txt("manscoring_hint"), TRUE);
         } else {
             ilUtil::sendSuccess($this->lng->txt("tst_questions_inserted"), TRUE);
         }
         $this->ctrl->redirect($this, "questions");
         return;
     }
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:30,代码来源:class.ilObjTestGUI.php

示例3: confirmRemoveQuestionsObject

 /**
  * Remove questions from the test after confirmation
  */
 public function confirmRemoveQuestionsObject()
 {
     $checked_questions = $_POST["q_id"];
     $questions = $this->object->getQuestionTitlesAndIndexes();
     $deleted = array();
     foreach ((array) $checked_questions as $value) {
         $this->object->removeQuestion($value);
         $deleted[] = $value;
     }
     $this->object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
     ilUtil::sendSuccess($this->lng->txt("tst_questions_removed"));
     if ($_REQUEST['test_express_mode']) {
         $prev = null;
         $return_to = null;
         $deleted_tmp = $deleted;
         $first = array_shift($deleted_tmp);
         foreach ((array) $questions as $key => $value) {
             if (!in_array($key, $deleted)) {
                 $prev = $key;
                 if (!$first) {
                     $return_to = $prev;
                     break;
                 } else {
                     continue;
                 }
             } else {
                 if ($key == $first) {
                     if ($prev) {
                         $return_to = $prev;
                         break;
                     }
                     $first = array_shift($deleted_tmp);
                 }
             }
         }
         if (count($questions) == count($checked_questions) || !$return_to) {
             $this->ctrl->setParameter($this, 'q_id', '');
             $this->ctrl->redirect($this, 'showPage');
         }
         $this->ctrl->setParameter($this, 'q_id', $return_to);
         $this->ctrl->redirect($this, "showPage");
     } else {
         $this->ctrl->setParameter($this, 'q_id', '');
         $this->ctrl->redirect($this, 'questions');
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:49,代码来源:class.ilObjTestGUI.php

示例4: saveFormCmd

 /**
  * command method that checks the question set config form
  * 
  * if form is valid it gets saved to the database,
  * otherwise it will be reprinted with alerts
  */
 public function saveFormCmd()
 {
     $form = $this->buildForm();
     if ($this->testOBJ->participantDataExist()) {
         ilUtil::sendFailure($this->lng->txt("tst_msg_cannot_modify_dynamic_question_set_conf_due_to_part"), true);
         return $this->showFormCmd($form);
     }
     $errors = !$form->checkInput();
     // ALWAYS CALL BEFORE setValuesByPost()
     $form->setValuesByPost();
     // NEVER CALL THIS BEFORE checkInput()
     if ($errors) {
         ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
         return $this->showFormCmd($form);
     }
     $this->performSaveForm($form);
     $this->testOBJ->saveCompleteStatus($this->questionSetConfig);
     ilUtil::sendSuccess($this->lng->txt("tst_msg_dynamic_question_set_config_modified"), true);
     $this->ctrl->redirect($this, self::CMD_SHOW_FORM);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilObjTestDynamicQuestionSetConfigGUI.php

示例5: saveMarksObject

 /**
  * Save the mark schema
  *
  * Save the mark schema
  *
  * @access	public
  */
 function saveMarksObject()
 {
     try {
         $this->saveMarkSchemaFormData();
         $mark_check = $this->object->checkMarks();
     } catch (Exception $ex) {
         $mark_check = $this->lng->txt('mark_schema_invalid');
     }
     if ($mark_check !== true) {
         ilUtil::sendFailure($mark_check);
     } elseif ($_POST["chbECTS"] && (strcmp($_POST["ects_grade_a"], "") == 0 or strcmp($_POST["ects_grade_b"], "") == 0 or strcmp($_POST["ects_grade_c"], "") == 0 or strcmp($_POST["ects_grade_d"], "") == 0 or strcmp($_POST["ects_grade_e"], "") == 0)) {
         ilUtil::sendInfo($this->lng->txt("ects_fill_out_all_values"), true);
     } elseif ($_POST["ects_grade_a"] > 100 or $_POST["ects_grade_a"] < 0) {
         ilUtil::sendInfo($this->lng->txt("ects_range_error_a"), true);
     } elseif ($_POST["ects_grade_b"] > 100 or $_POST["ects_grade_b"] < 0) {
         ilUtil::sendInfo($this->lng->txt("ects_range_error_b"), true);
     } elseif ($_POST["ects_grade_c"] > 100 or $_POST["ects_grade_c"] < 0) {
         ilUtil::sendInfo($this->lng->txt("ects_range_error_c"), true);
     } elseif ($_POST["ects_grade_d"] > 100 or $_POST["ects_grade_d"] < 0) {
         ilUtil::sendInfo($this->lng->txt("ects_range_error_d"), true);
     } elseif ($_POST["ects_grade_e"] > 100 or $_POST["ects_grade_e"] < 0) {
         ilUtil::sendInfo($this->lng->txt("ects_range_error_e"), true);
     } else {
         $this->object->mark_schema->saveToDb($this->object->getTestId());
         $this->object->saveCompleteStatus();
         if ($this->object->getReportingDate()) {
             $fxpercent = "";
             if ($_POST["chbUseFX"]) {
                 $fxpercent = ilUtil::stripSlashes($_POST["percentFX"]);
             }
             $this->object->saveECTSStatus($_POST["chbECTS"], $fxpercent, ilUtil::stripSlashes($this->object->ects_grades["A"]), ilUtil::stripSlashes($this->object->ects_grades["B"]), ilUtil::stripSlashes($this->object->ects_grades["C"]), ilUtil::stripSlashes($this->object->ects_grades["D"]), ilUtil::stripSlashes($this->object->ects_grades["E"]));
         }
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
     }
     $this->marksObject();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:43,代码来源:class.ilObjTestGUI.php


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