% from django.utils.translation import ugettext as _ from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition from contentstore.utils import ancestor_has_staff_lock cohorted_user_partition = get_cohorted_user_partition(xblock.location.course_key) unsorted_groups = cohorted_user_partition.groups if cohorted_user_partition else [] groups = sorted(unsorted_groups, key=lambda group: group.name) selected_group_ids = xblock.group_access.get(cohorted_user_partition.id, []) if cohorted_user_partition else [] has_selected_groups = len(selected_group_ids) > 0 is_staff_locked = ancestor_has_staff_lock(xblock) %>
${_('Use content groups to give groups of students access to a specific set of course content. Create one or more content groups, and make specific components visible to them.')}