function structure changed in attendance module to improve perf - changes to attendance block required for this version.
Merge remote-tracking branch 'upstream/master'