Commit 2376fde9 by Piotr Mitros

Fixed typo in code designed to make things more robust

parent 06a8bc03
...@@ -53,10 +53,17 @@ class ConceptXBlock(XBlock): ...@@ -53,10 +53,17 @@ class ConceptXBlock(XBlock):
cm = self.concept_map cm = self.concept_map
if not cm: if not cm:
cm = '{"required":[], "taught":[], "exercised":[]}' 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 server = self.server
if not server: if not server:
server = "" server = ""
frag = Fragment(html.replace("PLACEHOLDER_FOR_CONCEPT_MAP",cm).replace("SERVER", self.server)) 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_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")) frag.add_css(self.resource_string("static/css/concept.css"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment