masterpi-2124 / cnweb30-backend Goto Github PK
View Code? Open in Web Editor NEWBackend repository for CNWeb-30 Project
Backend repository for CNWeb-30 Project
we have both FE and BE here, yay:
@nghiatm341 please update in swagger config. All CORS enabled.
quizzes
that shows a list of quiz IDs of that classNeed to add this at some point
Also save IP to prevent multiple input from the same machine
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.
Finally, users
## 1. Students submitted more than once handled from front
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
/quizRecords/{quizId}
, it could be great if we have IPList
array containing all IP addresses that have submitted the quiznote
param, change the value to FAIL_EXISTED
instead of the default uninformative a note
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.
studentId
and studentName
, but IP is the failed IPnote
param now is FAIL_DISTANCE
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.
{quizID}?lat=12.12312&lon=32.4343
to some encoded strings so that students can not decode and change lat
and lon
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
note
: FAIL_EXPIRED
Rarely but also need to check that. How should we handle this?
Properties:
like the title, if user want to update some information, they should be able to update the quiz. But should we add thiss? @nghiatm341
Expected these values: "Not Started", "In Progress", "Finished"
right now if I don't specify a formLink, the POST request will return 422 error
each quiz should also have these params:
string
to int
__v
is unusedThis was mentioned in #14 but is closed so I reopened it:
startTime
and endTime
params so not putting much work into the front-end.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
Many API are redundant, using same method, etc.
-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.
Thêm auth cho các routes tương ứng
yeah I fucked up with users lol. Also maybe allow them to change info?
Just found out that with expired quiz, I was still able to PUT new records to the quizRecord after endTime lol @nghiatm341
it is used in Student section, so it has to be public
Cần validate dữ liệu nhận từ api
Làm theo phần validator của hướng dẫn sau: https://viblo.asia/p/bat-dau-nodejs-mongoose-api-authentication-crud-cho-nguoi-moi-hoc-Eb85oa66Z2G
Change quizs to quizzes
Các logic nghiệp vụ sẽ được bàn ở đây, front cần gì back sẽ xử lý
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.