Commit ab840424 by Vik Paruchuri

Fix raised error

parent ed1f4bdd
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment