Skip to content
Browse files

MDL-26281 Lesson - Fixed short answer with apostrophe and other html …

…formats
  • Loading branch information...
1 parent cc50a2f commit 2a02a3f0deabd1c803b6c04e74ad755ed1c71b99 Rajesh Taneja committed Jun 21, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 mod/lesson/pagetypes/shortanswer.php
View
5 mod/lesson/pagetypes/shortanswer.php
@@ -73,7 +73,6 @@ public function check_answer() {
$result->noanswer = true;
return $result;
}
- $studentanswer = s($studentanswer);
$i=0;
$answers = $this->get_answers();
@@ -163,7 +162,9 @@ public function check_answer() {
break; // quit answer analysis immediately after a match has been found
}
}
- $result->studentanswer = $result->userresponse = $studentanswer;
+ $result->userresponse = $studentanswer;
+ //clean student answer as it goes to output.
+ $result->studentanswer = s($studentanswer);
return $result;
}

0 comments on commit 2a02a3f

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