MDL-43000 shortanswer qtype: handle patterns with many *s
commit5dbfbc82cf7948395ddc2f31aa49abf1020ccef9
authorTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Nov 2013 11:29:56 +0000 (22 11:29 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Fri, 22 Nov 2013 11:32:09 +0000 (22 11:32 +0000)
tree3e3458486eef93594d6af2b8c36c9c9aa0976ef7
parentf7434db1092dd4f4802cc98ce5f4252d8c516c21
MDL-43000 shortanswer qtype: handle patterns with many *s

Teachers were typing patterns like
********************************<em>****************************</em>
which translates into a pattern like .*.*.*.*, which is very inefficient
to try to match, althought it is equivalent ot a single .*. At a certain
point preg was just giving up.

Since people actually do this, we should simplify the regex by treating
runs of * like a single *.
question/type/shortanswer/question.php
question/type/shortanswer/tests/question_test.php