diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 9a5a15a696..20867ab323 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -436,13 +436,12 @@ class LoncapaProblem(object): sys.path = original_path + self._extract_system_path(script) stype = script.get('type') - - if stype: - if 'javascript' in stype: - continue # skip javascript - if 'perl' in stype: - continue # skip perl - # TODO: evaluate only python + + # 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 + code = script.text XMLESC = {"'": "'", """: '"'} code = unescape(code, XMLESC)