Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
871f3bfb
Commit
871f3bfb
authored
5 years ago
by
DawoudSheraz
Browse files
Options
Downloads
Patches
Plain Diff
conditional logs to find the inconsistent block id in MITx course
parent
f42d2edd
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/features/course_experience/utils.py
+14
-1
14 additions, 1 deletion
openedx/features/course_experience/utils.py
with
14 additions
and
1 deletion
openedx/features/course_experience/utils.py
+
14
−
1
View file @
871f3bfb
...
...
@@ -3,6 +3,8 @@ Common utilities for the course experience, including course outline.
"""
from
__future__
import
absolute_import
import
logging
from
completion.models
import
BlockCompletion
from
django.utils.translation
import
ugettext
as
_
from
opaque_keys.edx.keys
import
CourseKey
...
...
@@ -22,6 +24,8 @@ from openedx.features.discounts.applicability import (
from
openedx.features.discounts.utils
import
format_strikeout_price
from
xmodule.modulestore.django
import
modulestore
log
=
logging
.
getLogger
(
__name__
)
@request_cached
()
def
get_course_outline_block_tree
(
request
,
course_id
,
user
=
None
):
...
...
@@ -44,7 +48,16 @@ def get_course_outline_block_tree(request, course_id, user=None):
for
i
in
range
(
len
(
children
)):
child_id
=
block
[
'
children
'
][
i
]
child_detail
=
populate_children
(
all_blocks
[
child_id
],
all_blocks
)
try
:
child_detail
=
populate_children
(
all_blocks
[
child_id
],
all_blocks
)
except
TypeError
:
if
u
"
MITx+6.002x+MITx_2012_Alumni
"
in
course_outline_root_block
[
id
]:
log
.
info
(
u
"
PopulateChildrenError for Child: {child} in block:{block} at index:{index}
"
.
format
(
child
=
child_id
,
block
=
block
[
'
id
'
],
index
=
i
))
raise
block
[
'
children
'
][
i
]
=
child_detail
return
block
...
...
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