{% extends "base.html" %} {% block extra_css %} {% endblock %} {% block extra_js %} {% endblock %} {% block content %}
{% if topic.comprehension_questions %}
{{ form.csrf_token }}
{% for question in topic.comprehension_questions[:3] %}

Question {{ loop.index }} of 3

{{ question.text }}

0 characters

Tip: Mention one specific detail from the reading to improve relevance.

{% endfor %}
{% else %}

Generating comprehension questions...

Please wait while our AI analyzes the content.

{% endif %} {% if previous_submissions and previous_submissions[0] and previous_submissions[0].parsed_feedback %} {% set latest = previous_submissions[0] %}

AI Assessment

Comprehensive evaluation of your answers

Last Updated
{{ latest.created_at.strftime('%B %d, %Y') }}
{% for item in latest.parsed_feedback %}
Question {{ loop.index }} {{ 'Provisional' if item.provisional else 'Full' }}

{{ item.question }}

Your Answer

{{ item.answer or 'No answer provided' }}

Grammar

{{ item.grammar_analysis.errors|length if item.grammar_analysis and item.grammar_analysis.errors else 0 }} issue(s)

Spelling

{{ item.spelling_errors|length if item.spelling_errors else 0 }} issue(s)

Overall Score

{{ item.overall_score|default(item.question_score|default(item.score|default(0))) }}

{{ item.grammar_score|default(0) }}
Grammar
{{ item.question_score|default(item.score|default(0)) }}
Question
{% if item.strengths %}
What You Did Well

{{ item.strengths }}

{% endif %} {% if item.suggestions or item.improvements %}
How to Improve

{{ item.improvements or item.suggestions }}

{% endif %} {% if item.grammar_analysis and item.grammar_analysis.errors and item.grammar_analysis.errors|length > 0 %}
Grammar Corrections
{% for error in item.grammar_analysis.errors %}
Before: "{{ error.original }}"
After: "{{ error.corrected }}"
💡 {{ error.explanation }}
{% endfor %}
{% endif %} {% if item.spelling_errors and item.spelling_errors|length > 0 %}
Spelling Corrections
{% for error in item.spelling_errors %}
Wrong: "{{ error.original }}"
Correct: "{{ error.corrected }}"
{% if error.explanation %}
💡 {{ error.explanation }}
{% endif %}
{% endfor %}
{% endif %} {% if item.corrections is iterable and item.corrections|length > 0 %}
✏️ Corrections
    {% for c in item.corrections %}
  • {{ c }}
  • {% endfor %}
{% endif %} {% if item.corrected_answer and item.corrected_answer != item.answer %}
✅ Suggested Correction

"{{ item.corrected_answer }}"

This is how your answer could be improved while keeping your meaning.

{% endif %}
{% endfor %}
{% endif %} {% if progress.comprehension_score and progress.comprehension_score >= 70 %}

Congratulations! You've successfully completed this topic with a score of {{ progress.comprehension_score|round(1) }}%.

Complete This Topic
{% endif %}
{% endblock %}