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


PHP assQuestion::_includeClass方法代码示例

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


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

示例1: isQuestionObligationPossible

 /**
  * checks wether the obligation for question with given id is possible or not
  * 
  * @param integer $questionId
  * @return boolean $obligationPossible
  */
 public static function isQuestionObligationPossible($questionId)
 {
     require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
     $classConcreteQuestion = assQuestion::_getQuestionType($questionId);
     assQuestion::_includeClass($classConcreteQuestion, 0);
     // static binder is not at work yet (in PHP < 5.3)
     //$obligationPossible = $classConcreteQuestion::isObligationPossible();
     $obligationPossible = call_user_func(array($classConcreteQuestion, 'isObligationPossible'), $questionId);
     return $obligationPossible;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:16,代码来源:class.ilObjTest.php

示例2:

 function &createQuestion($question_type, $question_id = -1)
 {
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     if ($question_id > 0) {
         return assQuestion::_instanciateQuestionGUI($question_id);
     }
     assQuestion::_includeClass($question_type, 1);
     $question_type_gui = $question_type . "GUI";
     $question_gui =& new $question_type_gui();
     return $question_gui;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:11,代码来源:class.ilObjQuestionPool.php

示例3: handlerParseEndTag


//.........这里部分代码省略.........
         case "response_grp":
             $this->gap_index++;
             if ($this->presentation != NULL) {
                 if ($this->response != NULL) {
                     $this->presentation->addResponse($this->response);
                     if ($this->item != NULL) {
                         $this->item->addPresentationitem($this->response);
                     }
                 }
             }
             $this->response = NULL;
             $this->in_response = FALSE;
             break;
         case "item":
             if ($this->do_nothing) {
                 $this->do_nothing = FALSE;
                 return;
             }
             if (strlen($this->item->getQuestionType())) {
                 // this is an ILIAS QTI question
             } else {
                 // this is a QTI question which wasn't generated by ILIAS
             }
             global $ilDB;
             global $ilUser;
             // save the item directly to save memory
             // the database id's of the created items are exported. if the import fails
             // ILIAS can delete the already imported items
             // problems: the object id of the parent questionpool is not yet known. must be set later
             //           the complete flag must be calculated?
             $qt = $this->item->determineQuestionType();
             $presentation = $this->item->getPresentation();
             include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
             assQuestion::_includeClass($qt);
             $question = new $qt();
             $fbt = str_replace('ass', 'ilAss', $qt) . 'Feedback';
             $question->feedbackOBJ = new $fbt($question, $GLOBALS['ilCtrl'], $GLOBALS['ilDB'], $GLOBALS['lng']);
             $question->fromXML($this->item, $this->qpl_id, $this->tst_id, $this->tst_object, $this->question_counter, $this->import_mapping);
             break;
         case "material":
             if ($this->material) {
                 $mat = $this->material->getMaterial(0);
                 if (strcmp($mat["type"], "mattext") == 0 && strcmp($mat["material"]->getLabel(), "suggested_solution") == 0) {
                     $this->item->addSuggestedSolution($mat["material"], $this->gap_index);
                 }
                 if ($this->in_objectives) {
                     $this->objectives->addMaterial($this->material);
                 } else {
                     if ($this->render_type != NULL && strcmp(strtolower($this->getParent($a_xml_parser)), "render_hotspot") == 0) {
                         $this->render_type->addMaterial($this->material);
                     } else {
                         if (count($this->flow_mat) && strcmp(strtolower($this->getParent($a_xml_parser)), "flow_mat") == 0) {
                             $this->flow_mat[count($this->flow_mat) - 1]->addMaterial($this->material);
                         } else {
                             if ($this->itemfeedback != NULL) {
                                 $this->itemfeedback->addMaterial($this->material);
                             } else {
                                 if ($this->response_label != NULL) {
                                     $this->response_label->addMaterial($this->material);
                                 } else {
                                     if ($this->response != NULL) {
                                         if ($this->response->hasRendering()) {
                                             $this->response->setMaterial2($this->material);
                                         } else {
                                             $this->response->setMaterial1($this->material);
                                         }
开发者ID:bheyser,项目名称:qplskl,代码行数:67,代码来源:class.ilQTIParser.php

示例4:

 /**
  * 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

示例5: instantiateQuestionGUI

 /**
  * Creates an instance of a question gui with a given question id
  *
  * @param 	integer	$a_question_id
  *
  * @return 	\assQuestionGUI	The question gui instance
  */
 public static function instantiateQuestionGUI($a_question_id)
 {
     global $ilCtrl, $ilDB, $lng, $ilUser;
     if (strcmp($a_question_id, "") != 0) {
         $question_type = assQuestion::_getQuestionType($a_question_id);
         assQuestion::_includeClass($question_type, 1);
         $question_type_gui = self::getGuiClassNameByQuestionType($question_type);
         $question_gui = new $question_type_gui();
         $question_gui->object->loadFromDb($a_question_id);
         $feedbackObjectClassname = self::getFeedbackClassNameByQuestionType($question_type);
         $question_gui->object->feedbackOBJ = new $feedbackObjectClassname($question_gui->object, $ilCtrl, $ilDB, $lng);
         $assSettings = new ilSetting('assessment');
         require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLockerFactory.php';
         $processLockerFactory = new ilAssQuestionProcessLockerFactory($assSettings, $ilDB);
         $processLockerFactory->setQuestionId($question_gui->object->getId());
         $processLockerFactory->setUserId($ilUser->getId());
         include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php";
         $processLockerFactory->setAssessmentLogEnabled(ilObjAssessmentFolder::_enabledAssessmentLogging());
         $question_gui->object->setProcessLocker($processLockerFactory->getLocker());
     } else {
         global $ilLog;
         $ilLog->write('Instantiate question called without question id. (instantiateQuestionGUI@assQuestion)', $ilLog->WARNING);
         return null;
     }
     return $question_gui;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:33,代码来源:class.assQuestion.php

示例6:

 /**
  * 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 object The alias to the question object
  * @access public
  */
 function &_getQuestionGUI($question_type, $question_id = -1)
 {
     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;
     }
     $question_type_gui = $question_type . "GUI";
     assQuestion::_includeClass($question_type, 1);
     $question =& new $question_type_gui();
     if ($question_id > 0) {
         $question->object->loadFromDb($question_id);
     }
     return $question;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:26,代码来源:class.assQuestionGUI.php

示例7: instantiateQuestionGUI

 /**
  * Creates an instance of a question gui with a given question id
  *
  * @param 	integer	$a_question_id
  *
  * @return 	\assQuestionGUI	The question gui instance
  */
 public static function instantiateQuestionGUI($a_question_id)
 {
     global $ilCtrl, $ilDB, $lng;
     if (strcmp($a_question_id, "") != 0) {
         $question_type = assQuestion::_getQuestionType($a_question_id);
         $question_type_gui = $question_type . "GUI";
         assQuestion::_includeClass($question_type, 1);
         $question_gui = new $question_type_gui();
         $question_gui->object->loadFromDb($a_question_id);
         $feedbackObjectClassname = str_replace('ass', 'ilAss', $question_type) . 'Feedback';
         require_once "Modules/TestQuestionPool/classes/feedback/class.{$feedbackObjectClassname}.php";
         $question_gui->object->feedbackOBJ = new $feedbackObjectClassname($question_gui->object, $ilCtrl, $ilDB, $lng);
     } else {
         global $ilLog;
         $ilLog->write('Instantiate question called without question id. (instantiateQuestionGUI@assQuestion)', $ilLog->WARNING);
         return null;
     }
     return $question_gui;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:26,代码来源:class.assQuestion.php

示例8:

 /**
  * 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;
     }
     $question_type_gui = $question_type . "GUI";
     assQuestion::_includeClass($question_type, 1);
     $question =& new $question_type_gui();
     $feedbackObjectClassname = str_replace('ass', 'ilAss', $question_type) . 'Feedback';
     require_once "Modules/TestQuestionPool/classes/feedback/class.{$feedbackObjectClassname}.php";
     $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
     if ($question_id > 0) {
         $question->object->loadFromDb($question_id);
     }
     return $question;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:30,代码来源:class.assQuestionGUI.php

示例9:

 /**
 * Creates an instance of a question gui with a given question id
 *
 * @param integer $question_id The question id
 * @return object The question gui instance
 * @access public
 */
 function &_instanciateQuestionGUI($question_id)
 {
     if (strcmp($question_id, "") != 0) {
         $question_type = assQuestion::_getQuestionType($question_id);
         $question_type_gui = $question_type . "GUI";
         assQuestion::_includeClass($question_type, 1);
         $question_gui = new $question_type_gui();
         $question_gui->object->loadFromDb($question_id);
         return $question_gui;
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:18,代码来源:class.assQuestion.php


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