Skip to content

Commit

Permalink
question flags MDL-22643 Manually commenting should not reset the fla…
Browse files Browse the repository at this point in the history
…g state.
  • Loading branch information
timhunt committed Aug 4, 2010
1 parent f6c7f15 commit f23f98d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/questionlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/attemptlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ function __construct($attempt, $quiz, $cm, $course) {
* 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;
Expand Down

0 comments on commit f23f98d

Please sign in to comment.