diff -r 3643f59f141e -r 0842b3439c3e quiz/utils.py --- a/quiz/utils.py Thu Apr 22 06:23:53 2010 +0530 +++ b/quiz/utils.py Thu Apr 22 12:17:21 2010 +0530 @@ -14,7 +14,10 @@ expected_ans = answer.question.expected_ans - ans_regex_patterns = [ r"\s*".join(ans_pattern.split()) for ans_pattern in expected_ans.split("\n") ] + ans_regex_patterns = [] + for ans_pattern in expected_ans.split("\n"): + ans_regex_patterns.append( r"\s*".join(ans_pattern.split()) if not re.match(r"""^[",']""", ans_pattern) else ans_pattern ) + for pattern in ans_regex_patterns: if re.findall(pattern, answer.submitted_ans): answer.is_correct = True