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
58543bd8
Commit
58543bd8
authored
Jul 31, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
definition and metadata no longer lazy-loaded
* get rid of dump to json * formatting
parent
119ab639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
common/djangoapps/xmodule_modifiers.py
+5
-6
No files found.
common/djangoapps/xmodule_modifiers.py
View file @
58543bd8
...
...
@@ -76,8 +76,9 @@ def add_histogram(get_html, module):
histogram
=
grade_histogram
(
module_id
)
render_histogram
=
len
(
histogram
)
>
0
# TODO: fixme - no filename in module.xml in general (this code block for edx4edx)
# the following if block is for summer 2012 edX course development; it will change when the CMS comes online
# TODO: fixme - no filename in module.xml in general (this code block
# for edx4edx) the following if block is for summer 2012 edX course
# development; it will change when the CMS comes online
if
settings
.
MITX_FEATURES
.
get
(
'DISPLAY_EDIT_LINK'
)
and
settings
.
DEBUG
and
module_xml
.
get
(
'filename'
)
is
not
None
:
coursename
=
multicourse_settings
.
get_coursename_from_request
(
request
)
github_url
=
multicourse_settings
.
get_course_github_url
(
coursename
)
...
...
@@ -88,10 +89,8 @@ def add_histogram(get_html, module):
else
:
edit_link
=
False
# Cast module.definition and module.metadata to dicts so that json can dump them
# even though they are lazily loaded
staff_context
=
{
'definition'
:
json
.
dumps
(
dict
(
module
.
definition
),
indent
=
4
),
'metadata'
:
json
.
dumps
(
dict
(
module
.
metadata
),
indent
=
4
),
staff_context
=
{
'definition'
:
dict
(
module
.
definition
),
'metadata'
:
dict
(
module
.
metadata
),
'element_id'
:
module
.
location
.
html_id
(),
'edit_link'
:
edit_link
,
'histogram'
:
json
.
dumps
(
histogram
),
...
...
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