def parse_line(line, indexer, evaluation_item_index):
    """Parses a line of an input file in a specified format.

    Takes a line and the location of various critical fields within the line

    Returns the user, exercise, time taken, and whether the problem was
    answered correctly
    """
    line = line.strip().split(',')
    user = line[indexer.user]
    ex = line[indexer.exercise]
    time = line[indexer.time_taken]
    correct = line[indexer.correct] in ('true', 'True', 1)
    if evaluation_item_index is not None:
        is_evaluation = line[evaluation_item_index] in ('true', 'True')
    else:
        is_evaluation = False
    return user, ex, time, correct, is_evaluation