Added student_id in the ticket form if is UPM student
new validation method:
Each session will have 3 valid intervals when it is expected that the students will validate that they attended the session. This session will be distributed randomly with a time gap of 5 minutes. This intervals in the database(model of the congress app) are also called AttendanceSlot
In those five minutes the student will read a QR that will be shown in the screen with which will load a new page with a form in the /asistencia endpoint. In this form, the student will introduce his/her student id which will be sent to the back.
Then, the relation between an Attendant (person with a ticket) and AttendanceSlot will be created in a new database table called Attendance which will have only two columns with foreign keys.
If a request is made out of the range of any interval, the backend will ignore the request and just return an error message.
For every request made in a valid interval Attendance model will be created and a request to a blockchain will be made as well which will save the data so the attendance of any student can be validated and no post-process in the database was made.
Changes:
AttendanceSlot
/asistencia
endpoint. In this form, the student will introduce his/her student id which will be sent to the back.AttendanceSlot
will be created in a new database table calledAttendance
which will have only two columns with foreign keys.Attendance
model will be created and a request to a blockchain will be made as well which will save the data so the attendance of any student can be validated and no post-process in the database was made.