Implement a naive PartitionScheme for ICRV
This commit is contained in:
@@ -17,11 +17,26 @@ class NotImplementedPartitionScheme(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@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
|
||||||
"""
|
"""
|
||||||
Dummy method, will fail hard if anyone tries to use this scheme.
|
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.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
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
|
||||||
|
"""
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
return user_partition.get_group(1)
|
||||||
|
|
||||||
|
|
||||||
class RandomUserPartitionScheme(object):
|
class RandomUserPartitionScheme(object):
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -41,7 +41,7 @@ setup(
|
|||||||
"openedx.user_partition_scheme": [
|
"openedx.user_partition_scheme": [
|
||||||
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
|
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
|
||||||
"cohort = openedx.core.djangoapps.course_groups.partition_scheme:CohortPartitionScheme",
|
"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",
|
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme",
|
||||||
],
|
],
|
||||||
"openedx.block_structure_transformer": [
|
"openedx.block_structure_transformer": [
|
||||||
|
|||||||
Reference in New Issue
Block a user