diff --git a/lib/questionlib.php b/lib/questionlib.php index 58b5155eee0..fbecc814fc8 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -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); } diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index 30d66ce3141..20540add13d 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -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;