fix: Fixes retrieval of question grades
Changes the database query to retrieve multiple records instead of a single record. This addresses an issue where only one grade was being fetched even if multiple assessment steps exist for a question attempt, ensuring correct display of all attempts and associated grades.
This commit is contained in:
parent
6692dbb617
commit
0388d71ef9
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ if ($mform->is_cancelled()) {
|
|||
$question = $questions[$question_attempt->questionid];
|
||||
$response = $question_attempt->responsesummary;
|
||||
|
||||
$question_grades = $DB->get_record('question_attempt_steps', array('questionattemptid' => $question_attempt->id));
|
||||
$question_grades = $DB->get_records('question_attempt_steps', array('questionattemptid' => $question_attempt->id));
|
||||
|
||||
foreach ($question_grades as $question_grade) {
|
||||
$attempt_table->data[] = array($question->name, $response, $question_grade->fraction);
|
||||
|
|
Loading…
Reference in a new issue