Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f3da0eb5
Commit
f3da0eb5
authored
May 02, 2017
by
Eric Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement a naive PartitionScheme for ICRV
parent
ec6dfeea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
openedx/core/djangoapps/user_api/partition_schemes.py
+18
-3
setup.py
+1
-1
No files found.
openedx/core/djangoapps/user_api/partition_schemes.py
View file @
f3da0eb5
...
...
@@ -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
"""
r
aise
NotImplementedError
(
)
r
eturn
user_partition
.
get_group
(
1
)
class
RandomUserPartitionScheme
(
object
):
...
...
setup.py
View file @
f3da0eb5
...
...
@@ -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:
NotImplemented
PartitionScheme"
,
"verification = openedx.core.djangoapps.user_api.partition_schemes:
ReturnGroup1
PartitionScheme"
,
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme"
,
],
"openedx.block_structure_transformer"
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment