• Resolved Mushfiqur

    (@aa11plus)


    Hi Peter,

    I was wondering if you could advise as to how to create a class register, please. I’ve been trying to get my head round it but keep getting confused.

    I’ve got a student table, teacher table and room table; each is a list of names. I’d like to create an attendance register where the teacher signs in students with a ‘present, absent or late’ selection.

    The admin staff will create the register (with a list of students, the teacher in charge and which room) and the teachers will complete the register. Each register will have a unique name and be time stamped too.

    The students should then have the ability to view (only) their attendance record may be in a separate page. The teachers should be able to view (only) their entries as well.

    Just wanted pointers and may be a place to start, please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi aa11plus,

    Interesting question!

    Can I presume that the attendance table is filled correctly? I’m curious how you get this data in the attendance table… 🙂

    The “editable” attendance list is a “little” more complex than a standard list table. Version 3 has a filter (wpda_column_default) and a hook (wpda_extend_list_table) that are just meant to add this kind of functionality.

    For your situation filter wpda_column_default can be used to add a listbox that allow the teacher to select for example present, absent, sick and too late. You then need to add your logic to hook wpda_extend_list_table which performs an ajax request that does the update for a particular student.

    More info about the filter an hook can be found here:
    https://wpdataaccess.com/2020/01/29/filter-wpda_column_default-to-influence-column-layout-in-list-table/
    https://wpdataaccess.com/2020/01/29/action-hook-wpda_extend_list_table-to-add-custom-elements-to-list-tables/

    As I understand very well that this is an advanced topic, I’ll see if I can add a how to video. I just need to find the time, so please be patient. I’ll come back to you…

    Best regards,
    Peter

    Thread Starter Mushfiqur

    (@aa11plus)

    I totally understand; I’ll read through the help links and look forward to your video help.

    Yes, I’ll have a dropdown menu for the teacher to select “present, absent or late”. The admin support will create unique attendance registers with a list of students selected in a similar manner as in your 1-2-many relationship videos (where you can select students to add to modules and courses), and then the tutor will edit the rows assigned to them and select present, absent or late.

    But obviously, there’s the issue of timestamping each entry and ensuring that when a student/tutor logs in, they see only their attendance records in the table.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create a class register…’ is closed to new replies.