<commit_before>json.fields do
  json.questionId answer.question_id
  json.id answer.acting_as.id
  question = answer.question.specific

  json.answer_text answer.answer_text unless question.hide_text
end

json.attachments answer.attachments do |attachment|
  json.(attachment, :name, :id)
end

last_attempt = last_attempt(answer)

json.explanation do
  assessment = answer.submission.assessment
  if last_attempt&.auto_grading&.result
    json.correct last_attempt.correct
    json.explanations last_attempt.auto_grading.result['messages'].map { |e| format_html(e) }
  end
end<commit_msg>Fix continue button not enabled after submitting file upload question<commit_after>json.fields do
  json.questionId answer.question_id
  json.id answer.acting_as.id
  question = answer.question.specific

  json.answer_text answer.answer_text unless question.hide_text
end

json.attachments answer.attachments do |attachment|
  json.(attachment, :name, :id)
end

last_attempt = last_attempt(answer)

json.explanation do
  assessment = answer.submission.assessment
  json.correct last_attempt&.correct
  if last_attempt&.auto_grading&.result
    json.explanations last_attempt.auto_grading.result['messages'].map { |e| format_html(e) }
  else
    json.explanations []
  end
end
{'fraction_non_alphanumeric': 0.08709422011084719, 'fraction_numerical': 0.0, 'mean_word_length': 5.135922330097087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1091943', 'n_tokens_mistral': 407, 'n_tokens_neox': 391, 'n_words': 84}