当前位置: 首页>>代码示例>>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;未经允许,请勿转载。