{% extends "admin/base.html" %} {% block content %}
{% if student.username|length > 0 %} {{ student.username[0]|upper }} {% else %} {% endif %}

{{ student.username }}

{{ 'Active' if student.is_approved else 'Pending' }}

{{ student.email }}

{% if student.teacher %}

Assigned to {{ student.teacher.username }}

{% endif %}
Back to Students Edit Profile {% if student.progress_records.count() == 0 %} {% endif %}

Student Information

Academic Details

  • Roll Number {{ student.roll_number }}
  • Section {{ student.section }}
  • Program {{ student.program|upper }}
  • Department {{ student.department|replace('_', ' ')|title }}

Account Details

  • Status {{ 'Active' if student.is_approved else 'Pending' }}
  • Registration Date {{ student.created_at.strftime('%B %d, %Y') }}
  • Last Login {% if student.last_login and student.last_login is not string %} {{ student.last_login|timeago }} {% else %} Never {% endif %}

Quick Actions

Edit Student Information {% if not student.is_approved %} {% endif %}

Learning Progress

{% set topics_started = student.progress_records.count() %}
Topics Started
{{ topics_started }}
Total topics attempted
{% set completed_count = student.progress_records.filter_by(comprehension_completed=True).count() %}
Topics Completed
{{ completed_count }}
Fully finished topics
Average Score
{% set score_sum = 0 %} {% set score_count = 0 %} {% for progress in student.progress_records %} {% if progress.comprehension_score is not none %} {% set score_sum = score_sum + progress.comprehension_score %} {% set score_count = score_count + 1 %} {% endif %} {% endfor %}
{% if score_count > 0 %} {{ (score_sum / score_count)|round(1) }}% {% else %} N/A {% endif %}
{% if score_count > 0 %} Based on {{ score_count }} assessment{{ 's' if score_count > 1 else '' }} {% else %} No assessments completed {% endif %}
Overall Completion {% if topics_started > 0 %} {% set completion_percentage = (completed_count / topics_started * 100)|round|int %} {% else %} {% set completion_percentage = 0 %} {% endif %} {{ completion_percentage }}% ({{ completed_count }}/{{ topics_started }})
{% if student.progress_records.count() > 0 %}
{% for progress in student.progress_records %} {% endfor %}
Topic Reading Speaking Comprehension Score Last Updated
{{ progress.topic.title }} {% if progress.reading_completed %} Completed {% else %} Not Started {% endif %} {% if progress.speaking_completed %} Completed {% else %} Not Started {% endif %} {% if progress.comprehension_completed %} Completed {% else %} Not Started {% endif %} {% if progress.comprehension_score is not none %} {{ progress.comprehension_score|round(1) }}% {% else %} N/A {% endif %} {{ progress.updated_at|timeago }}
{% else %}

No Progress Data

This student hasn't started any topics yet.

{% endif %}

Recent Activity

{% set submissions = student.submissions|default([]) %} {% if submissions|length > 0 %}
    {% for submission in submissions[:5] %}
  • {% if not loop.last %} {% endif %}
    {% if submission.type == 'reading' %} {% elif submission.type == 'speaking' %} {% elif submission.type == 'comprehension' %} {% else %} {% endif %}
    {% if submission.topic %} {{ submission.topic.title }} {% else %} Unknown Topic {% endif %}

    {{ submission.created_at|timeago }}

    Completed {{ submission.type|title }} section {% if submission.score is not none %} with a score of {{ submission.score|round(1) }}% {% endif %}

  • {% endfor %}
{% else %}

No Recent Activity

This student hasn't submitted any work yet.

{% endif %}
{% endblock %}