diff --git a/cms/static/cms/js/require-config.js b/cms/static/cms/js/require-config.js index 45aadf6498..426fae9f59 100644 --- a/cms/static/cms/js/require-config.js +++ b/cms/static/cms/js/require-config.js @@ -28,6 +28,7 @@ 'mustache': 'js/vendor/mustache', 'codemirror': 'js/vendor/codemirror-compressed', 'codemirror/stex': 'js/vendor/CodeMirror/stex', + 'pretty-print': 'js/lib/pretty-print', 'jquery': 'common/js/vendor/jquery', 'jquery-migrate': 'common/js/vendor/jquery-migrate', 'jquery.ui': 'js/vendor/jquery-ui.min', diff --git a/common/djangoapps/pipeline_js/templates/xmodule.js b/common/djangoapps/pipeline_js/templates/xmodule.js index fb0c22d2c1..1b257bbd97 100644 --- a/common/djangoapps/pipeline_js/templates/xmodule.js +++ b/common/djangoapps/pipeline_js/templates/xmodule.js @@ -6,9 +6,8 @@ ## and attach them to the global context manually. define(["jquery", "underscore", "codemirror", "tinymce", "jquery.tinymce", "jquery.qtip", "jquery.scrollTo", "jquery.flot", - "jquery.cookie", - "utility"], - function($, _, CodeMirror, tinymce) { + "jquery.cookie", "pretty-print", "utility"], + function($, _, CodeMirror) { window.$ = $; window._ = _; require(['mathjax']); diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index fc32e2b4da..ae967438d7 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -36,14 +36,14 @@ from capa.safe_exec import safe_exec # extra things displayed after "show answers" is pressed solution_tags = ['solution'] -# fully accessible capa response types -ACCESSIBLE_CAPA_RESPONSE_TYPES = [ - 'choiceresponse', - 'multiplechoiceresponse', - 'optionresponse', - 'numericalresponse', - 'stringresponse', - 'formularesponse', +# fully accessible capa input types +ACCESSIBLE_CAPA_INPUT_TYPES = [ + 'checkboxgroup', + 'radiogroup', + 'choicegroup', + 'optioninput', + 'textline', + 'formulaequationinput', ] # these get captured as student responses @@ -911,6 +911,10 @@ class LoncapaProblem(object): responsetype_id (str): responsetype id problem_data (dict): dict to be filled with response data """ + # if there are no inputtypes then don't do anything + if not inputfields: + return + element_to_be_deleted = None label = '' @@ -938,35 +942,17 @@ class LoncapaProblem(object): # store