Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion denis/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def user_to_sub(assignment, component):
relevant_gradeables = (grd_tbl.select()
.where(grd_tbl.assignment == assignment)
.where(grd_tbl.component == component)
.order_by(grd_tbl.timestamp.desc()))
.order_by(-grd_tbl.timestamp))
for user in orbit.db.User.select():
username = user.username
sub = (relevant_gradeables
Expand Down
4 changes: 2 additions & 2 deletions orbit/radius.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def handle_activity(rocket):

submissions = (mailman.db.Submission.select()
.where(mailman.db.Submission.user == rocket.session.username)
.order_by(- mailman.db.Submission.timestamp))
.order_by(-mailman.db.Submission.timestamp))

def submission_fields(sub):
return (datetime.fromtimestamp(sub.timestamp).astimezone().isoformat(),
Expand Down Expand Up @@ -623,7 +623,7 @@ def handle_dashboard(rocket):
grd_tbl = mailman.db.Gradeable
user_gradeables = (grd_tbl.select()
.where(grd_tbl.user == rocket.session.username)
.order_by(grd_tbl.timestamp.desc()))
.order_by(-grd_tbl.timestamp))
assignments = asmt_tbl.select().order_by(asmt_tbl.initial_due_date)
ret = '<form method="post" action="/dashboard">'
for assignment in assignments:
Expand Down