Permalink
Browse files

MDL-29730 Lesson mod: fixed check_answer() for shortanswser with regu…

…lar expression option enable
  • Loading branch information...
1 parent a5b5881 commit 1bb422319f40af137ff107be9327f9906fed80ad @rwijaya rwijaya committed Nov 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/lesson/pagetypes/shortanswer.php
View
4 mod/lesson/pagetypes/shortanswer.php
@@ -85,8 +85,8 @@ public function check_answer() {
if ($useregexp) { //we are using 'normal analysis', which ignores case
$ignorecase = '';
- if (substr($expectedanswer,0,-2) == '/i') {
- $expectedanswer = substr($expectedanswer,0,-2);
+ if (substr($expectedanswer, -2) == '/i') {
+ $expectedanswer = substr($expectedanswer, 0, -2);
$ignorecase = 'i';
}
} else {

0 comments on commit 1bb4223

Please sign in to comment.