'Returns true if the course contains required settings'

def _course_is_valid(self, course):

    is_valid = True
    required_course_settings = ['organization', 'number', 'run', 'fields', 'user']
    for setting in required_course_settings:
        if (setting not in course):
            logger.warning(('Course    json    is    missing    ' + setting))
            is_valid = False
    required_field_settings = ['display_name']
    if ('fields' in course):
        for setting in required_field_settings:
            if (setting not in course['fields']):
                logger.warning(('Fields    json    is    missing    ' + setting))
                is_valid = False
    return is_valid
