Implementation to prevent quiz from being taken if it has already been taken or if previous quiz hasn't yet been taken