From eb8998894433ab41215891fcd67d71bec5f729cb Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Khalid Date: Tue, 4 Aug 2020 22:11:16 +0500 Subject: [PATCH] fixed issue --- common/lib/xmodule/xmodule/capa_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 58f4bfc132..52edca3843 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -316,7 +316,7 @@ class ProblemBlock( for option_response in root.findall("optionresponse"): option_response_xml = etree.tostring(option_response, method="html").decode("utf-8") option_input = option_response.find("optioninput") - if option_input is not None: + if option_input is not None and "options" in option_input: option_input_attrib = option_input.get("options", "") option_input_attrib = "[" + option_input_attrib.strip("()").replace("'", '"') + "]" values_of_dropdown = ", ".join(json.loads(option_input_attrib))