Commit d10b568c by Victor Shnayder

Add chemcalc to capa package, to context for customresponse

parent c30f5702
...@@ -30,6 +30,8 @@ import sys ...@@ -30,6 +30,8 @@ import sys
from lxml import etree from lxml import etree
from xml.sax.saxutils import unescape from xml.sax.saxutils import unescape
import chem
import chem.chemcalc
import calc import calc
from correctmap import CorrectMap from correctmap import CorrectMap
import eia import eia
...@@ -72,7 +74,8 @@ global_context = {'random': random, ...@@ -72,7 +74,8 @@ global_context = {'random': random,
'math': math, 'math': math,
'scipy': scipy, 'scipy': scipy,
'calc': calc, 'calc': calc,
'eia': eia} 'eia': eia,
'chemcalc': chem.chemcalc}
# These should be removed from HTML output, including all subelements # These should be removed from HTML output, including all subelements
html_problem_semantics = ["codeparam", "responseparam", "answer", "script", "hintgroup"] html_problem_semantics = ["codeparam", "responseparam", "answer", "script", "hintgroup"]
...@@ -436,7 +439,7 @@ class LoncapaProblem(object): ...@@ -436,7 +439,7 @@ class LoncapaProblem(object):
sys.path = original_path + self._extract_system_path(script) sys.path = original_path + self._extract_system_path(script)
stype = script.get('type') stype = script.get('type')
if stype: if stype:
if 'javascript' in stype: if 'javascript' in stype:
continue # skip javascript continue # skip javascript
......
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