Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
8bcdcc52
Commit
8bcdcc52
authored
7 years ago
by
Alex Dusenbery
Committed by
Alex Dusenbery
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
EDUCATOR-1290 | Make sure we have a key with a course id in it before library content logging call.
parent
f5a4ad20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/xmodule/xmodule/library_content_module.py
+8
-5
8 additions, 5 deletions
common/lib/xmodule/xmodule/library_content_module.py
with
8 additions
and
5 deletions
common/lib/xmodule/xmodule/library_content_module.py
+
8
−
5
View file @
8bcdcc52
...
...
@@ -183,7 +183,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
selected
|=
added_block_keys
# TODO: used for temporary logging for EDUCATOR-1290
cls
.
_log_if_mit_supply_chain
(
valid_block_keys
,
selected
,
invalid_block_keys
,
overlimit_block_keys
,
added_block_keys
valid_block_keys
,
selected
,
invalid_block_keys
,
overlimit_block_keys
,
added_block_keys
,
children
)
return
{
'
selected
'
:
selected
,
...
...
@@ -194,7 +194,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
@staticmethod
def
_log_if_mit_supply_chain
(
valid_block_keys
,
selected
,
invalid_block_keys
,
overlimit_block_keys
,
added_block_keys
valid_block_keys
,
selected
,
invalid_block_keys
,
overlimit_block_keys
,
added_block_keys
,
children
):
"""
Helper method to debug case where random block_keys are not assigned for particular courses.
...
...
@@ -202,11 +202,14 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
"""
if
not
selected
:
return
first_block_id
=
list
(
selected
)[
0
][
1
]
if
selected
and
"
MITx+CTL
"
in
first_block_id
:
course_key
=
''
if
children
:
course_key
=
children
[
0
].
course_key
if
selected
and
"
MITx+CTL
"
in
text_type
(
course_key
):
logger
.
info
(
"
EDUCATOR-1290: LibraryContentModule.make_selection executed:
"
"
EDUCATOR-1290: LibraryContentModule.make_selection executed
for course {0}
:
"
"
valid_block_keys: {1} | selected: {2} | invalid: {3} | overlimit: {4} | added: {5}
"
.
format
(
text_type
(
course_key
),
valid_block_keys
,
selected
,
invalid_block_keys
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment