def get_test_progress(controller, question_index):
    """Maps the test progress to a float between 0 and 1"""
    settings = controller.state.session.settings
    question_count = settings.question_count.value
    # Between 0 and 1.
    return question_index / (question_count - 1)