本文整理汇总了PHP中assQuestion::_needsManualScoring方法的典型用法代码示例。如果您正苦于以下问题:PHP assQuestion::_needsManualScoring方法的具体用法?PHP assQuestion::_needsManualScoring怎么用?PHP assQuestion::_needsManualScoring使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类assQuestion
的用法示例。
在下文中一共展示了assQuestion::_needsManualScoring方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertQuestionsCmd
private function insertQuestionsCmd()
{
$selected_array = is_array($_POST['q_id']) ? $_POST['q_id'] : array();
if (!count($selected_array)) {
ilUtil::sendInfo($this->lng->txt("tst_insert_missing_question"), true);
$this->ctrl->redirect($this, self::CMD_BROWSE_QUESTIONS);
}
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$testQuestionSetConfig = $this->buildTestQuestionSetConfig();
$manscoring = FALSE;
foreach ($selected_array as $key => $value) {
$last_question_id = $this->testOBJ->insertQuestion($testQuestionSetConfig, $value);
if (!$manscoring) {
$manscoring = $manscoring | assQuestion::_needsManualScoring($value);
}
}
$this->testOBJ->saveCompleteStatus($testQuestionSetConfig);
if ($manscoring) {
ilUtil::sendInfo($this->lng->txt("manscoring_hint"), TRUE);
} else {
ilUtil::sendSuccess($this->lng->txt("tst_questions_inserted"), TRUE);
}
//$this->ctrl->setParameter($this, 'q_id', $last_question_id); // for page view ?
$this->ctrl->redirectByClass($this->getBackTargetCmdClass(), $this->getBackTargetCommand());
}
示例2: insertQuestions
function insertQuestions()
{
$selected_array = is_array($_POST['q_id']) ? $_POST['q_id'] : array();
if (!count($selected_array)) {
ilUtil::sendInfo($this->lng->txt("tst_insert_missing_question"), true);
$this->ctrl->redirect($this, "browseForQuestions");
} else {
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$manscoring = FALSE;
global $tree, $ilDB, $ilPluginAdmin;
require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
$testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $this->test_object);
$testQuestionSetConfig = $testQuestionSetConfigFactory->getQuestionSetConfig();
foreach ($selected_array as $key => $value) {
$last_question_id = $this->test_object->insertQuestion($testQuestionSetConfig, $value);
if (!$manscoring) {
$manscoring = $manscoring | assQuestion::_needsManualScoring($value);
}
}
$this->test_object->saveCompleteStatus($testQuestionSetConfig);
if ($manscoring) {
ilUtil::sendInfo($this->lng->txt("manscoring_hint"), TRUE);
} else {
ilUtil::sendSuccess($this->lng->txt("tst_questions_inserted"), TRUE);
}
$this->ctrl->setParameter($this, 'q_id', $last_question_id);
$this->ctrl->redirect($this, "showPage");
return;
}
}
示例3: insertQuestionsObject
/**
* Insert questions from the questionbrowser into the test
*
* @access public
*/
function insertQuestionsObject()
{
$selected_array = is_array($_POST['q_id']) ? $_POST['q_id'] : array();
if (!count($selected_array)) {
ilUtil::sendInfo($this->lng->txt("tst_insert_missing_question"), true);
$this->ctrl->redirect($this, "browseForQuestions");
} else {
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$manscoring = FALSE;
foreach ($selected_array as $key => $value) {
$this->object->insertQuestion($this->testQuestionSetConfigFactory->getQuestionSetConfig(), $value);
if (!$manscoring) {
$manscoring = $manscoring | assQuestion::_needsManualScoring($value);
}
}
$this->object->saveCompleteStatus($this->testQuestionSetConfigFactory->getQuestionSetConfig());
if ($manscoring) {
ilUtil::sendInfo($this->lng->txt("manscoring_hint"), TRUE);
} else {
ilUtil::sendSuccess($this->lng->txt("tst_questions_inserted"), TRUE);
}
$this->ctrl->redirect($this, "questions");
return;
}
}