User Tools

Site Tools


work_projects:moodle_attendance

Moodle Attendance System

I am currently in the process of writing an attendance system for Moodle for DBC.

We only found a couple existing ones and they didn't do what we need.

I'll list information and plans here as I work on it.

Current Project Status

(I'll clean this section out now and then)

2009-09-11:

The shortname for the Attendance Administration Course is now a configuration option.

I'm trying to optimize code and move frequently used code sections into functions.

I think I have the redundant includes removed now…

2009-08-11:

I created a new table to store campus information.

Now I need to create a configuration page for the campuses.

2009-08-07:

The Configuration Form can now set or change the policy for any term.

I THINK I have all the reports using the configuration data for absences/tardies/etc. now.

I think everything is using the configuration values for absent/present/tardy now.

Trying to figure out how I'm going to handle multiple campuses in the configuration system and then in the main code.

2009-08-04:

I have created the configuration table and a basic management interface to create and modify the default attendance policy and the policy for the current term.

I am now working on changing the rest of the system to use this configuration data instead of the current hard-coded values.

Goals

To create a fully functional attendance system for Moodle to fit our school setup.

Our School Setup

Here is how our school is basically setup so you get a feel for what I'm working with.

Campuses

We currently have 3 different campuses.

Terms

Our terms are 12 weeks long.

We typically have classes Monday through Thursday.

Fridays are occasionally used as fill-in days.

The class schedule is usually the same at all campus, but can vary due to circumstances such as having to cancel classes on a day at one campus because of weather.

Course Setup

There are six class sessions each day, plus a lunch period.

All courses are typically taught every day.

Any particular course may have one or more sessions during the day at one or more campuses.

In moodle we have a single Course defined for each course and then a Group defined in the course for each session of the course.

The appropriate Teacher(s) and Student(s) are added to the appropriate groups.

This makes for ease of grading and attendance.

Attendance Policy

Our attendance policy currently allows a student to miss six sessions of a class during the term.

After six absences, they are allowed to miss four more sessions if they come in at the teacher's convenience to make them up.

This may be done by doing work assigned by the teacher, helping out with projects on campus for the teacher, etc.

After ten absences, the next tardy or absence is an automatic failure of the course.

Three tardies equates to one absence.

Current Progress

Administrators

Attendance Sessions

  • Generate Default Sessions for the term for all campus and all courses, all campuses and a single course, a single campus and all courses, or a single campus and a single course
  • Generate Single Sessions for the term for all campus and all courses, all campuses and a single course, a single campus and all courses, or a single campus and a single course
  • Delete Single Sessions for the term for all campus and all courses, all campuses and a single course, a single campus and all courses, or a single campus and a single course
  • Print Existing Sessions for the term for all campus and all courses, all campuses and a single course, a single campus and all courses, or a single campus and a single course

Attendance Data

  • Generate Attendance Report for all campuses and all courses, all campuses and one course, one campus and all courses, one campus and one course
  • Check Attendance-Taken Status for all campuses and all courses, all campuses and one course, one campus and all courses, one campus and one course
  • Take/Change Attendance for selected attendance sessions
  • Run a global update of Withdrawal status for all students
  • Search for students based on first name and/or last name
  • Generate Basic Attendance Report for selected student(s)
  • Generate Detailed Attendance Report for selected student(s)
  • Access Student Control Panel for selected student(s) to view current and withdrawn groups and to withdraw from selected group(s).

Teachers

Attendance Sessions

Attendance Admin Course
  • View all groups they are in and view all attendance sessions for all groups
Own Course
  • From their own course - View all attendance sessions for groups they are in in the current course

Attendance Data

Attendance Admin Course
  • Take/Update attendance for the current day for all groups they are in
  • Check attendance-taken status for all sessions for all groups they are in
  • Take/Update attendance for any sessions within 7 days
  • Generate an attendance report for all of their students in all of their groups
Own Course
  • Take/Update attendance for the current day for all groups they are in in the current course
  • Check attendance-taken status for all sessions for all groups they are in in the current course
  • Take/Update attendance for any sessions within 7 days
  • Generate an attendance report for all of their students in all of their groups in the current course
  • Check attendance for a particular date and Take/Update it within 7 days

Students

Attendance Sessions

Own Course
  • View list of groups they are in in the course
  • View all attendance sessions for all groups they are in in the course

Attendance Data

Own Coure
  • View their attendance for the current day for all groups they are in in the course
  • View their attendance for a specific day for all groups they are in in the course
  • View their attendance report for all groups they are in in the course

Current Database Layout

attendance_campuses

  1. id - bigint (10)
  2. fullname - varchar (255) - the full name of the campus
  3. shortname - varchar (5) - short name of the campus
  4. location - varchar (255) - location of the campus
  5. isactive - tinyint (1) - whether campus is active or not

attendance_config

  1. id - bigint (10)
  2. category_id - bigint(10) - category this policy relates to (0 = defaults)
  3. num_days - bigint (10) - number of missed days allowed
  4. num_makeups - bigint (10) - number of makeup days allowed AFTER num_days
  5. pre_makeups - tinyint (1) - allow makeups ahead of time - 0/1
  6. absence_part - bigint (10) - number of partial attendances that make up an absence
  7. full_term - varchar (255) - term for full attendance
  8. part_term - varchar (255) - term for tardy/partial attendance
  9. none_term - varchar (255) - term for no attendance
  10. att_start - bigint (10) - how many days after term start does attendance start
  11. term_length - bigint (10) - length of term in weeks
  12. default_days - varchar (13) - default week days for classes (1,2,3,4,5,6,7)
  13. num_periods - bigint (10) - number of periods in the day
  14. admin_shortname - varchar (255) - shortname of admin course

attendance_data

  1. id - bigint (10)
  2. group_id - bigint (10)
  3. session_date - varchar (10)
  4. student_id - bigint (10)
  5. attendance_code - tinyint (1)
  6. comments - varchar (255)
  7. date_taken - varchar (10)
  8. is_active - tinyint (1)

attendance_sessions

  1. id - bigint (10)
  2. category_id - bigint (10)
  3. course_id - bigint (10)
  4. group_id - bigint (10)
  5. sesion_date - varchar (10)

attendance_status

  1. id - bigint (10)
  2. group_id - bigint (10)
  3. student_id - bigint (10)
  4. status_code - varchar (1)
  5. date_modified - varchar (10)
  6. previous_status_code - varchar (1)
  7. days_made_up - int (1)
  8. makeup_dates - varchar (43)

File Order Flow

block_attendance.php

includes

  1. attconfig.php

calls

  1. atttake.php
  2. attmanage.php
  3. attconfig-form.php
  4. attcampus-form.php

attconfig.php

includes

  1. attconfig-defaults

attconfig-defaults.php

att-init.php

atttake.php

includes

  1. attconfig.php
  2. att-init.php
  3. atttake-functions.php
  4. atttake-adminform.php
  5. atttake-adminformprocess.php
  6. atttake-scp.php
  7. atttake-takeattmiss.php
  8. atttake-takeattmisssubmit.php
  9. atttake-attreport.php
  10. atttake-attdate.php
  11. atttake-attmiss.php
  12. atttake-attsubmit.php
  13. atttake-atttoday.php

attmanage.php

includes

  1. attconfig.php
  2. att-init.php
  3. atttake-functions.php
  4. attmanage-form.php
  5. attmanage-gendefses.php
  6. attmanage-attsubmit.php
  7. attmanage-printsess.php
  8. attmanage-deletesess.php
  9. attmanage-form2.php

attconfig-form.php

includes

  1. attconfig.php
  2. att-init.php

attcampus-form.php

includes

  1. attconfig.php
  2. att-init.php

atttake-functions.php

includes

  1. attconfig.php
  2. att-init.php

atttake-adminform.php

atttake-adminformprocess.php

atttake-scp

atttake-takeattmiss.php

atttake-takeattmisssubmit.php

atttake-attreport.php

atttake-attdate.php

atttake-attmiss.php

atttake-attsubmit.php

atttake-attoday.php

attmanage-form.php

attmanage-gendefses.php

attmanage-attsubmit.php

attmanage-printsess.php

attmanage-deletesess.php

attmanage-form2.php

work_projects/moodle_attendance.txt · Last modified: 2017/07/02 10:11 (external edit)