'Return Result objects for any mongo-modulestore backend course that has
cert_name_short or cert_name_long set.'

def _mongo_results(self):

    mongo_modulestore = modulestore()._get_modulestore_by_type(ModuleStoreEnum.Type.mongo)
    old_mongo_courses = mongo_modulestore.collection.find({'_id.category': 'course', '$or': [{'metadata.cert_name_short': {'$exists': 1}}, {'metadata.cert_name_long': {'$exists': 1}}]}, {'_id': True, 'metadata.cert_name_short': True, 'metadata.cert_name_long': True})
    return [Result(mongo_modulestore.make_course_key(course['_id']['org'], course['_id']['course'], course['_id']['name']), course['metadata'].get('cert_name_short'), course['metadata'].get('cert_name_long'), True) for course in old_mongo_courses]
