32 $this->previewSession->getNumRequestedHints() > 0
39 SELECT COUNT(qht_hint_id) cnt_available
41 WHERE qht_question_fi = %s
44 $res = $this->db->queryF(
45 $query, array(
'integer'), array($this->previewSession->getQuestionId())
50 if(
$row[
'cnt_available'] > $this->previewSession->getNumRequestedHints() )
65 WHERE qht_question_fi = %s
67 ORDER BY qht_hint_index ASC
70 $res = $this->db->queryF(
71 $query, array(
'integer'), array($this->previewSession->getQuestionId())
74 while(
$row = $this->db->fetchAssoc(
$res) )
83 "no next hint found for questionId={$this->previewSession->getQuestionId()}, userId={$this->previewSession->getUserId()}"
89 $this->previewSession->addRequestedHint($questionHint->
getId());
94 return $this->previewSession->isHintRequested($hintId);
99 return $this->previewSession->getNumRequestedHints();
104 $hintIds = $this->previewSession->getRequestedHints();
108 return $requestedHintsList;
119 $points += $hint->getPoints();
122 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestStatisticData.php';
124 $requestsStatisticData->setRequestsCount($count);
125 $requestsStatisticData->setRequestsPoints($points);
127 return $requestsStatisticData;
An exception for terminatinating execution or to throw for unit testing.
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()
Base Exception for all Exceptions relating to Modules/Test.