Skip to content

Commit

Permalink
make sure responsetext is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippImhof committed Aug 7, 2024
1 parent d02e306 commit 47011dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions report.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ public function get_details_for_attempt(int $attemptid): array {
$questionfolder = self::clean_filename($questionfolder);

$details[$questionfolder] = [];
$details[$questionfolder]['questiontext'] = $quba->get_question_summary($slot);
$details[$questionfolder]['responsetext'] = $quba->get_response_summary($slot);
$details[$questionfolder]['questiontext'] = $quba->get_question_summary($slot) ?? '';
$details[$questionfolder]['responsetext'] = $quba->get_response_summary($slot) ?? '';

$qa = $quba->get_question_attempt($slot);
$details[$questionfolder]['attachments'] = $qa->get_last_qt_files('attachments', $quba->get_owning_context()->id);
Expand Down

0 comments on commit 47011dc

Please sign in to comment.