'Fetches all key:value pairs from persistence and returns a CourseMetadata model.'

@classmethod
def fetch_all(cls, descriptor):

    result = {}
    for field in descriptor.fields.values():
        if (field.scope != Scope.settings):
            continue
        result[field.name] = {'value': field.read_json(descriptor), 'display_name': _(field.display_name), 'help': _(field.help), 'deprecated': field.runtime_options.get('deprecated', False)}
    return result
