question flags MDL-22643 Manually commenting should not reset the flag state.

This commit is contained in:
Tim Hunt
2010-08-04 18:56:51 +00:00
parent f6c7f15883
commit f23f98dd63
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -1943,6 +1943,7 @@ function question_process_comment($question, &$state, &$attempt, $comment, $grad
// Update the comment and save it in the database
$comment = trim($comment);
$state->manualcomment = $comment;
$state->newflaggedstate = $state->flagged;
if (!$DB->set_field('question_sessions', 'manualcomment', $comment, array('attemptid'=>$attempt->uniqueid, 'questionid'=>$question->id))) {
return get_string('errorsavingcomment', 'question', $question);
}
+1 -1
View File
@@ -462,7 +462,7 @@ class quiz_attempt extends quiz {
* Static function to create a new quiz_attempt object given an attemptid.
*
* @param integer $attemptid the attempt id.
* @return object the new quiz_attempt object
* @return quiz_attempt the new quiz_attempt object
*/
static public function create($attemptid) {
global $DB;