diff --git a/textdownload.php b/textdownload.php
index 35d864a1c0c823e99bbe6db2a0e36acedd55bace..0e8f903059c4f6842c42675b5e53c085cbf6c616 100644
--- a/textdownload.php
+++ b/textdownload.php
@@ -62,7 +62,8 @@ $question->apply_attempt_state($qa->get_step(0));
 // We have a slight problem accessing the user connected to that attempt and
 // therefore this will only work with `quiz` type activities for now.
 $params = [$qa->get_usage_id(), 'mod_quiz'];
-$tmp = $DB->get_record_sql('SELECT qas.userid FROM {quiz_attempts} qas, {question_usages} qu WHERE qu.id = ? AND qu.component = ? AND qu.id = qas.uniqueid;', $params, IGNORE_MISSING);
+$tmp = $DB->get_record_sql('SELECT qas.userid FROM {quiz_attempts} qas, {question_usages} qu ' .
+    'WHERE qu.id = ? AND qu.component = ? AND qu.id = qas.uniqueid;', $params, IGNORE_MISSING);
 $usageuser = -1;
 if ($tmp !== false) {
     $usageuser = $tmp->userid;