本文整理汇总了PHP中assQuestion::getQuestionTypeFromDb方法的典型用法代码示例。如果您正苦于以下问题:PHP assQuestion::getQuestionTypeFromDb方法的具体用法?PHP assQuestion::getQuestionTypeFromDb怎么用?PHP assQuestion::getQuestionTypeFromDb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assQuestion
的用法示例。
在下文中一共展示了assQuestion::getQuestionTypeFromDb方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeCommand
//.........这里部分代码省略.........
break;
case "ilcommonactiondispatchergui":
require_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case 'ilassquestionhintsgui':
$this->prepareSubGuiOutput();
// set return target
$this->ctrl->setReturn($this, "questions");
// set context tabs
require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
$questionGUI =& assQuestionGUI::_getQuestionGUI($q_type, $_GET['q_id']);
$questionGUI->object->setObjId($this->object->getId());
$questionGUI->setQuestionTabs();
// forward to ilAssQuestionHintsGUI
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
$gui = new ilAssQuestionHintsGUI($questionGUI);
$ilCtrl->forwardCommand($gui);
break;
case 'ilassquestionfeedbackeditinggui':
$this->prepareSubGuiOutput();
// set return target
$this->ctrl->setReturn($this, "questions");
// set context tabs
require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
$questionGUI = assQuestionGUI::_getQuestionGUI('', $_GET['q_id']);
$questionGUI->object->setObjId($this->object->getId());
$questionGUI->setQuestionTabs();
// 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 'iltesttoplistgui':
$this->prepareOutput();
require_once './Modules/Test/classes/class.ilTestToplistGUI.php';
$gui = new ilTestToplistGUI($this);
$this->ctrl->forwardCommand($gui);
break;
case 'ilscoringadjustmentgui':
$this->prepareOutput();
require_once './Modules/Test/classes/class.ilScoringAdjustmentGUI.php';
$gui = new ilScoringAdjustmentGUI($this->object);
$this->ctrl->forwardCommand($gui);
break;
case '':
case 'ilobjtestgui':
$this->prepareOutput();
$this->addHeaderAction();
if (strcmp($cmd, "properties") == 0 && $_GET["browse"]) {
$this->questionBrowser();
return;
}
if (strcmp($cmd, "properties") == 0 && ($_GET["up"] || $_GET["down"])) {
$this->questionsObject();
return;
}
$cmd .= "Object";
$ret =& $this->{$cmd}();
break;
default:
// elba hack for storing question id for inserting new question after
if ($_REQUEST['prev_qid']) {
global $___prev_question_id;
$___prev_question_id = $_REQUEST['prev_qid'];
$this->ctrl->setParameterByClass('ilassquestionpagegui', 'prev_qid', $_REQUEST['prev_qid']);
$this->ctrl->setParameterByClass($_GET['sel_question_types'] . 'gui', 'prev_qid', $_REQUEST['prev_qid']);
}
$this->create_question_mode = true;
$this->prepareOutput();
$this->ctrl->setReturn($this, "questions");
require_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$q_gui =& assQuestionGUI::_getQuestionGUI($_GET['sel_question_types'], $_GET["q_id"]);
$q_gui->object->setObjId($this->object->getId());
if (!$_GET['sel_question_types']) {
$qType = assQuestion::getQuestionTypeFromDb($_GET['q_id']);
} else {
$qType = $_GET['sel_question_types'];
}
$this->ctrl->setParameterByClass($qType . "GUI", 'prev_qid', $_REQUEST['prev_qid']);
$this->ctrl->setParameterByClass($qType . "GUI", 'test_ref_id', $_REQUEST['ref_id']);
$this->ctrl->setParameterByClass($qType . "GUI", 'q_id', $_REQUEST['q_id']);
if ($_REQUEST['test_express_mode']) {
$this->ctrl->setParameterByClass($qType . "GUI", 'test_express_mode', 1);
}
#global $___test_express_mode;
#$___test_express_mode = true;
if (!$q_gui->isSaveCommand()) {
$_GET['calling_test'] = $this->object->getRefId();
}
$q_gui->setQuestionTabs();
#unset($___test_express_mode);
$ret =& $this->ctrl->forwardCommand($q_gui);
break;
}
if (!in_array(strtolower($_GET["baseClass"]), array('iladministrationgui', 'ilrepositorygui')) && $this->getCreationMode() != true) {
$this->tpl->show();
}
}
示例2: _getGUIClassNameForId
/**
* @deprecated
*/
function _getGUIClassNameForId($a_q_id)
{
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$q_type = assQuestion::getQuestionTypeFromDb($a_q_id);
$class_name = assQuestionGUI::_getClassNameForQType($q_type);
return $class_name;
}
示例3: executeCommand
//.........这里部分代码省略.........
$page_gui->setEnabledTabs(false);
$page_gui->setEnabledInternalLinks(false);
if (strlen($this->ctrl->getCmd()) == 0) {
$this->ctrl->setCmdClass(get_class($page_gui));
$this->ctrl->setCmd("preview");
}
//$page_gui->setQuestionXML($question->toXML(false, false, true));
$page_gui->setQuestionHTML(array($q_gui->object->getId() => $q_gui->getPreview(TRUE)));
$page_gui->setTemplateTargetVar("ADM_CONTENT");
$page_gui->setOutputMode($this->object->evalTotalPersons() == 0 ? "edit" : 'preview');
$page_gui->setHeader($question->getTitle());
$page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, "downloadFile"));
$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "fullscreen"));
$page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this));
$page_gui->setPresentationTitle($question->getTitle());
$ret =& $this->ctrl->forwardCommand($page_gui);
$this->tpl->setContent($ret);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case 'ilassquestionhintsgui':
$this->prepareSubGuiOutput();
// set return target
$this->ctrl->setReturn($this, "questions");
// set context tabs
require_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
$questionGUI =& assQuestionGUI::_getQuestionGUI($q_type, $_GET['q_id']);
$questionGUI->object->setObjId($this->object->getId());
$questionGUI->setQuestionTabs();
// forward to ilAssQuestionHintsGUI
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
$gui = new ilAssQuestionHintsGUI($questionGUI);
$ilCtrl->forwardCommand($gui);
break;
case 'iltesttoplistgui':
$this->prepareOutput();
require_once 'Modules/Test/classes/class.ilTestToplistGUI.php';
$gui = new ilTestToplistGUI($this);
$this->ctrl->forwardCommand($gui);
break;
case '':
case 'ilobjtestgui':
$this->prepareOutput();
$this->addHeaderAction();
if (preg_match("/deleteqpl_\\d+/", $cmd)) {
$cmd = "randomQuestions";
}
if (strcmp($cmd, "properties") == 0 && $_GET["browse"]) {
$this->questionBrowser();
return;
}
if (strcmp($cmd, "properties") == 0 && ($_GET["up"] || $_GET["down"])) {
$this->questionsObject();
return;
}
$cmd .= "Object";
$ret =& $this->{$cmd}();
break;
default:
// elba hack for storing question id for inserting new question after
if ($_REQUEST['prev_qid']) {
global $___prev_question_id;
$___prev_question_id = $_REQUEST['prev_qid'];
$this->ctrl->setParameterByClass('ilpageobjectgui', 'prev_qid', $_REQUEST['prev_qid']);
$this->ctrl->setParameterByClass($_GET['sel_question_types'] . 'gui', 'prev_qid', $_REQUEST['prev_qid']);
}
$this->create_question_mode = true;
$this->prepareOutput();
$this->ctrl->setReturn($this, "questions");
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$q_gui =& assQuestionGUI::_getQuestionGUI($_GET['sel_question_types'], $_GET["q_id"]);
$q_gui->object->setObjId($this->object->getId());
if (!$_GET['sel_question_types']) {
$qType = assQuestion::getQuestionTypeFromDb($_GET['q_id']);
} else {
$qType = $_GET['sel_question_types'];
}
$this->ctrl->setParameterByClass($qType . "GUI", 'prev_qid', $_REQUEST['prev_qid']);
$this->ctrl->setParameterByClass($qType . "GUI", 'test_ref_id', $_REQUEST['ref_id']);
$this->ctrl->setParameterByClass($qType . "GUI", 'q_id', $_REQUEST['q_id']);
if ($_REQUEST['test_express_mode']) {
$this->ctrl->setParameterByClass($qType . "GUI", 'test_express_mode', 1);
}
#global $___test_express_mode;
#$___test_express_mode = true;
if (!$q_gui->isSaveCommand()) {
$_GET['calling_test'] = $this->object->getRefId();
}
$q_gui->setQuestionTabs();
#unset($___test_express_mode);
$ret =& $this->ctrl->forwardCommand($q_gui);
break;
}
if (strtolower($_GET["baseClass"]) != "iladministrationgui" && $this->getCreationMode() != true) {
$this->tpl->show();
}
}