Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

SecureCats/Evaluation_BackEnd

Repository files navigation

📊 Evaluation Backend

FATES: The Fully Anonymous Teaching Evaluation System

📦 架构

TES 匿名课程评价平台架构基于 Opaak(开放匿名身份认证架构)和零知识证明的理论支持。请参考:SecureCats/RelatedWork

整体架构

目录结构

仓库主要包含 TES 服务端内容。其中 Evaluation_FrontEnd/ 路径为 submodule,链接至 TES 前端项目:SecureCats/Evaluation_FrontEnd

.
├── Evaluation_BackEnd // TES 服务端
├── Evaluation_FrontEnd // TES 前端(以 submodule 形式链接)
│   ├── ...
│   └── src // TES 前端(工程源代码)
├── ...
└── rpsite // TES 服务端(工程源代码)
    └── ...

项目技术

🗂 部署

由于项目包含有前后端全部内容,因此克隆项目至本地时需要将 submodule 也进行克隆。具体方法为:

git clone --recursive https://github.com/SecureCats/Evaluation_BackEnd.git

更多有关 submodule 的使用请参考:Working with submodules.

由于前后端需要同时部署,因此需要先 build 前端项目,再运行后端项目。具体操作如下:

前端环境部署

  1. 配置环境
  1. 安装依赖
yarn install
  1. 编译静态文件
yarn build

服务端环境部署

  1. 配置环境
  1. 安装依赖
pipenv install
  1. 进入 Python 虚拟环境
pipenv shell
  1. 初始化 Django 框架和数据库
# Migrate 数据库
python manage.py migrate

# 创建管理员账户
python manage.py createsuperuser
  1. 启动服务器
python manage.py runserver

评教页面位于:https://localhost:8000/class/{class}/semester/{semester}

管理页面位于:http://localhost:8000/admin/(末尾 / 不能省略)

🎁 API

初始化 Initialization

获取评教任务:/api/v1/init?classno={class_no}&semester={semester}

认证身份 Authentication

认证:/api/v1/auth?course_no={course_no}&class_no={classno}

POST:

{
  "credentials": "{credentials}"
}

返回结果 Response:

{
  "status": "accept" // "denied" || "evaluated"
}

提交结果 Result

提交评教结果:/api/v1/result?course_no={course_no}&classno={classno}

POST:

{
  "rnym": "{rnym}",
  "result": {
    "1" : "A",
    "2" : "B",
    ...
  }
}

📊 Evaluation Backend ©SecureCats. Released under the MIT License.

Authored and maintained by Team SecureCats.

© 2019 Made with 🖤 from BIT.

About

TES main repo. (Teaching Evaluation System)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •