警告
这是一个破坏性更新,在此版本内我们移除了一些函数,请谨慎更新!
移除的函数
def get_score(self, user_num: str, clazz_id: str, subject_id: str):
pass
def get_topicSets(self, examId):
pass
def get_class_subject_score(self, class_id: str, subject_id: str) -> ClassSubjectScores:
pass
async def __get_class_scores(self, class_id: str, exam_id: str) -> ClassScores:
pass
def get_authheader():
pass
以上的源代码均可以在deleted.py内找到。
get_authheader可以用teacher.get_headers()替换。
教师模块添加的函数
| 函数名 | 参数 | 解释 | 返回 |
|---|---|---|---|
| get_school_exam_classes | school_id subject_id | 获得该学科考试的班级 | List[StuClass] |
| get_exam_subjects | exam_id | 获得本次考试所有学科 | ExtendedList[Subject] |
| get_exam_detail | exam_id | 获得本次考试的信息(等同于学生的get_exams()[0]) | Exam |
| get_scores | exam_id | 获得本次考试全校的信息 | Scores |
| get_marking_progress | subject_id school_id | 获得本次考试某校的阅卷进度 | List[TopicMarkingProgress] |
| get_token | 获得当前登录账户的token | str | |
| get_headers | 获得授权头 | {"token": ""} |
学生模块添加的函数
| 函数名 | 参数 | 解释 | 返回 |
|---|---|---|---|
| get_page_exam | page_index as int | 获得指定页数的考试列表 | Tuple[ExtendedList[Exam], bool],其中最后一个bool为成功标志 |
| get_latest_exam | 获得最新的考试 | ExamInfo | |
| get_exams | 获得所有考试 | ExtendedList[Exam] | |
| get_self_mark | exam_data as Union[Exam, str] has_total_score as bool = True | 获得指定考试的成绩 | Mark(has_total_score为True表示最后会添加一个总分) |
| get_subjects | exam_data as Union[Exam, str] = "" | 获得指定考试的所有学科(无总分) | ExtendedList[Subject] |
| get_subject | exam_data as Union[Exam, str] = "" | 获得指定考试的学科 | Subject |
| get_homeworks | size as int is_complete as bool subject_code as code | 获得指定数量的作业 (稍后解释) | ExtendedList[StuHomework](不含作业资源) |
| get_homework_resources | hwid as str hw_typecode as int | 获取指定作业的作业资源(例如题目文档)(稍后解释) | List[HwResource] |
由于作业功能是首次出现,特此做介绍:
get_homeworks
该方法有四个参数:
size(int)表示返回的数量,默认为20
is_complete(bool)表示是否要取已完成的作业,True为取已完成的,False为取未完成的,默认为False
subject_code(code)表示学科代码,例如"01" 表示取语文作业, "02"表示取数学作业,默认为-1,你可以在Subject类里找到,定义叫做code
get_homework_resources
该方法有2个参数:
hwid(str):作业ID
hw_typecode(int):作业类型代码
