From 2e2bf13e5cc8119afc6daf18654120d42ad1900d Mon Sep 17 00:00:00 2001
From: ichuang Error: %s
'
msg += '' % (settings.MITX_ROOT_URL,pfn)
@@ -31,20 +31,20 @@ def check_problem_code(ans,the_lcp,correct_answers,false_answers):
try:
# check correctness
fp = the_lcp.system.filestore.open('problems/%s.xml' % pfn)
- test_lcp = lcp.LoncapaProblem(fp, '1', system=the_lcp.system)
+ test_lcp = lcp.LoncapaProblem(fp, '1', system=the_lcp.system)
- if not (test_lcp.grade_answers(correct_answers)['1_2_1']=='correct'):
+ if not (test_lcp.grade_answers(correct_answers)['1_2_1']=='correct'):
is_ok = False
- if (test_lcp.grade_answers(false_answers)['1_2_1']=='correct'):
+ if (test_lcp.grade_answers(false_answers)['1_2_1']=='correct'):
is_ok = False
except Exception,err:
is_ok = False
msg += "%s
%s" % traceback.format_exc().replace('<','<') ret = {'ok':is_ok, 'msg': msg, } return ret - \ No newline at end of file +