Sets up attendance collection for a new lecture session:

  1. Validates user role.
  2. Initializes memory references for the lecture.
  3. Fetches server settings.
  4. Schedules periodic updates and timeouts.
  5. Retrieves or initializes student attendance lists.

handleCreateAttendanceCollection

  • Parameters

    • socket: AuthenticatedSocket

      The Socket.IO client socket

    • io: Server

      The Socket.IO server instance

    • lectureid: string

      Unique identifier for the lecture

    • lectureData: LectureData

      Shared store of lecture metadata

    • notYetPresentStudents: AttendanceRecord

      Shared store of students not yet present

    • presentStudents: AttendanceRecord

      Shared store of students currently present

    • lectureTimeoutIds: LectureTimeoutMap

      Map of lecture IDs to their timeout references

    • listOfIpAlreadyUsedLecture: any

    Returns Promise<void>