Open chrsep opened 4 years ago
@chrsep We need attendance table with fields (id,studentId,schoold,date). Every day user need to take attendance, and it will be a record for each children each day.
Nb : we need to also prepare what queries that we will use in that page, basically what feature that this page does have
Currently we already have attendance table that records (studentId, classId, and date). We also have 1 POST endpoint to save the attendance
GET a list of all student attendance for a specific class session. What is the parameter for a class session? Time? Date? or this endpoint is to get all attendance for a class Id? GET a list of class sessions, this includes all past session which already recorded Can u please explain more about this endpoint?
I think we should build the simplest API first. And sort of iterate slowly later on what data is required for the response as we build the interface. I still don't have a clear cut idea on the interface design. This design is just an approximation, would likely change in the future
The list of student attendance is for this UI that shows who are present and who are not for a given class session. I think it should just return the student ID, name and the state (absent: boolean). Maybe something like this?
/class/{classId}/attendance/{sessionDate}
Returns:
[
{
"studentId": "9iuearn98324fnawin389nuio",
"name": "Willis",
"absent": true
},
{
"studentId": "jskdafn498nf93u",
"name": "Ellie",
"absent": false
}
]
The list of class sessions would power this UI. Each class would have a session (24 Jan, 23 Jan, etc...). And we would want the user to be able to see all past sessions and probably 1 future session. So s/he can edit its attendance data.
Maybe we can have something like this?
/class/{classId}/sessions
[
{
"date": "Thu 12 asdlkjsdaflk (ISO Date string)"
},
{
"date": "friday 13 asdlkjsdaflk (ISO Date string)"
}
]
Based on the discussion :
Yes, thats about it for now.
POST attendance data (student/{studentId}/attendance) GET a list of attendance for a specific student (student/{studentId}/attendance) GET a list of all student attendance for a specific class session. (school/{schoolId}/class/{classId}/attendance/{session}) GET a list of class sessions, this includes all past session which already recorded (class/{classId}/session)
This issue has been linked to a Canny post: Attendance tracking :tada:
Schools currently track attendance through the observation feature. When a student is absent during a class, they would put a new observation with the title "absent". We should be able to create a dedicated feature to track absence.
It should be fast to access since this is one of the things that the teachers going to do every day. There should be a new page dedicated to handling attendance. It should be accessible directly from the navigation bar.
It is also important to know how many times a student has been absent so that the teacher can follow through with the correct action.
Class Session.
Attendance is tracked per class session (eg. attendance for class A on 27th Jan, for class A on 4th of Feb, etc). Since the list of the session can be extrapolated infinitely to the past and to the future, we should only show all possible past session until the first recorded attendance and 1 upcoming session for each class.
A class has a schedule (eg. every Monday at 9-11 am). One way to get the list of the class sessions is to use these schedule and extrapolate them on the fly.
Holiday
Holidays need to be handled correctly. Teachers shouldn't need to care about attendance when there is a holiday. Class sessions that happen on a Holiday should automatically be recorded as a holiday.
Attendance Data
Every attendance recorded would need to have:
Required API