Attendance functions finished

I have finished attendance functions.Please merge