Skip to content

Commit

Permalink
添加 最终试炼 的适配 (#16)
Browse files Browse the repository at this point in the history
taskType = 3
  • Loading branch information
immccn123 authored Aug 20, 2023
1 parent 6bd0294 commit 91bd1cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def complete_vacation_task_stage(t, vc, subject_id, stage_id):
vc["id"],
)
problem_details = []
problem_count = len(problems)
for index, problem in enumerate(problems):
problem_type = problem["type"]
ans = []
Expand Down Expand Up @@ -264,6 +265,7 @@ def complete_vacation_task_stage(t, vc, subject_id, stage_id):
)
if index == len(problems) - 1:
finalsubmit_vacation_stage_problem(t["id"], problem_details)
print(f"\t\t完成练习 ({index + 1}/{problem_count})")


def complete_vacation(vc):
Expand All @@ -283,12 +285,13 @@ def complete_vacation(vc):
for t in tasks:
if t["type"] == 1:
complete_vacation_task_video(t, tl)
elif t["type"] == 2:
elif t["type"] in (2, 3):
complete_vacation_task_stage(
t, vc, subject_id=subject_id, stage_id=stage_id
)



def run():
unfinished_homework = get_unfinished_homework()
expired_homework = get_expired_homework()
Expand Down

0 comments on commit 91bd1cf

Please sign in to comment.