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
d2768c64
Commit
d2768c64
authored
Apr 07, 2013
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
not all modules have xml_attributes ; be careful about this in xmodule_modifier
parent
8cafadc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
common/djangoapps/xmodule_modifiers.py
+2
-2
No files found.
common/djangoapps/xmodule_modifiers.py
View file @
d2768c64
...
...
@@ -109,7 +109,7 @@ def add_histogram(get_html, module, user):
render_histogram
=
len
(
histogram
)
>
0
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_LMS_MIGRATION'
):
[
filepath
,
filename
]
=
module
.
descriptor
.
xml_attributes
.
get
(
'filename'
,
[
''
,
None
])
[
filepath
,
filename
]
=
getattr
(
module
.
descriptor
,
'xml_attributes'
,
{})
.
get
(
'filename'
,
[
''
,
None
])
osfs
=
module
.
system
.
filestore
if
filename
is
not
None
and
osfs
.
exists
(
filename
):
# if original, unmangled filename exists then use it (github
...
...
@@ -137,7 +137,7 @@ def add_histogram(get_html, module, user):
staff_context
=
{
'fields'
:
[(
field
.
name
,
getattr
(
module
,
field
.
name
))
for
field
in
module
.
fields
],
'lms_fields'
:
[(
field
.
name
,
getattr
(
module
.
lms
,
field
.
name
))
for
field
in
module
.
lms
.
fields
],
'xml_attributes'
:
module
.
descriptor
.
xml_attributes
,
'xml_attributes'
:
getattr
(
module
.
descriptor
,
'xml_attributes'
,
{})
,
'location'
:
module
.
location
,
'xqa_key'
:
module
.
lms
.
xqa_key
,
'source_file'
:
source_file
,
...
...
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