Skip to content

Commit

Permalink
updated essay code to work with quotes being used in user answer and …
Browse files Browse the repository at this point in the history
…teacher response
  • Loading branch information
michaelpenne committed Dec 1, 2004
1 parent ec6dc3f commit 611e79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/lesson/view.php
Expand Up @@ -1753,10 +1753,10 @@


$essayinfo->graded = 1; $essayinfo->graded = 1;
$essayinfo->score = $form->score; $essayinfo->score = $form->score;
$essayinfo->response = $form->response; $essayinfo->response = stripslashes_safe($form->response);
$essayinfo->sent = 0; $essayinfo->sent = 0;


$essay->useranswer = serialize($essayinfo); $essay->useranswer = addslashes(serialize($essayinfo));


if (!update_record("lesson_attempts", $essay)) { if (!update_record("lesson_attempts", $essay)) {
error("Could not update essay score"); error("Could not update essay score");
Expand Down Expand Up @@ -1840,7 +1840,7 @@


if(email_to_user($users[$essay->userid], $USER, $subject, $plaintxt, $message)) { if(email_to_user($users[$essay->userid], $USER, $subject, $plaintxt, $message)) {
$essayinfo->sent = 1; $essayinfo->sent = 1;
$essay->useranswer = serialize($essayinfo); $essay->useranswer = addslashes(serialize($essayinfo));
update_record("lesson_attempts", $essay); update_record("lesson_attempts", $essay);
} else { } else {
echo "Email Failed!<br>"; echo "Email Failed!<br>";
Expand Down

0 comments on commit 611e79f

Please sign in to comment.