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
ec9ad2cc
Commit
ec9ad2cc
authored
Jun 07, 2017
by
Brandon Baker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDUCATOR-344
Change event emission for random partition scheme assignment
parent
c8accbc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
openedx/core/djangoapps/user_api/partition_schemes.py
+8
-1
No files found.
openedx/core/djangoapps/user_api/partition_schemes.py
View file @
ec9ad2cc
...
@@ -5,6 +5,8 @@ import logging
...
@@ -5,6 +5,8 @@ import logging
import
random
import
random
import
course_tag.api
as
course_tag_api
import
course_tag.api
as
course_tag_api
from
eventtracking
import
tracker
from
xmodule.partitions.partitions
import
UserPartitionError
,
NoSuchUserPartitionGroupError
from
xmodule.partitions.partitions
import
UserPartitionError
,
NoSuchUserPartitionGroupError
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -88,6 +90,7 @@ class RandomUserPartitionScheme(object):
...
@@ -88,6 +90,7 @@ class RandomUserPartitionScheme(object):
# FYI - context is always user ID that is logged in, NOT the user id that is
# FYI - context is always user ID that is logged in, NOT the user id that is
# being operated on. If instructor can move user explicitly, then we should
# being operated on. If instructor can move user explicitly, then we should
# put in event_info the user id that is being operated on.
# put in event_info the user id that is being operated on.
event_name
=
'xmodule.partitions.assigned_user_to_partition'
event_info
=
{
event_info
=
{
'group_id'
:
group
.
id
,
'group_id'
:
group
.
id
,
'group_name'
:
group
.
name
,
'group_name'
:
group
.
name
,
...
@@ -96,7 +99,11 @@ class RandomUserPartitionScheme(object):
...
@@ -96,7 +99,11 @@ class RandomUserPartitionScheme(object):
}
}
# pylint: disable=fixme
# pylint: disable=fixme
# TODO: Use the XBlock publish api instead
# TODO: Use the XBlock publish api instead
track_function
(
'xmodule.partitions.assigned_user_to_partition'
,
event_info
)
with
tracker
.
get_tracker
()
.
context
(
event_name
,
{}):
tracker
.
emit
(
event_name
,
event_info
,
)
return
group
return
group
...
...
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