Skip to content
Browse files

Further improvement to generation alternative matches in JMatch

  • Loading branch information...
1 parent 3422bbf commit fee4328c6bda72b469351655ed074b3396c21bbc gbateson committed Jan 26, 2006
Showing with 1 addition and 2 deletions.
  1. +1 −2 mod/hotpot/template/v6.php
View
3 mod/hotpot/template/v6.php
@@ -603,15 +603,14 @@ function v6_expand_AnswerArray() {
$str = 'Answers['.($a++).'] = new Array('.implode(',', $segments).");\n";
// pattern to match the next part of an alternate answer
- $pattern = '/^('.implode('|', $escapedvalues).')\\s*/';
+ $pattern = '/^('.implode('|', $escapedvalues).')\\s*/i';
// XML tags to the start of an alternate answer
$tags = 'data,jumbled-order-exercise,alternate';
$i = 0;
while ($value = $this->parent->xml_value($tags, "[$i]['#']")) {
$segments = array();
- $value = strtolower($value);
while (strlen($value) && preg_match($pattern, $value, $matches)) {
$key = array_search($matches[1], $values);
if (is_numeric($key)) {

0 comments on commit fee4328

Please sign in to comment.
Something went wrong with that request. Please try again.