123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #!/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)
- from schemas.app.task import (MarkTaskList, MarkTaskDetail, MarkQuestionDetail,
- MarkTaskQuestionList, StudentMarkTaskList,
- StudentMarkTaskDetail, StudentAnswerList,
- MarkProcessList, MarkTaskAnswerList)
- 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}/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]
|