Introduce field for teacher comments, in preparation for manual grading

This commit is contained in:
gustav_delius
2006-04-06 16:42:00 +00:00
parent b4f3e56cc1
commit 3a5a6f59a3
5 changed files with 15 additions and 10 deletions
+2 -1
View File
@@ -573,7 +573,7 @@ function get_question_states(&$questions, $cmoptions, $attempt) {
// The question field must be listed first so that it is used as the
// array index in the array returned by get_records_sql
$statefields = 'n.questionid as question, s.*, n.sumpenalty';
$statefields = 'n.questionid as question, s.*, n.sumpenalty, n.comment';
// Load the newest states for the questions
$sql = "SELECT $statefields".
" FROM {$CFG->prefix}question_states s,".
@@ -715,6 +715,7 @@ function save_question_session(&$question, &$state) {
$state->attempt, 'questionid', $question->id)) {
$newest->newgraded = $state->id;
$newest->sumpenalty = $state->sumpenalty;
$newest->comment = $state->comment;
update_record('question_sessions', $newest);
}
}