Skip to content

Commit

Permalink
Add numbering to course students (#78)
Browse files Browse the repository at this point in the history
- Explicitly order names by first name, in case of a last name conflict
(**EDIT: Removed from PR**)
- The way to sort stuff in cases of identical values is not in the SQL
specification, so we can't rely on that sorting a specific way.
- Adds a counter to the names (see below)


![image](https://github.com/user-attachments/assets/80fbf70d-f018-4605-8bbc-b87a32d1169e)
  • Loading branch information
JasonGrace2282 authored Nov 26, 2024
1 parent 6a43c84 commit 46efde4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tin/templates/assignments/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ <h2 style="border-top:1px solid lightgray;padding-top:15px;">Filter Submissions<
{% if assignment.is_quiz %}
<table id="submission-list" class="has-border">
<tr>
<th style="min-width:20px"></th>
<th style="min-width:125px">Student</th>
{% if not active_period.name %}
<th style="min-width:65px;">Period</th>
Expand All @@ -127,6 +128,7 @@ <h2 style="border-top:1px solid lightgray;padding-top:15px;">Filter Submissions<
</tr>
{% for student, period, latest_submission, graded_submission, ended, quiz_issues in students_and_submissions %}
<tr>
<td style="text-align: center">{{ forloop.counter }}</tr>
<td><a href="{% url 'assignments:student_submission' assignment.id student.id %}">{{ student.full_name }}
({{ student.username }})</a></td>
{% if not active_period.name %}
Expand Down Expand Up @@ -155,6 +157,7 @@ <h2 style="border-top:1px solid lightgray;padding-top:15px;">Filter Submissions<
{% else %}
<table id="submission-list" class="has-border">
<tr>
<th style="min-width:20px"></th>
<th style="min-width:125px">Student</th>
{% if not active_period.name %}
<th style="min-width:65px;">Period</th>
Expand All @@ -168,6 +171,7 @@ <h2 style="border-top:1px solid lightgray;padding-top:15px;">Filter Submissions<
</tr>
{% for student, period, latest_submission, graded_submission, new_login, new_24 in students_and_submissions %}
<tr>
<td style="text-align:center">{{ forloop.counter }}</td>
<td><a href="{% url 'assignments:student_submission' assignment.id student.id %}">{{ student.full_name }}
({{ student.username }})</a></td>
{% if not active_period.name %}
Expand Down

0 comments on commit 46efde4

Please sign in to comment.