32 $this->previewSession->getNumRequestedHints() > 0
39 SELECT COUNT(qht_hint_id) cnt_available 41 WHERE qht_question_fi = %s 44 $res = $this->db->queryF(
47 array($this->previewSession->getQuestionId())
50 $row = $this->db->fetchAssoc(
$res);
52 if ($row[
'cnt_available'] > $this->previewSession->getNumRequestedHints()) {
66 WHERE qht_question_fi = %s 68 ORDER BY qht_hint_index ASC 71 $res = $this->db->queryF(
74 array($this->previewSession->getQuestionId())
77 while ($row = $this->db->fetchAssoc(
$res)) {
84 "no next hint found for questionId={$this->previewSession->getQuestionId()}, userId={$this->previewSession->getUserId()}" 90 $this->previewSession->addRequestedHint($questionHint->
getId());
95 return $this->previewSession->isHintRequested($hintId);
100 return $this->previewSession->getNumRequestedHints();
105 $hintIds = $this->previewSession->getRequestedHints();
109 return $requestedHintsList;
119 $points += $hint->getPoints();
123 $requestsStatisticData->setRequestsCount($count);
124 $requestsStatisticData->setRequestsPoints($points);
126 return $requestsStatisticData;
static getInstanceById($hintId)
creates a hint object instance, loads the persisted hint dataset identified by passed hint id from da...
Base Exception for all Exceptions relating to Modules/Test.
getId()
returns the hint id
static getListByHintIds($hintIds)
instantiates a question hint list for the passed hint ids
foreach($_POST as $key=> $value) $res
__construct(ilDBInterface $db, ilAssQuestionPreviewSession $previewSession)
getRequestStatisticData()
storeRequest(ilAssQuestionHint $questionHint)