'Returns:
list of XModuleDescriptor instances for the matching items within the course with
the given course_id
NOTE: don\'t use this to look for courses
as the course_id is required. Use get_courses.
Args:
course_id (CourseKey): the course identifier
settings (dict): fields to look for which have settings scope. Follows same syntax
and rules as qualifiers below
content (dict): fields to look for which have content scope. Follows same syntax and
rules as qualifiers below.
qualifiers (dict): what to look for within the course.
Common qualifiers are ``category`` or any field name. if the target field is a list,
then it searches for the given value in the list not list equivalence.
Substring matching pass a regex object.
For this modulestore, ``name`` is another commonly provided key (Location based stores)
(but not revision!)
For this modulestore,
you can search dates by providing either a datetime for == (probably
useless) or a tuple (">"|"<" datetime) for after or before, etc.'

def get_items(self, course_id, settings=None, content=None, revision=None, qualifiers=None, **kwargs):

    if (revision == ModuleStoreEnum.RevisionOption.draft_only):
        return []
    items = []
    qualifiers = (qualifiers.copy() if qualifiers else {})
    category = qualifiers.pop('category', None)
    name = qualifiers.pop('name', None)
    def _block_matches_all(mod_loc, module):
        if (category and (mod_loc.category != category)):
            return False
        if name:
            if isinstance(name, list):
                if (mod_loc.name not in name):
                    return False
            elif (mod_loc.name != name):
                return False
        return all((self._block_matches(module, (fields or {})) for fields in [settings, content, qualifiers]))
    for (mod_loc, module) in self.modules[course_id].iteritems():
        if _block_matches_all(mod_loc, module):
            items.append(module)
    return items
