Giter Club home page Giter Club logo

cnweb30-backend's People

Contributors

masterpi-2124 avatar nelly502 avatar nghiatm341 avatar

Watchers

 avatar  avatar

Forkers

ngocjqk

cnweb30-backend's Issues

quizRecoeds bug

image
Problem with PUT /quizRecords/{quiz_id}. also, createdAt is also not needed too

Class API

  • in Class object, it is great to have a param quizzes that shows a list of quiz IDs of that class
  • When deleting a class, all quizzes of this class should be also removed too.
    @nghiatm341

New Quiz

Sau khi chọn class, click Continue hệ thống k chuyển sang giao diện điền thông tin quiz mới.

quizRecord failed cases

## 1. Students submitted more than once
Check student ID and IP address. First, check the IP to prevent further access. then still allow students to submit and return failure if the ID is in the list. That failed record should still be in the records list
handled from front

  • In GET /quizRecords/{quizId}, it could be great if we have IPList array containing all IP addresses that have submitted the quiz
  • Check student ID and return if the ID is in the records
  • In the note param, change the value to FAIL_EXISTED instead of the default uninformative a note

2. The student location is too far

When the quiz asks for a student's location, it will calculate the distance to the teacher's location and return if it is far or not. In the far case, it will prevent the student from going further, but it also should save the IP address in the records to prevent future submissions from the same device.

  • A record can also contain empty studentId and studentName, but IP is the failed IP
  • note param now is FAIL_DISTANCE

3. Incorrect teacher's location

Some users will find a way to change the teacher's location by changing lat and lon in the URL path to their coordination and thus their submission will be valid.

  • Because we can't add that location in the process of creating the quiz (possible but I don't like that), we will need to convert path {quizID}?lat=12.12312&lon=32.4343 to some encoded strings so that students can not decode and change lat and lon
  • some other ways in backend?

4. Expired quiz

Only apply to the case when a student is working on the quiz and press Submit button after the quiz is expired. The response should return an error and still save the record with note is FAIL_EXPIRED

  • Save record with note: FAIL_EXPIRED

5. Submission amount > total students

Rarely but also need to check that. How should we handle this?

new params to quizzes

each quiz should also have these params:

  • status: Incoming, happening, and finished. the status can be achieved by comparing startTime, endTime and current time
  • QR raw image URL. QR logic should be executed right from back end
    proposed changes:
  • change classID type from string to int
  • if possible, change ID to normal number, starting from 1, not random string
  • __v is unused

Quiz status

This was mentioned in #14 but is closed so I reopened it:

  • The quiz should have a status param based on startTime and endTime params so not putting much work into the front-end.

Notification

In case we have time. whenever a quiz, a record or a class is updated, push the message to websocket and show in user's notification dashboard

Unused API

Many API are redundant, using same method, etc.

Class Dashboard

-Sau khi xóa class, thì hệ thống vẫn lưu lại class đó, chỉ xóa thông tin -> cần F5 lại thì class trống đó mới được hệ thống xóa.

  • Note: bug này không tồn tại lúc xóa quiz

New Class

  • Số lượng sinh viên đang có thể âm.
  • Các lớp học sau có thể trùng lặp các lớp học trước ( giống nhau về ID, Subject)

Logic nghiệp vụ

Các logic nghiệp vụ sẽ được bàn ở đây, front cần gì back sẽ xử lý

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.