def parse_new_activity_created(json):
    """
    Parse a module created statement.

    Receives a statement of module created.
    Extract from that statement the course id, course name and name and type of the new activity.

    :param json: A module created statement.
    :type json: dict(str, dict(str, str))
    :return: A dictionary containing the course id and name, and module name and type.
    :rtype: dict(str, int)
    """
    statement = json['statement']
    temp_course_id = statement['context']['contextActivities']['grouping'][1]['id']
    temp_object_id = statement['object']['id']
    activity_type = "assignment"
    if "quiz" in temp_object_id:
        activity_type = "quiz"

    statement_new_activity = {
        'statement_id': statement['id'],
        'courseId': int(temp_course_id.split("id=")[1]),
        'course_name': statement['context']['contextActivities']['grouping'][1]['definition']['name']['en'],
        'activity_name': statement['object']['definition']['name']['en'],
        'activity_type': activity_type
    }
    return statement_new_activity