mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
updated essay code to work with quotes being used in user answer and teacher response
This commit is contained in:
parent
ec6dc3f6d7
commit
611e79fd75
1 changed files with 3 additions and 3 deletions
|
@ -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");
|
||||||
|
@ -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>";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue