36 $this->map[] = $identifier;
39 public function load(
int $questionId): void
43 $res = $DIC->database()->queryF(
44 "SELECT feedback_id, question, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
49 while ($row = $DIC->database()->fetchAssoc(
$res)) {
52 $identifier->setQuestionId($questionId);
54 $identifier->setQuestionIndex($row[
'question']);
55 $identifier->setAnswerIndex($row[
'answer']);
57 $identifier->setFeedbackId($row[
'feedback_id']);
59 $this->
add($identifier);
68 public function next(): void
75 return key($this->map);
80 return key($this->map) !==
null;
add(ilAssSpecificFeedbackIdentifier $identifier)
const TABLE_NAME_SPECIFIC_FEEDBACK
table name for specific feedback
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getSpecificFeedbackTableName()