Commit 23d96b25 by Brian Wilson

change submission history to be ordered by id

parent 1c47573b
...@@ -663,13 +663,13 @@ def submission_history(request, course_id, student_username, location): ...@@ -663,13 +663,13 @@ def submission_history(request, course_id, student_username, location):
.format(student_username, location)) .format(student_username, location))
history_entries = StudentModuleHistory.objects \ history_entries = StudentModuleHistory.objects \
.filter(student_module=student_module).order_by('-created') .filter(student_module=student_module).order_by('-id')
# If no history records exist, let's force a save to get history started. # If no history records exist, let's force a save to get history started.
if not history_entries: if not history_entries:
student_module.save() student_module.save()
history_entries = StudentModuleHistory.objects \ history_entries = StudentModuleHistory.objects \
.filter(student_module=student_module).order_by('-created') .filter(student_module=student_module).order_by('-id')
context = { context = {
'history_entries': history_entries, 'history_entries': history_entries,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment