imcomplete refactoring for attendance difference calculation code
attendance difference for teacher
fixed conflicts
fixed merge conflicts in refactoring calculate_attendance_function