public boolean quizTaken(int week, User user) {
		PreparedStatement statement = null;
        Connection connection = null;
        try {
            try {
            	connection = data.getConnection();
                statement = connection.prepareStatement("SELECT week FROM UserQuiz WHERE week = ? AND userName = ?");
                statement.setInt(1, week);
                statement.setString(2, user.getUsername());
                ResultSet results = statement.executeQuery();
                if(results.next()) {
                	return true;
                }
                return false;
            }
            finally {
                if(statement != null) {
                    statement.close();
                }
                if(connection != null) {
                    connection.close();
                }
            }
        }
        catch (SQLException ex) {
            System.out.println("Error checking if the quiz was taken");
            ex.printStackTrace();
            return false;
        }
	}