From ab84042435d65402b65e662a8580f1b3e4bf15d5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 10 Dec 2012 14:24:00 -0500 Subject: [PATCH] Fix raised error --- common/lib/capa/capa/responsetypes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index a3dd1f274b..c0c2651707 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -1853,8 +1853,12 @@ class OpenEndedResponse(LoncapaResponse): prompt = self.xml.find('prompt') rubric = self.xml.find('openendedrubric') - if not oeparam or not prompt or not rubric: - raise ValueError("openendedresponse missing required parameters.") + if oeparam is None: + raise ValueError("No oeparam found in problem xml.") + if prompt is None: + raise ValueError("No prompt found in problem xml.") + if rubric is None: + raise ValueError("No rubric found in problem xml.") self._parse(oeparam, prompt, rubric)