diff -uNr moodle.orig/lib/questionlib.php moodle/lib/questionlib.php
--- moodle.orig/lib/questionlib.php	2007-03-19 17:01:39.000000000 +0000
+++ moodle/lib/questionlib.php	2007-03-21 17:50:18.000000000 +0000
@@ -943,8 +943,10 @@
     }
     // Check for unchanged responses (exactly unchanged, not equivalent).
     // We also have to catch questions that the student has not yet attempted
-    $sameresponses = (($state->responses == $action->responses) or
-     ($state->responses == array(''=>'') && array_keys(array_count_values($action->responses))===array('')));
+    $sameresponses = $QTYPES[$question->qtype]->compare_responses($question, $action, $state);
+    if ($state->last_graded->event == QUESTION_EVENTOPEN && question_isgradingevent($action->event)) {
+        $sameresponses = false;
+    }
 
     // If the response has not been changed then we do not have to process it again
     // unless the attempt is closing or validation is requested
@@ -979,13 +981,14 @@
 
         // Unless the attempt is closing, we want to work out if the current responses 
         // (or equivalent responses) were already given in the last graded attempt. 
-        if((QUESTION_EVENTCLOSE != $action->event) and $QTYPES[$question->qtype]->compare_responses(
-         $question, $state, $state->last_graded)) {
+        if(QUESTION_EVENTCLOSE != $action->event && QUESTION_EVENTOPEN != $state->last_graded->event &&
+                $QTYPES[$question->qtype]->compare_responses($question, $state, $state->last_graded)) {
             $state->event = QUESTION_EVENTDUPLICATE;
         }
 
         // If we did not find a duplicate or if the attempt is closing, perform grading
-        if ((!$sameresponses and (QUESTION_EVENTDUPLICATE != $state->event)) or (QUESTION_EVENTCLOSE == $action->event)) {
+        if ((!$sameresponses and QUESTION_EVENTDUPLICATE != $state->event) or
+                QUESTION_EVENTCLOSE == $action->event) {
             // Decrease sumgrades by previous grade and then later add new grade
             $attempt->sumgrades -= (float)$state->last_graded->grade;
 
