openedx.core.djangoapps.verified_track_content package#
Submodules#
openedx.core.djangoapps.verified_track_content.partition_scheme module#
UserPartitionScheme for enrollment tracks.
- class openedx.core.djangoapps.verified_track_content.partition_scheme.EnrollmentTrackPartitionScheme#
Bases:
objectThis scheme uses learner enrollment tracks to map learners into partition groups.
- classmethod create_user_partition(id, name, description, groups=None, parameters=None, active=True)#
Create a custom UserPartition to support dynamic groups.
A Partition has an id, name, scheme, description, parameters, and a list of groups. The id is intended to be unique within the context where these are used. (e.g., for partitions of users within a course, the ids should be unique per-course). The scheme is used to assign users into groups. The parameters field is used to save extra parameters e.g., location of the course ID for this partition scheme.
Partitions can be marked as inactive by setting the “active” flag to False. Any group access rule referencing inactive partitions will be ignored when performing access checks.
- classmethod get_group_for_user(course_key, user, user_partition, **kwargs)#
Returns the Group from the specified user partition to which the user is assigned, via enrollment mode. If a user is in a Credit mode, the Verified or Professional mode for the course is returned instead.
- read_only = True#
- class openedx.core.djangoapps.verified_track_content.partition_scheme.EnrollmentTrackUserPartition(id, name, description, groups, scheme=None, parameters=None, active=True, scheme_id='random')#
Bases:
UserPartitionExtends UserPartition to support dynamic groups pulled from the current course Enrollment tracks.
- property groups#
Return the groups (based on CourseModes) for the course associated with this EnrollmentTrackUserPartition instance. Note that only groups based on selectable CourseModes are returned (which means that Credit will never be returned).