{% extends 'base.html' %} {% load static %} {% block title %}{{ class.name }} - Class Details{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{{ class.name }}

{{ class.code }} | {{ class.academic_year }} | {{ total_students }} Students | {{ total_teachers }} Teachers

Back Edit
Total Students
{{ total_students }}
Capacity: {{ class.capacity|default:"40" }}
Teachers
{{ total_teachers }}
{{ total_subjects }} Subjects
Today's Attendance
{{ today_attendance|default:"0" }}
Section
{{ class.get_section_type_display }}
Room: {{ class.room_number|default:"TBD" }}
Class Information
{{ class.get_section_type_display }}
Code: {{ class.code }}
Level: {{ class.get_level_display }}
Section: {{ class.section|default:"A" }}
Academic Year: {{ class.academic_year }}
Room Number: {{ class.room_number|default:"Not assigned" }}
Capacity:
{{ total_students }}/{{ class.capacity|default:"40" }}
{% with percentage=total_students|divisibleby:class.capacity|default:40|floatformat:0 %}
{% endwith %}
{% if class_teacher %}
Class Teacher
{% if perms_can.staff_edit %} Change {% endif %}
{{ class_teacher.user.first_name|first|upper }}{{ class_teacher.user.last_name|first|upper }}
{{ class_teacher.user.get_full_name }}

{{ class_teacher.phone_number|default:"No phone" }}

{{ class_teacher.user.email }}

{% else %} {% if perms_can.staff_edit %}

No class teacher assigned

Assign Class Teacher
{% endif %} {% endif %}
Subject Teachers ({{ total_teachers }})
{% if teachers %} {% for teacher_data in teachers %}
{{ teacher_data.teacher.user.get_full_name }}
{% for subject in teacher_data.subjects %} {{ subject.name }} {% endfor %}
{{ teacher_data.teacher.phone_number|default:"No phone" }}
{% endfor %} {% else %}

No teachers assigned yet

Assign Teacher
{% endif %}
Students in {{ class.name }} ({{ total_students }})
{% if students %}
{% for student in students %} {% endfor %}
ID Student Gender Age Parent Contact Status Actions
{{ student.student_id }}
{{ student.first_name|first|upper }}{{ student.last_name|first|upper }}
{{ student.first_name }} {{ student.last_name }}
{{ student.get_gender_display }} {{ student.get_age|default:"-" }} {% with parent=student.parents.first %} {% if parent %} {{ parent.phone }} {% else %} {% endif %} {% endwith %} {{ student.get_status_display }}
{% else %}
No students in this class

Add students to {{ class.name }} to see them here

Add Student
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}