Fix point checking
This commit is contained in:
parent
1bcdc0839f
commit
0cbb641426
1 changed files with 13 additions and 6 deletions
|
@ -87,13 +87,20 @@ class Parser:
|
|||
|
||||
def __filter(self, all_submissions: Dict[str, List[Submission]]) -> None:
|
||||
for _, submissions in all_submissions.items():
|
||||
length = len(submissions)
|
||||
i = -1
|
||||
while not submissions[i].submitted_before_deadline and i >= -length:
|
||||
i -= 1
|
||||
if not submissions[0].submitted_before_deadline:
|
||||
continue
|
||||
|
||||
if i >= -length:
|
||||
submissions[i].flag = "REVIEW"
|
||||
length = len(submissions)
|
||||
max_i = 0
|
||||
|
||||
for i in range(1, length):
|
||||
if not submissions[i].submitted_before_deadline:
|
||||
break
|
||||
|
||||
if submissions[i].points >= submissions[max_i].points:
|
||||
max_i = i
|
||||
|
||||
submissions[max_i].flag = "REVIEW"
|
||||
|
||||
def __correct_errors(self, all_submissions: Dict[str, List[Submission]]) -> None:
|
||||
response = input("Do you wish to fix errors? ").strip()
|
||||
|
|
Reference in a new issue