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
136bcb29
Commit
136bcb29
authored
Jun 03, 2014
by
Julia Hansbrough
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3934 from edx/flowerhack/handout-error-logs
Removed excessive logging
parents
a32e4d58
e1688e2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
lms/djangoapps/courseware/courses.py
+2
-1
lms/djangoapps/courseware/module_render.py
+8
-5
No files found.
lms/djangoapps/courseware/courses.py
View file @
136bcb29
...
@@ -187,7 +187,7 @@ def get_course_about_section(course, section_key):
...
@@ -187,7 +187,7 @@ def get_course_about_section(course, section_key):
loc
,
loc
,
field_data_cache
,
field_data_cache
,
course
.
id
,
course
.
id
,
not_found_ok
=
Tru
e
,
log_if_not_found
=
Fals
e
,
wrap_xmodule_display
=
False
,
wrap_xmodule_display
=
False
,
static_asset_path
=
course
.
static_asset_path
static_asset_path
=
course
.
static_asset_path
)
)
...
@@ -241,6 +241,7 @@ def get_course_info_section(request, course, section_key):
...
@@ -241,6 +241,7 @@ def get_course_info_section(request, course, section_key):
usage_key
,
usage_key
,
field_data_cache
,
field_data_cache
,
course
.
id
,
course
.
id
,
log_if_not_found
=
False
,
wrap_xmodule_display
=
False
,
wrap_xmodule_display
=
False
,
static_asset_path
=
course
.
static_asset_path
static_asset_path
=
course
.
static_asset_path
)
)
...
...
lms/djangoapps/courseware/module_render.py
View file @
136bcb29
...
@@ -140,7 +140,7 @@ def toc_for_course(user, request, course, active_chapter, active_section, field_
...
@@ -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
,
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
,
grade_bucket_type
=
None
,
depth
=
0
,
static_asset_path
=
''
):
static_asset_path
=
''
):
"""
"""
...
@@ -152,11 +152,13 @@ def get_module(user, request, usage_key, field_data_cache,
...
@@ -152,11 +152,13 @@ def get_module(user, request, usage_key, field_data_cache,
- user : User for whom we're getting the module
- user : User for whom we're getting the module
- request : current django HTTPrequest. Note: request.user isn't used for anything--all auth
- request : current django HTTPrequest. Note: request.user isn't used for anything--all auth
and such works based on user.
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
- 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 : extra information from URL for user-specified
position within module
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.
- depth : number of levels of descendents to cache when loading this module.
None means cache all descendents
None means cache all descendents
- static_asset_path : static asset path to use (overrides descriptor's value); needed
- 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,
...
@@ -176,9 +178,10 @@ def get_module(user, request, usage_key, field_data_cache,
grade_bucket_type
=
grade_bucket_type
,
grade_bucket_type
=
grade_bucket_type
,
static_asset_path
=
static_asset_path
)
static_asset_path
=
static_asset_path
)
except
ItemNotFoundError
:
except
ItemNotFoundError
:
if
not
not_found_ok
:
if
log_if_not_found
:
log
.
exception
(
"Error in get_module
"
)
log
.
debug
(
"Error in get_module: ItemNotFoundError
"
)
return
None
return
None
except
:
except
:
# Something has gone terribly wrong, but still not letting it turn into a 500.
# Something has gone terribly wrong, but still not letting it turn into a 500.
log
.
exception
(
"Error in get_module"
)
log
.
exception
(
"Error in get_module"
)
...
...
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