Bug #6293 - Cannot regrade a question when a teacher has added a comment with a ' - Merged from MOODLE_16_STABLE. Stupid, wreched, datalib. Why can't datalib take care of addslashes, so the whole of the rest of the code can forget about it? That is how a database abstraction layer should work. I know, it is pointless to moan about it, but it has just cost me 3 hours, so I feel I have earned the right to moan.

This commit is contained in:
tjhunt
2006-08-18 22:34:54 +00:00
parent 865b753486
commit ef82286874
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -755,6 +755,8 @@ function save_question_session(&$question, &$state) {
$session->newgraded = $state->id;
$session->sumpenalty = $state->sumpenalty;
$session->comment = $state->comment;
} else {
$session->comment = addslashes($session->comment);
}
update_record('question_sessions', $session);
}