'Assign ids for the group_configuration\'s groups.'

def assign_group_ids(self):

    used_ids = [g.id for p in get_all_partitions_for_course(self.course) for g in p.groups]
    for group in self.configuration.get('groups', []):
        if (group.get('id') is None):
            group['id'] = generate_int_id(MINIMUM_GROUP_ID, MYSQL_MAX_INT, used_ids)
            used_ids.append(group['id'])
