本文整理匯總了PHP中assQuestion::originalQuestionExists方法的典型用法代碼示例。如果您正苦於以下問題:PHP assQuestion::originalQuestionExists方法的具體用法?PHP assQuestion::originalQuestionExists怎麽用?PHP assQuestion::originalQuestionExists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類assQuestion
的用法示例。
在下文中一共展示了assQuestion::originalQuestionExists方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: copyAndLinkToQuestionpoolObject
public function copyAndLinkToQuestionpoolObject()
{
global $lng;
require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
// #13761; All methods use for this request should be revised, thx japo ;-)
if ('copyAndLinkToQuestionpool' == $this->ctrl->getCmd() && (!isset($_REQUEST['q_id']) || !is_array($_REQUEST['q_id']))) {
ilUtil::sendFailure($this->lng->txt('tst_no_question_selected_for_moving_to_qpl'), true);
$this->ctrl->redirect($this, 'questions');
}
if (isset($_REQUEST['q_id']) && is_array($_REQUEST['q_id'])) {
foreach ($_REQUEST['q_id'] as $q_id) {
if (!assQuestion::originalQuestionExists($q_id)) {
continue;
}
$type = ilObject::_lookupType(assQuestion::lookupParentObjId(assQuestion::_getOriginalId($q_id)));
if ($type !== 'tst') {
ilUtil::sendFailure($lng->txt('tst_link_only_unassigned'), true);
$this->ctrl->redirect($this, 'questions');
return;
}
}
}
$this->createQuestionpoolTargetObject('copyAndLinkQuestionsToPool');
}
示例2: copyAndLinkToQuestionpoolObject
public function copyAndLinkToQuestionpoolObject()
{
global $lng;
require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
foreach ($_REQUEST['q_id'] as $q_id) {
if (!assQuestion::originalQuestionExists($q_id)) {
continue;
}
$type = ilObject::_lookupType(assQuestion::lookupParentObjId(assQuestion::_getOriginalId($q_id)));
if ($type !== 'tst') {
ilUtil::sendFailure($lng->txt('tst_link_only_unassigned'), true);
$this->backObject();
return;
}
}
$this->createQuestionpoolTargetObject('copyAndLinkQuestionsToPool');
}