Skip to content

Commit

Permalink
feat(aincrad): make resub past units ineligible
Browse files Browse the repository at this point in the history
Needs testing
  • Loading branch information
vEnhance committed Sep 3, 2023
1 parent 19e76e0 commit 1ebab2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aincrad/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ def venueq_handler(action: str, data: JSONData) -> JsonResponse:
pset.staff_comments += "\n\n" + "-" * 40 + "\n\n"
pset.staff_comments += data["staff_comments"]
pset.save()
# mark other problem sets for this (student, unit) no longer eligible
if pset.status == "A" and pset.unit is not None:
PSet.objects.filter(
student__user=pset.student.user, unit=pset.unit
).exclude(pk=pset.pk).update(eligible=False)
# Unlock
if (
pset.status == "A"
and original_status in ("P", "PR")
Expand Down

0 comments on commit 1ebab2a

Please sign in to comment.