本文整理匯總了PHP中assQuestion::getReachedPoints方法的典型用法代碼示例。如果您正苦於以下問題:PHP assQuestion::getReachedPoints方法的具體用法?PHP assQuestion::getReachedPoints怎麽用?PHP assQuestion::getReachedPoints使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類assQuestion
的用法示例。
在下文中一共展示了assQuestion::getReachedPoints方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateQuestionResult
/**
* update question result of run
* @param ilTestSession $session
* @param assQuestion $qst
*/
protected function updateQuestionResult(ilTestSession $session, assQuestion $qst)
{
foreach ($this->run as $run) {
if ($run->questionExists($qst->getId())) {
$GLOBALS['ilLog']->write(__METHOD__ . ': reached points are ' . $qst->getReachedPoints($session->getActiveId(), $session->getPass()));
$run->setQuestionResult($qst->getId(), $qst->getReachedPoints($session->getActiveId(), $session->getPass()));
$run->update();
$res = $run->getResult();
include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
include_once './Modules/Course/classes/Objectives/class.ilLOUtils.php';
$old_result = ilLOUserResults::lookupResult($this->container_id, $this->user_id, $run->getObjectiveId(), $this->getSettings()->getQualifiedTest() == $session->getRefId() ? ilLOUserResults::TYPE_QUALIFIED : ilLOUserResults::TYPE_INITIAL);
$ur = new ilLOUserResults($this->container_id, $this->user_id);
$ur->saveObjectiveResult($run->getObjectiveId(), $this->getSettings()->getQualifiedTest() == $session->getRefId() ? ilLOUserResults::TYPE_QUALIFIED : ilLOUserResults::TYPE_INITIAL, ilLOUtils::isCompleted($this->container_id, $session->getRefId(), $run->getObjectiveId(), $res['max'], $res['reached'], $old_result['limit_perc']) ? ilLOUserResults::STATUS_COMPLETED : ilLOUserResults::STATUS_FAILED, (int) $res['percentage'], $old_result['limit_perc'], $old_result['tries'], $old_result['is_final']);
$GLOBALS['ilLog']->write(__METHOD__ . ': ' . print_r($run->getResult(), true));
include_once "./Services/Tracking/classes/class.ilLPStatusWrapper.php";
ilLPStatusWrapper::_updateStatus($this->container_id, $this->user_id);
}
}
return false;
}