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


PHP assQuestion::getFeedbackClassNameByQuestionType方法代碼示例

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


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

示例1: ilSetting

 /**
 * Creates a question GUI instance of a given question type
 *
 * @param integer $question_type The question type of the question
 * @param integer $question_id The question id of the question, if available
 * @return assQuestionGUI $questionGUI The question GUI instance
 * @access	public
 */
 function &createQuestionGUI($question_type, $question_id = -1)
 {
     if (!$question_type and $question_id > 0) {
         $question_type = $this->getQuestionType($question_id);
     }
     if (!strlen($question_type)) {
         return null;
     }
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     assQuestion::_includeClass($question_type, 1);
     $question_type_gui = assQuestion::getGuiClassNameByQuestionType($question_type);
     $question = new $question_type_gui();
     if ($question_id > 0) {
         $question->object->loadFromDb($question_id);
         global $ilCtrl, $ilDB, $ilUser, $lng;
         $feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
         $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
         $assSettings = new ilSetting('assessment');
         require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLockerFactory.php';
         $processLockerFactory = new ilAssQuestionProcessLockerFactory($assSettings, $ilDB);
         $processLockerFactory->setQuestionId($question->object->getId());
         $processLockerFactory->setUserId($ilUser->getId());
         include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php";
         $processLockerFactory->setAssessmentLogEnabled(ilObjAssessmentFolder::_enabledAssessmentLogging());
         $question->object->setProcessLocker($processLockerFactory->getLocker());
     }
     return $question;
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:36,代碼來源:class.ilObjTest.php

示例2:

 /**
  * Creates a question gui representation and returns the alias to the question gui
  * note: please do not use $this inside this method to allow static calls
  *
  * @param string $question_type The question type as it is used in the language database
  * @param integer $question_id The database ID of an existing question to load it into assQuestionGUI
  * 
  * @return assQuestionGUI The alias to the question object
  */
 public function &_getQuestionGUI($question_type, $question_id = -1)
 {
     global $ilCtrl, $ilDB, $lng;
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     if (!$question_type and $question_id > 0) {
         $question_type = assQuestion::getQuestionTypeFromDb($question_id);
     }
     if (strlen($question_type) == 0) {
         return NULL;
     }
     assQuestion::_includeClass($question_type, 1);
     $question_type_gui = assQuestion::getGuiClassNameByQuestionType($question_type);
     $question =& new $question_type_gui();
     $feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
     $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
     if ($question_id > 0) {
         $question->object->loadFromDb($question_id);
     }
     return $question;
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:29,代碼來源:class.assQuestionGUI.php


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