duplicating changes from commits 8d345428dbf39d543401369b1e5cf6edadf1d92a and 182ee495f647b8228309154f1e53e80e7ed44e3b. removes Period as an attendance model and adds it in as a util class instead.