本文整理汇总了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;
}