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
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, April 9th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
e1688e2a
Commit
e1688e2a
authored
10 years ago
by
Julia Hansbrough
Browse files
Options
Downloads
Patches
Plain Diff
Removed excessive logging
parent
b15f3f19
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/courseware/courses.py
+2
-1
2 additions, 1 deletion
lms/djangoapps/courseware/courses.py
lms/djangoapps/courseware/module_render.py
+8
-5
8 additions, 5 deletions
lms/djangoapps/courseware/module_render.py
with
10 additions
and
6 deletions
lms/djangoapps/courseware/courses.py
+
2
−
1
View file @
e1688e2a
...
...
@@ -187,7 +187,7 @@ def get_course_about_section(course, section_key):
loc
,
field_data_cache
,
course
.
id
,
not_found
_ok
=
Tru
e
,
log_if_
not_found
=
Fals
e
,
wrap_xmodule_display
=
False
,
static_asset_path
=
course
.
static_asset_path
)
...
...
@@ -241,6 +241,7 @@ def get_course_info_section(request, course, section_key):
usage_key
,
field_data_cache
,
course
.
id
,
log_if_not_found
=
False
,
wrap_xmodule_display
=
False
,
static_asset_path
=
course
.
static_asset_path
)
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/courseware/module_render.py
+
8
−
5
View file @
e1688e2a
...
...
@@ -140,7 +140,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, field_
def
get_module
(
user
,
request
,
usage_key
,
field_data_cache
,
position
=
None
,
not_found
_ok
=
Fals
e
,
wrap_xmodule_display
=
True
,
position
=
None
,
log_if_
not_found
=
Tru
e
,
wrap_xmodule_display
=
True
,
grade_bucket_type
=
None
,
depth
=
0
,
static_asset_path
=
''
):
"""
...
...
@@ -152,11 +152,13 @@ def get_module(user, request, usage_key, field_data_cache,
- user : User for whom we
'
re getting the module
- request : current django HTTPrequest. Note: request.user isn
'
t used for anything--all auth
and such works based on user.
-
location
: A
Location-like
object identifying the module to load
-
usage_key
: A
UsageKey
object identifying the module to load
- field_data_cache : a FieldDataCache
- course_id : the course_id in the context of which to load module
- position : extra information from URL for user-specified
position within module
- log_if_not_found : If this is True, we log a debug message if we cannot find the requested xmodule.
- wrap_xmodule_display : If this is True, wrap the output display in a single div to allow for the
XModule javascript to be bound correctly
- depth : number of levels of descendents to cache when loading this module.
None means cache all descendents
- static_asset_path : static asset path to use (overrides descriptor
'
s value); needed
...
...
@@ -176,9 +178,10 @@ def get_module(user, request, usage_key, field_data_cache,
grade_bucket_type
=
grade_bucket_type
,
static_asset_path
=
static_asset_path
)
except
ItemNotFoundError
:
if
not
not_found
_ok
:
log
.
exception
(
"
Error in get_module
"
)
if
log_if_
not_found
:
log
.
debug
(
"
Error in get_module
: ItemNotFoundError
"
)
return
None
except
:
# Something has gone terribly wrong, but still not letting it turn into a 500.
log
.
exception
(
"
Error in get_module
"
)
...
...
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