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


PHP assQuestion::_getQuestionType方法代码示例

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


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

示例1: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule("assessment");
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004NodeFactory.php";
     $node_object = ilSCORM2004NodeFactory::getInstance($this->slm_object, $a_set["child"], false);
     $tr_data = $node_object->getObjectives();
     // learning objectives
     foreach ($tr_data as $data) {
         $this->tpl->setCurrentBlock("objective");
         $this->tpl->setVariable("TXT_LEARNING_OBJECTIVE", ilSCORM2004Sco::convertLists($data->getObjectiveID()));
         $this->tpl->setVariable("IMG_LOBJ", ilUtil::getImagePath("icon_lobj.svg"));
         $this->tpl->parseCurrentBlock();
     }
     // pages
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $childs = $this->tree->getChilds($a_set["child"]);
     foreach ($childs as $child) {
         // get question ids
         include_once "./Services/COPage/classes/class.ilPCQuestion.php";
         $qids = ilPCQuestion::_getQuestionIdsForPage("sahs", $child["child"]);
         if (count($qids) > 0) {
             // output questions
             foreach ($qids as $qid) {
                 $this->tpl->setCurrentBlock("question");
                 //$qtitle = assQuestion::_getTitle($qid);
                 $qtype = assQuestion::_getQuestionType($qid);
                 //$qtext = assQuestion::_getQuestionText($qid);
                 $qtext = assQuestion::_getQuestionTitle($qid);
                 $this->tpl->setVariable("TXT_QUESTION", $qtext);
                 $this->tpl->setVariable("TXT_QTYPE", $lng->txt($qtype));
                 $this->tpl->setVariable("IMG_QST", ilUtil::getImagePath("icon_tst.svg"));
                 $this->tpl->parseCurrentBlock();
             }
             // output page title
             $page_title = ilSCORM2004Node::_lookupTitle($child["child"]);
             $this->tpl->setCurrentBlock("page");
             $this->tpl->setVariable("TXT_PAGE_TITLE", $page_title);
             $this->tpl->setVariable("IMG_PAGE", ilUtil::getImagePath("icon_pg.svg"));
             $ilCtrl->setParameterByClass("ilscorm2004pagenodegui", "obj_id", $child["child"]);
             $this->tpl->setVariable("HREF_EDIT_PAGE", $ilCtrl->getLinkTargetByClass("ilscorm2004pagenodegui", "edit"));
             $this->tpl->parseCurrentBlock();
         }
     }
     // sco title
     $this->tpl->setVariable("TXT_SCO_TITLE", $a_set["title"]);
     $this->tpl->setVariable("IMG_SCO", ilUtil::getImagePath("icon_sco.svg"));
     $ilCtrl->setParameterByClass("ilscorm2004scogui", "obj_id", $a_set["child"]);
     $this->tpl->setVariable("HREF_EDIT_SCO", $ilCtrl->getLinkTargetByClass("ilscorm2004scogui", "showProperties"));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilObjectivesAlignmentTableGUI.php

示例2: setTabs

 /**
  * Set tabs
  */
 function setTabs()
 {
     if ($this->getSelfAssessmentMode()) {
         return;
     }
     global $ilTabs, $ilCtrl, $lng;
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     if ($this->content_obj != "") {
         $q_ref = $this->content_obj->getQuestionReference();
     }
     if ($q_ref != "") {
         $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
         if (!($inst_id > 0)) {
             $q_id = ilInternalLink::_extractObjIdOfTarget($q_ref);
         }
     }
     $ilTabs->addTarget("question", $ilCtrl->getLinkTarget($this, "edit"), array("editQuestion", "save", "cancel", "addSuggestedSolution", "cancelExplorer", "linkChilds", "removeSuggestedSolution", "addPair", "addTerm", "delete", "deleteTerms", "editMode", "upload", "saveEdit", "uploadingImage", "uploadingImagemap", "addArea", "deletearea", "saveShape", "back", "saveEdit", "changeGapType", "createGaps", "addItem", "addYesNo", "addTrueFalse", "toggleGraphicalAnswers", "setMediaMode"), "");
     if ($q_id > 0) {
         if (assQuestion::_getQuestionType($q_id) != "assTextQuestion") {
             require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
             $tabCommands = assQuestionGUI::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
             $tabLink = ilUtil::appendUrlParameterString($ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW), "q_id=" . (int) $q_id);
             $ilTabs->addTarget('feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:30,代码来源:class.ilPCQuestionGUI.php

示例3: 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

示例4: switch


//.........这里部分代码省略.........
             $ret = $this->ctrl->forwardCommand($profile_gui);
             break;
         case "ilpageeditorgui":
             if (!$this->getEnableEditing()) {
                 ilUtil::sendFailure($lng->txt("permission_denied"), true);
                 $ilCtrl->redirect($this, "preview");
             }
             $page_editor = new ilPageEditorGUI($this->getPageObject(), $this);
             $page_editor->setLocator($this->locator);
             $page_editor->setHeader($this->getHeader());
             $page_editor->setPageBackTitle($this->page_back_title);
             $page_editor->setIntLinkReturn($this->int_link_return);
             //$page_editor->executeCommand();
             $ret =& $this->ctrl->forwardCommand($page_editor);
             break;
         case 'ilnewsitemgui':
             include_once "./Services/News/classes/class.ilNewsItemGUI.php";
             $news_item_gui = new ilNewsItemGUI();
             $news_item_gui->setEnableEdit(true);
             $news_item_gui->setContextObjId($this->news_obj_id);
             $news_item_gui->setContextObjType($this->news_obj_type);
             $news_item_gui->setContextSubObjId($this->obj->getId());
             $news_item_gui->setContextSubObjType("pg");
             $ret = $ilCtrl->forwardCommand($news_item_gui);
             break;
             $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
             $ret = $this->ctrl->forwardCommand($profile_gui);
             break;
         case "ilpropertyformgui":
             include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
             $form = $this->initOpenedContentForm();
             $this->ctrl->forwardCommand($form);
             break;
         case "ilinternallinkgui":
             $this->lng->loadLanguageModule("content");
             require_once "./Services/Link/classes/class.ilInternalLinkGUI.php";
             $link_gui = new ilInternalLinkGUI("Media_Media", 0);
             //$link_gui->filterLinkType("RepositoryItem");
             $link_gui->filterLinkType("PageObject_FAQ");
             $link_gui->filterLinkType("GlossaryItem");
             $link_gui->filterLinkType("Media_Media");
             $link_gui->filterLinkType("Media_FAQ");
             $link_gui->setFilterWhiteList(true);
             $link_gui->setMode("asynch");
             $ilCtrl->forwardCommand($link_gui);
             break;
         case "ilquestioneditgui":
             $this->setQEditTabs("question");
             include_once "./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php";
             $edit_gui = new ilQuestionEditGUI();
             $edit_gui->setPageConfig($this->getPageConfig());
             //			    $edit_gui->addNewIdListener($this, "setNewQuestionId");
             $edit_gui->setSelfAssessmentEditingMode(true);
             $ret = $ilCtrl->forwardCommand($edit_gui);
             $this->tpl->setContent($ret);
             break;
         case 'ilassquestionfeedbackeditinggui':
             $this->onFeedbackEditingForwarding();
             // set tabs
             $this->setQEditTabs("feedback");
             // load required lang mods
             $lng->loadLanguageModule("assessment");
             // set context tabs
             require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
             require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
             $questionGUI = assQuestionGUI::_getQuestionGUI(assQuestion::_getQuestionType((int) $_GET['q_id']), (int) $_GET['q_id']);
             $questionGUI->object->setObjId(0);
             $questionGUI->object->setSelfAssessmentEditingMode(true);
             $questionGUI->object->setPreventRteUsage($this->getPageConfig()->getPreventRteUsage());
             // forward to ilAssQuestionFeedbackGUI
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
             $gui = new ilAssQuestionFeedbackEditingGUI($questionGUI, $ilCtrl, $ilAccess, $tpl, $ilTabs, $lng);
             $ilCtrl->forwardCommand($gui);
             break;
             /*			case "ilpagemultilanggui":
             				$ilCtrl->setReturn($this, "edit");
             				include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
             				$ml_gui = new ilPageMultiLangGUI($this->getPageObject()->getParentType(), $this->getPageObject()->getParentId(),
             					$this->getPageConfig()->getSinglePageMode());
             				//$this->setTabs("settings");
             				//$this->setSubTabs("cont_multilinguality");
             				$ret = $this->ctrl->forwardCommand($ml_gui);
             				break;*/
         /*			case "ilpagemultilanggui":
         				$ilCtrl->setReturn($this, "edit");
         				include_once("./Services/COPage/classes/class.ilPageMultiLangGUI.php");
         				$ml_gui = new ilPageMultiLangGUI($this->getPageObject()->getParentType(), $this->getPageObject()->getParentId(),
         					$this->getPageConfig()->getSinglePageMode());
         				//$this->setTabs("settings");
         				//$this->setSubTabs("cont_multilinguality");
         				$ret = $this->ctrl->forwardCommand($ml_gui);
         				break;*/
         default:
             $cmd = $this->ctrl->getCmd("preview");
             $ret = $this->{$cmd}();
             break;
     }
     //echo "+$ret+";
     return $ret;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilPageObjectGUI.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: setTabs

 /**
  * Set tabs
  */
 function setTabs()
 {
     global $ilTabs, $ilCtrl, $lng;
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     if ($this->content_obj != "") {
         $q_ref = $this->content_obj->getQuestionReference();
     }
     if ($q_ref != "") {
         $inst_id = ilInternalLink::_extractInstOfTarget($q_ref);
         if (!($inst_id > 0)) {
             $q_id = ilInternalLink::_extractObjIdOfTarget($q_ref);
         }
     }
     $ilTabs->addTarget("question", $ilCtrl->getLinkTarget($this, "edit"), array("editQuestion", "save", "cancel", "addSuggestedSolution", "cancelExplorer", "linkChilds", "removeSuggestedSolution", "addPair", "addTerm", "delete", "deleteTerms", "editMode", "upload", "saveEdit", "uploadingImage", "uploadingImagemap", "addArea", "deletearea", "saveShape", "back", "saveEdit", "changeGapType", "createGaps", "addItem", "addYesNo", "addTrueFalse", "toggleGraphicalAnswers", "setMediaMode"), "");
     if ($q_id > 0) {
         if (assQuestion::_getQuestionType($q_id) != "assTextQuestion") {
             $ilTabs->addTarget("feedback", $ilCtrl->getLinkTarget($this, "feedback"), array("feedback", "saveFeedback"), "");
         }
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:23,代码来源:class.ilPCQuestionGUI.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 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::_getQuestionType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。