Skip to content

Commit

Permalink
updated assignment due date display on student side
Browse files Browse the repository at this point in the history
  • Loading branch information
arielfayol37 committed Nov 21, 2023
1 parent 19fc72d commit 37f2ac4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deimos/templates/deimos/assignment_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
{% if assignment.assigned_date %}
<p class="timestamp">Assigned on {{ assignment.assigned_date|format_date }}</p>
{% endif %}
{% if assignment.due_date %}
<p class="timestamp">Due on {{ assignment.due_date|format_date }}</p>
{% if ass.due_date %}
<p class="timestamp">Due on {{ ass.due_date|format_date }}</p>
{% endif %}
</div>
{% if status %}
{% if ass.get_status %}
<button type="button" class="btn status edit-btn" style="position: absolute; bottom: 2%;">
Completed
</button>
Expand Down
4 changes: 2 additions & 2 deletions deimos/templates/deimos/course_management.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h4>{{course.name}}</h4>

<!-- Display course's assignments -->
<ul class="courses course-list">
{% for assignment, status in assignments %}
{% include 'deimos/assignment_display.html' with assignment=assignment course=course status=status %}
{% for assignment, ass in assignments %}
{% include 'deimos/assignment_display.html' with assignment=assignment course=course ass=ass %}
{% endfor %}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion deimos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def course_management(request, course_id):
if course.name != 'Question Bank':
for assignment in assignments:
ass, created = AssignmentStudent.objects.get_or_create(assignment= assignment, student=student)
as_statuses.append(ass.get_status())
as_statuses.append(ass)

context = {
"student":student,
Expand Down

0 comments on commit 37f2ac4

Please sign in to comment.