1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from fastapi import APIRouter
- from app.api.endpoints.review.task import (get_mark_tasks, get_mark_task, get_task_questions,
- mark_question, get_student_tasks, get_student_answers,
- get_student_task, download_student_task,
- task_mark_process, get_task_answers,
- mark_process_by_student)
- from schemas.app.task import (MarkTaskList, MarkTaskDetail, MarkQuestionDetail,
- MarkTaskQuestionList, StudentMarkTaskList, StudentMarkTaskDetail,
- StudentAnswerList, MarkProcessList, MarkTaskAnswerList,
- StudentMarkProcessList)
- router = APIRouter(tags=["作业/考试中心-教师学生端"])
- router.add_api_route("/tasks",
- get_mark_tasks,
- methods=["get"],
- response_model=MarkTaskList,
- response_model_exclude_none=True,
- summary="阅卷任务列表")
- router.add_api_route("/tasks/{tid}",
- get_mark_task,
- methods=["get"],
- response_model=MarkTaskDetail,
- response_model_exclude_none=True,
- summary="阅卷任务详情")
- router.add_api_route("/tasks/{tid}/answers",
- get_task_answers,
- methods=["get"],
- response_model=MarkTaskAnswerList,
- response_model_exclude_none=True,
- summary="作业/考试中心 - 答题分析")
- router.add_api_route("/tasks/{tid}/process",
- task_mark_process,
- methods=["get"],
- response_model=MarkProcessList,
- response_model_exclude_none=True,
- summary="试题批阅进度-按试题")
- router.add_api_route("/tasks/{tid}/stu-process",
- mark_process_by_student,
- methods=["get"],
- response_model=StudentMarkProcessList,
- response_model_exclude_none=True,
- summary="试题批阅进度-按学生")
- router.add_api_route("/tasks/{tid}/questions",
- get_task_questions,
- methods=["get"],
- response_model=MarkTaskQuestionList,
- response_model_exclude_none=True,
- summary="批阅试题列表")
- router.add_api_route("/tasks/{tid}/questions/{qid}",
- mark_question,
- methods=["put"],
- response_model=MarkQuestionDetail,
- response_model_exclude_none=True,
- summary="批阅试题")
- router.add_api_route("/stutasks",
- get_student_tasks,
- methods=["get"],
- response_model=StudentMarkTaskList,
- response_model_exclude_none=True,
- summary="作业/考试中心 - 学生阅卷任务列表")
- router.add_api_route("/stutasks/download",
- download_student_task,
- methods=["get"],
- summary="作业/考试中心 - 学生阅卷任务列表导出")
- router.add_api_route("/stutasks/{tid}",
- get_student_task,
- methods=["get"],
- response_model=StudentMarkTaskDetail,
- response_model_exclude_none=True,
- response_model_exclude_unset=True,
- summary="作业/考试中心 - 学生阅卷任务详情")
- router.add_api_route("/stutasks/{tid}/answers",
- get_student_answers,
- methods=["get"],
- response_model=StudentAnswerList,
- response_model_exclude_none=True,
- summary="作业/考试中心 - 学生答题详情分析")
- __all__ = [router]
|