Error when submitting attendance form (by teacher)