當前位置: 首頁>>代碼示例>>PHP>>正文


PHP assQuestion::instantiateQuestionGUI方法代碼示例

本文整理匯總了PHP中assQuestion::instantiateQuestionGUI方法的典型用法代碼示例。如果您正苦於以下問題:PHP assQuestion::instantiateQuestionGUI方法的具體用法?PHP assQuestion::instantiateQuestionGUI怎麽用?PHP assQuestion::instantiateQuestionGUI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在assQuestion的用法示例。


在下文中一共展示了assQuestion::instantiateQuestionGUI方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initQuestion

 public function initQuestion($questionId, $parentObjId)
 {
     require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
     $this->questionGUI = assQuestion::instantiateQuestionGUI($questionId);
     $this->questionOBJ = $this->questionGUI->object;
     $this->questionOBJ->setObjId($parentObjId);
     $this->questionGUI->setQuestionTabs();
     $this->questionGUI->outAdditionalOutput();
     $this->questionOBJ->setOutputType(OUTPUT_JAVASCRIPT);
     $this->questionGUI->setTargetGui($this);
     $this->questionGUI->setQuestionActionCmd(self::CMD_HANDLE_QUESTION_ACTION);
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:12,代碼來源:class.ilAssQuestionPreviewGUI.php

示例2: saveQuestion

 protected function saveQuestion()
 {
     $question_id = $_POST['q_id'];
     $question_pool_id = $_POST['qpl_id'];
     $form = $this->buildAdjustQuestionForm($question_id, $question_pool_id);
     $form->setValuesByPost($_POST);
     if (!$form->checkInput()) {
         ilUtil::sendFailure($this->lng->txt('adjust_question_form_error'));
         $this->outputAdjustQuestionForm($form);
         return;
     }
     require_once './Modules/TestQuestionPool/classes/class.assQuestion.php';
     /** @var $question assQuestionGUI|ilGuiQuestionScoringAdjustable */
     $question = assQuestion::instantiateQuestionGUI($question_id);
     if ($question instanceof ilGuiQuestionScoringAdjustable) {
         $question->writeQuestionSpecificPostData($form);
     }
     if ($question->object instanceof ilObjQuestionScoringAdjustable) {
         $question->object->saveAdditionalQuestionDataToDb();
     }
     if ($question instanceof ilGuiAnswerScoringAdjustable) {
         $question->writeAnswerSpecificPostData($form);
     }
     if ($question->object instanceof ilObjAnswerScoringAdjustable) {
         $question->object->saveAnswerSpecificDataToDb();
     }
     $question->object->setPoints($question->object->getMaximumPoints());
     $question->object->saveQuestionDataToDb();
     require_once './Modules/Test/classes/class.ilTestScoring.php';
     $scoring = new ilTestScoring($this->object);
     $scoring->setPreserveManualScores($_POST['preserve_manscoring'] == 1 ? true : false);
     $scoring->recalculateSolutions();
     ilUtil::sendSuccess($this->lng->txt('saved_adjustment'));
     $this->questionsObject();
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:35,代碼來源:class.ilScoringAdjustmentGUI.php

示例3: copyQuestionToPool

 public function copyQuestionToPool($sourceQuestionId, $targetParentId)
 {
     require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
     $question_gui = assQuestion::instantiateQuestionGUI($sourceQuestionId);
     $newtitle = $question_gui->object->getTitle();
     if ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle())) {
         $counter = 2;
         while ($question_gui->object->questionTitleExists($targetParentId, $question_gui->object->getTitle() . " ({$counter})")) {
             $counter++;
         }
         $newtitle = $question_gui->object->getTitle() . " ({$counter})";
     }
     return $question_gui->object->createNewOriginalFromThisDuplicate($targetParentId, $newtitle);
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:14,代碼來源:class.ilObjTestGUI.php


注:本文中的assQuestion::instantiateQuestionGUI方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。