question flags MDL-22643 Manually commenting should not reset the flag state.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user