obserfy / obserfy

Record keeping and parent communication tool for Montessori schools
https://obserfy.com
GNU Affero General Public License v3.0
14 stars 5 forks source link

Attendance Tracking #248

Open chrsep opened 4 years ago

chrsep commented 4 years ago

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:

  1. userId, who recorded the attendance
  2. studentId, related student
  3. absence, shows whether the student is absent or not
  4. note, to take a note of why the student was absent
  5. classSession, I think we could just use the date of the session to represent this.

Required API

  1. POST attendance data
  2. GET a list of attendance for a specific student
  3. GET a list of all student attendance for a specific class session.
  4. GET a list of class sessions, this includes all past session which already recorded
christianto88 commented 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

christianto88 commented 4 years ago

Currently we already have attendance table that records (studentId, classId, and date). We also have 1 POST endpoint to save the attendance

christianto88 commented 4 years ago

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?

chrsep commented 4 years ago

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

GET a list of all student attendance for a specific class session.

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). image Maybe something like this?

/class/{classId}/attendance/{sessionDate}

Returns:

[
  {
    "studentId": "9iuearn98324fnawin389nuio",
    "name": "Willis",
    "absent": true
  },
  {
    "studentId": "jskdafn498nf93u",
    "name": "Ellie",
    "absent": false
  }
]

GET a list of class sessions, this includes all past session which already recorded

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.

image Maybe we can have something like this?

/class/{classId}/sessions
[
  {
    "date": "Thu 12 asdlkjsdaflk (ISO Date string)"
  },
  {
    "date": "friday 13 asdlkjsdaflk (ISO Date string)"
  }
]
christianto88 commented 4 years ago

Based on the discussion :

  1. class/{classId}/attendance/{session which is a date in YYYY-MM-DD format} will return attendance for that specific session with "absent : true OR false" indicator
  2. /class/{classId}/sessions will just return all the past session without student details
chrsep commented 4 years ago

Yes, thats about it for now.

christianto88 commented 4 years ago

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)

canny[bot] commented 4 years ago

This issue has been linked to a Canny post: Attendance tracking :tada: