Merge pull request #15290 from edx/bbaker/educator-344
Bbaker/educator 344
This commit is contained in:
@@ -87,9 +87,8 @@ class PartitionService(object):
|
||||
with a given course.
|
||||
"""
|
||||
|
||||
def __init__(self, course_id, track_function=None, cache=None):
|
||||
def __init__(self, course_id, cache=None):
|
||||
self._course_id = course_id
|
||||
self._track_function = track_function
|
||||
self._cache = cache
|
||||
|
||||
def get_course(self):
|
||||
@@ -165,7 +164,7 @@ class PartitionService(object):
|
||||
the partition's scheme.
|
||||
"""
|
||||
return user_partition.scheme.get_group_for_user(
|
||||
self._course_id, user, user_partition, assign=assign, track_function=self._track_function
|
||||
self._course_id, user, user_partition, assign=assign,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class MockUserPartitionScheme(object):
|
||||
self.name = name
|
||||
self.current_group = current_group
|
||||
|
||||
def get_group_for_user(self, course_id, user, user_partition, assign=True, track_function=None): # pylint: disable=unused-argument
|
||||
def get_group_for_user(self, course_id, user, user_partition, assign=True): # pylint: disable=unused-argument
|
||||
"""
|
||||
Returns the current group if set, else the first group from the specified user partition.
|
||||
"""
|
||||
@@ -446,7 +446,6 @@ class PartitionServiceBaseClass(PartitionTestCase):
|
||||
return MockPartitionService(
|
||||
self.course,
|
||||
course_id=self.course.id,
|
||||
track_function=Mock(),
|
||||
cache=cache
|
||||
)
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@ class SplitTestModuleTest(XModuleXmlImportTest, PartitionTestCase):
|
||||
partitions_service = MockPartitionService(
|
||||
self.course,
|
||||
course_id=self.course.id,
|
||||
track_function=Mock(name='track_function'),
|
||||
)
|
||||
self.module_system._services['partitions'] = partitions_service # pylint: disable=protected-access
|
||||
|
||||
|
||||
Reference in New Issue
Block a user