Giter Club home page Giter Club logo

course-plus's Introduction

SJTUPlus

How to startup

  1. Install dependencies
    $ pip3 install -r requirements.txt
    
  2. Create database
    $ python3 manage.py makemigrations
    $ python3 manage.py migrate
    
  3. Create Superuser
    $ python3 manage.py createsuperuser
    
  4. Load database backup
    $ python3 manage.py loaddata /path/to/backup.json
    
  5. Run the server
    # To run a debug server
    $ python3 manage.py runserver
    # To run a production server
    # This will collect the static resources to /static-files
    # You need another web server to host the static resources
    $ python3 manage.py collectstatics 
    $ gunicorn -c gunicorn.conf.py SJTUPlus.wsgi:application
    
  6. Run the db watcher
    python3 manage.py watch groups
    

文档

/api/sjtu/canteen

返回各食堂的总座位数、总就餐人数、总剩余座位数

/api/sjtu/canteen/all

返回各食堂及其各子区域的座位数、就餐人数、剩余座位数

/api/sjtu/canteen/[canteen_id]

根据食堂的 canteen_id 返回该食堂各子区域的座位数、就餐人数、剩余座位数

/api/sjtu/library

返回各图书馆的在馆人数与限流人数

/api/sjtu/cainiao

返回菜鸟驿站的实时人数与限流人数

/api/sjtu/bathroom

返回各浴室的机位使用情况

/api/sjtu/washing_machine/[machine_id]

返回机器编号为 machine_id 的洗衣机使用情况,仅对部分商户的机型有效

/api/course/lesson?term=[term]

查询用户 term 学期的课程表,学期格式形如 2021-2022-1。用户需通过 /login?scope=lessons 完成 jAccount 登录并提供 课程表查询 授权。

/api/course/lesson_info?code_list=[code_list]

查询教学班编号列表 code_list 中的教学班的信息,教学班编号以逗号隔开形如 (2020-2021-1)-AB202-1,(2020-2021-1)-AB203-1。学期的课程表,学期格式形如 2021-2022-1。用户需进行 jAccount 登录方可访问此数据。该数据非实时数据。

/api/user/profile

查询当前用户的身份,信息包括姓名、jAccount账号、学工号、所属部门/学院、账号类型、账号类型名、班号(若有)、身份状态(若有)、身份过期日期(若有)。

/api/user/info

查询当前用户的身份,信息包括姓名、jAccount账号、学工号、账号类型、账号类型名。

/login?app=[app]&scope=[scope]&redirecturi=[redirecturi]

跳转到 jAccount 登录页。可选的 app 参数提供了一些预设的 scoperedirecturi 参数组合,这些组合可通过额外指定 scoperedirecturi 参数进行覆盖。所有参数忽略时,登录后将跳转到首页。

/authorize?code=[code]&state=[state]

用户完成 jAccount 登录后,将携带 codestate 返回此处完成 OAuth 认证。

/logout?app=[app]&redirecturi=[redirecturi]&state=[state]

退出本网站和 jAccount 的登录。可选的 app 参数提供了一些预设的 redirecturi 参数,可通过额外指定 redirecturi 参数进行覆盖。所有参数忽略时,登录后将跳转到首页。

course-plus's People

Contributors

ao7777 avatar danyang685 avatar lonelyotter avatar luminousxlb avatar photonquantum avatar qiuhuiming avatar sharpxk avatar skyzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

course-plus's Issues

add tutorial

Now course-plus has a lot of functionalities. We could tutor our users for their specific needs.

  • Create your calendar: filter your class with class composition, and use virtual arrangement to export calendar
  • Find your courses: ...

apply fixtures in iCalendar integration

We can define some fixtures including:

  • 国庆调休
  • 新生调休
  • ...

When user checks these fixtures, their iCalendar exports will automatically move some courses to the corresponding dates.

希望搜索时自动去除字符串的头尾空格

目前的 课程名称/新旧课程号 上课时间 等各项搜索功能似乎使用的是未经处理的字符串匹配。然而,当用户从其他地方复制文本粘贴至搜索框中时,很容易由于种种原因在字符串头尾引入多余空格,导致无法正常搜索。

希望可以对这一功能的实现略做改进。

split out data source

Currently all data are loaded in App.vue. At the same time, some data are passed through components with props for multiple times, which is very hard to maintain. We want to refactor the course-plus, to split data loading into a service.

Feature Request: Show the max number of students in the course if possible

Just as the title said, this is pretty useful if students want to check out whether they could join a course before the second turn of joining courses begins, if there's a way to getting know of these info (although it seems that we can not check this out at i.sjtu.edu.cn/design/funcData_cxFuncDataList.html) .

Also, it would be better if currently how many students have joined the course are shown as well.

Refactor with React

The current Vue version is hard to maintain. We could use React for a clearer data flow.

refactor class table

Currently, ClassTable shares a lot components with course planning, which leads to a PlanForm with a lot of branches. We plan to

  • separate these two components
  • enhance jAccount login experience

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.