Fix capa problem i18n BOM-775 (#21832)

This commit is contained in:
Jeremy Bowman
2019-10-07 11:19:49 -04:00
committed by GitHub
parent 9c6e3ce383
commit 71e9c85dca

View File

@@ -457,7 +457,7 @@ class LoncapaProblem(object):
# an earlier submission, so for now skip these entirely.
# TODO: figure out where to get file submissions when rescoring.
if 'filesubmission' in responder.allowed_inputfields and student_answers is None:
_ = self.capa_system.i18n.ugettext
_ = get_gettext(self.capa_system.i18n)
raise Exception(_(u"Cannot rescore problems with possible file submissions"))
# use 'student_answers' only if it is provided, and if it might contain a file
@@ -543,7 +543,7 @@ class LoncapaProblem(object):
Returns:
a string with the question text
"""
_ = self.capa_system.i18n.ugettext
_ = get_gettext(self.capa_system.i18n)
# Some questions define a prompt with this format: >>This is a prompt<<
prompt = self.problem_data[answer_id].get('label')