46 $this->previewSession->getNumRequestedHints() > 0
53 SELECT COUNT(qht_hint_id) cnt_available
55 WHERE qht_question_fi = %s
58 $res = $this->db->queryF(
61 array($this->previewSession->getQuestionId())
64 $row = $this->db->fetchAssoc(
$res);
66 if ($row[
'cnt_available'] > $this->previewSession->getNumRequestedHints()) {
80 WHERE qht_question_fi = %s
82 ORDER BY qht_hint_index ASC
85 $res = $this->db->queryF(
88 array($this->previewSession->getQuestionId())
91 while ($row = $this->db->fetchAssoc(
$res)) {
98 "no next hint found for questionId={$this->previewSession->getQuestionId()}, userId={$this->previewSession->getUserId()}"
104 $this->previewSession->addRequestedHint($questionHint->
getId());
109 return $this->previewSession->isHintRequested($hintId);
114 return $this->previewSession->getNumRequestedHints();
119 $hintIds = $this->previewSession->getRequestedHints();
123 return $requestedHintsList;
133 $points += $hint->getPoints();
137 $requestsStatisticData->setRequestsCount($count);
138 $requestsStatisticData->setRequestsPoints($points);
140 return $requestsStatisticData;
static getListByHintIds($hintIds)
instantiates a question hint list for the passed hint ids
static getInstanceById($hintId)
creates a hint object instance, loads the persisted hint dataset identified by passed hint id from da...
getId()
returns the hint id
storeRequest(ilAssQuestionHint $questionHint)
__construct(ilDBInterface $db, ilAssQuestionPreviewSession $previewSession)
getRequestStatisticData()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...