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
266350f7
Commit
266350f7
authored
Aug 08, 2016
by
Brian Beggs
Committed by
GitHub
Aug 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13182 from edx/efischer/add-logging
Add Logging for CohortMembership
parents
db9299cc
3ba09221
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
lms/djangoapps/verified_track_content/models.py
+2
-0
openedx/core/djangoapps/course_groups/models.py
+2
-0
No files found.
lms/djangoapps/verified_track_content/models.py
View file @
266350f7
...
...
@@ -49,6 +49,8 @@ def move_to_verified_cohort(sender, instance, **kwargs): # pylint: disable=unus
'verified_cohort_name'
:
verified_cohort_name
,
'default_cohort_name'
:
random_cohort
.
name
}
log
.
info
(
"Queuing automatic cohorting for user '
%
s' in course '
%
s'"
,
instance
.
user
.
username
,
course_key
)
# Do the update with a 3-second delay in hopes that the CourseEnrollment transaction has been
# completed before the celery task runs. We want a reasonably short delay in case the learner
# immediately goes to the courseware.
...
...
openedx/core/djangoapps/course_groups/models.py
View file @
266350f7
...
...
@@ -90,6 +90,8 @@ class CohortMembership(models.Model):
def
save
(
self
,
*
args
,
**
kwargs
):
self
.
full_clean
(
validate_unique
=
False
)
log
.
info
(
"Saving CohortMembership for '
%
s' (id=
%
s) in '
%
s'"
,
self
.
user
.
username
,
self
.
user
.
id
,
self
.
course_id
)
# Avoid infinite recursion if creating from get_or_create() call below.
# This block also allows middleware to use CohortMembership.get_or_create without worrying about outer_atomic
if
'force_insert'
in
kwargs
and
kwargs
[
'force_insert'
]
is
True
:
...
...
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