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
6f322bcd
Commit
6f322bcd
authored
Jan 23, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the construction of the ErrorDescriptor
parent
376575de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
lms/djangoapps/courseware/module_render.py
+7
-6
No files found.
lms/djangoapps/courseware/module_render.py
View file @
6f322bcd
...
@@ -276,15 +276,16 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
...
@@ -276,15 +276,16 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
log
.
exception
(
"Error creating module from descriptor {0}"
.
format
(
descriptor
))
log
.
exception
(
"Error creating module from descriptor {0}"
.
format
(
descriptor
))
# make an ErrorDescriptor -- assuming that the descriptor's system is ok
# make an ErrorDescriptor -- assuming that the descriptor's system is ok
import_system
=
descriptor
.
system
if
has_access
(
user
,
location
,
'staff'
,
course_id
):
if
has_access
(
user
,
location
,
'staff'
,
course_id
):
err_descriptor
=
ErrorDescriptor
.
from_xml
(
str
(
descriptor
),
import_system
,
err_descriptor_class
=
ErrorDescriptor
org
=
descriptor
.
location
.
org
,
course
=
descriptor
.
location
.
course
,
error_msg
=
exc_info_to_str
(
sys
.
exc_info
()))
else
:
else
:
err_descriptor
=
NonStaffErrorDescriptor
.
from_xml
(
str
(
descriptor
),
import_system
,
err_descriptor_class
=
NonStaffErrorDescriptor
err_descriptor
=
err_descriptor_class
.
from_xml
(
str
(
descriptor
),
descriptor
.
system
,
org
=
descriptor
.
location
.
org
,
course
=
descriptor
.
location
.
course
,
org
=
descriptor
.
location
.
org
,
course
=
descriptor
.
location
.
course
,
error_msg
=
exc_info_to_str
(
sys
.
exc_info
()))
error_msg
=
exc_info_to_str
(
sys
.
exc_info
())
)
# Make an error module
# Make an error module
return
err_descriptor
.
xmodule
(
system
)
return
err_descriptor
.
xmodule
(
system
)
...
...
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