Revert "Make script type checking more strict"
Don't want to break existing problems.
This reverts commit 811422a18d.
This commit is contained in:
@@ -436,12 +436,13 @@ class LoncapaProblem(object):
|
||||
sys.path = original_path + self._extract_system_path(script)
|
||||
|
||||
stype = script.get('type')
|
||||
|
||||
# Require that there be a type, and that the type be one we understand
|
||||
known_types = ['loncapa/python', 'edx/python']
|
||||
if not stype in known_types:
|
||||
continue
|
||||
|
||||
|
||||
if stype:
|
||||
if 'javascript' in stype:
|
||||
continue # skip javascript
|
||||
if 'perl' in stype:
|
||||
continue # skip perl
|
||||
# TODO: evaluate only python
|
||||
code = script.text
|
||||
XMLESC = {"'": "'", """: '"'}
|
||||
code = unescape(code, XMLESC)
|
||||
|
||||
Reference in New Issue
Block a user