Browse files

updated essay code to work with quotes being used in user answer and …

…teacher response
  • Loading branch information...
1 parent ec6dc3f commit 611e79fd75405136a4a519016c2b1ce2b1f5bccc michaelpenne committed Dec 1, 2004
Showing with 3 additions and 3 deletions.
  1. +3 −3 mod/lesson/view.php
View
6 mod/lesson/view.php
@@ -1753,10 +1753,10 @@
$essayinfo->graded = 1;
$essayinfo->score = $form->score;
- $essayinfo->response = $form->response;
+ $essayinfo->response = stripslashes_safe($form->response);
$essayinfo->sent = 0;
- $essay->useranswer = serialize($essayinfo);
+ $essay->useranswer = addslashes(serialize($essayinfo));
if (!update_record("lesson_attempts", $essay)) {
error("Could not update essay score");
@@ -1840,7 +1840,7 @@
if(email_to_user($users[$essay->userid], $USER, $subject, $plaintxt, $message)) {
$essayinfo->sent = 1;
- $essay->useranswer = serialize($essayinfo);
+ $essay->useranswer = addslashes(serialize($essayinfo));
update_record("lesson_attempts", $essay);
} else {
echo "Email Failed!<br>";

0 comments on commit 611e79f

Please sign in to comment.