'Iterate through items and group IDs in a course.
This will yield group IDs for all user partitions except those with a scheme of random.
Yields: tuple of (item, group_id)'

@staticmethod
def _iterate_items_and_group_ids(course, items):

    all_partitions = get_all_partitions_for_course(course)
    for config in all_partitions:
        if ((config is not None) and (config.scheme.name != RANDOM_SCHEME)):
            for item in items:
                if (hasattr(item, 'group_access') and item.group_access):
                    group_ids = item.group_access.get(config.id, [])
                    for group_id in group_ids:
                        (yield (item, group_id))
