Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…formats
  • Loading branch information...
commit 2a02a3f0deabd1c803b6c04e74ad755ed1c71b99 1 parent cc50a2f
Rajesh Taneja authored
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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.