public function get_question_states($attempt, $question, moodle_recordset $questionsstatesrs) { $qstates = array(); while ($questionsstatesrs->valid()) { $state = $questionsstatesrs->current(); if ($state->attempt != $attempt->uniqueid || $state->question != $question->id) { // We have found all the states for this attempt. Stop. break; } // Add the new state to the array, and advance. $qstates[] = $state; $questionsstatesrs->next(); } return $qstates; }
public function next() { $this->rs->next(); }