def parse_quiz_completed_feedback(json):
    """
    Parse quiz completed statements.

    Receives a quiz completed statement.
    Extract from that statement the actor, quiz and course names and ids. Also extract the score and attempt id.

    :param json: A quiz completed statement.
    :type json: dict(str, NoneType)
    :return: A dictionary containing the score and attempt id as well as actor, quiz and course names and ids.
    :rtype: dict(str, str)
    """
    statement = json['statement']
    temp_id = statement['context']['contextActivities']['grouping'][1]['id']
    temp_quiz_id = statement['object']['id']
    link_with_attempt_id = statement['context']['contextActivities']['other'][0]['id']
    statement_quiz_completed = {
        'statement_id': statement['id'],
        'actor_name': statement['actor']['name'],
        'actor_id': statement['actor']['account']['name'],
        'quiz_name': statement['object']['definition']['name']['en'],
        'quiz_id': int(temp_quiz_id.split("id=")[1]),
        'score': statement['result']['score']['scaled'],
        'course_name': statement['context']['contextActivities']['grouping'][1]['definition']['name']['en'],
        'course_id': int(temp_id.split("id=")[1]),
        'attempt_id': int(link_with_attempt_id.split("attempt=")[1].split("&")[0])
    }
    return statement_quiz_completed