Permalink
Browse files

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

…lar expression option enable
  • Loading branch information...
Rossiani Wijaya
Rossiani Wijaya committed Nov 30, 2011
1 parent 779085b commit f3052cca98b9913e372a0fe754a89526b01abdb2
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 f3052cc

Please sign in to comment.