Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
ConceptXBlock
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
OpenEdx
ConceptXBlock
Commits
2376fde9
Commit
2376fde9
authored
Mar 25, 2014
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typo in code designed to make things more robust
parent
06a8bc03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
concept/concept.py
+9
-2
No files found.
concept/concept.py
View file @
2376fde9
...
...
@@ -53,10 +53,17 @@ class ConceptXBlock(XBlock):
cm
=
self
.
concept_map
if
not
cm
:
cm
=
'{"required":[], "taught":[], "exercised":[]}'
# These three lines are not strictly required, but they do
# make the code more robust if, for whatever reason, the
# storage ends up with nothing for the server. The client
# still doesn't work without a valid server, but we don't get
# an exception, so we're more likely to be able to get far
# enough to fix it.
server
=
self
.
server
if
not
server
:
if
not
server
:
server
=
""
frag
=
Fragment
(
html
.
replace
(
"PLACEHOLDER_FOR_CONCEPT_MAP"
,
cm
)
.
replace
(
"SERVER"
,
se
lf
.
se
rver
))
frag
=
Fragment
(
html
.
replace
(
"PLACEHOLDER_FOR_CONCEPT_MAP"
,
cm
)
.
replace
(
"SERVER"
,
server
))
frag
.
add_css_url
(
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css"
)
frag
.
add_css
(
self
.
resource_string
(
"static/css/concept.css"
))
...
...
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