Commit f3da0eb5 by Eric Fischer

Implement a naive PartitionScheme for ICRV

parent ec6dfeea
......@@ -17,11 +17,26 @@ class NotImplementedPartitionScheme(object):
"""
@classmethod
def get_group_for_user(cls, course_key, user, user_partition, assign=True, track_function=None):
def get_group_for_user(cls, course_key, user, user_partition, assign=True, track_function=None): # pylint: disable=unused-argument
"""
Returning None is equivalent to saying "This user is not in any groups
using this partition scheme", be sure the scheme you're removing is
compatible with that assumption.
"""
return None
class ReturnGroup1PartitionScheme(object):
"""
This scheme is needed to allow verification partitions to be killed, see EDUCATOR-199
"""
@classmethod
def get_group_for_user(cls, course_key, user, user_partition, assign=True, track_function=None): # pylint: disable=unused-argument
"""
Dummy method, will fail hard if anyone tries to use this scheme.
The previous "allow" definition for verification was defined as 1, so return that.
Details at https://github.com/edx/edx-platform/pull/14913/files#diff-feff1466ec4d1b8c38894310d8342a80
"""
raise NotImplementedError()
return user_partition.get_group(1)
class RandomUserPartitionScheme(object):
......
......@@ -41,7 +41,7 @@ setup(
"openedx.user_partition_scheme": [
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
"cohort = openedx.core.djangoapps.course_groups.partition_scheme:CohortPartitionScheme",
"verification = openedx.core.djangoapps.user_api.partition_schemes:NotImplementedPartitionScheme",
"verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme",
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme",
],
"openedx.block_structure_transformer": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment