Commit 83971e2f by dragonfi

Publish grades until student completes exercise

parent 0d8925d5
...@@ -179,9 +179,10 @@ class DragAndDropBlock(XBlock): ...@@ -179,9 +179,10 @@ class DragAndDropBlock(XBlock):
if self._is_finished(): if self._is_finished():
final_feedback = self.data['feedback']['finish'] final_feedback = self.data['feedback']['finish']
# only publish the grade once # don't publish the grade if the student has already completed the exercise
if not self.completed: if not self.completed:
self.completed = True if self._is_finished():
self.completed = True
try: try:
self.runtime.publish(self, 'grade', { self.runtime.publish(self, 'grade', {
'value': len(self.item_state) / float(tot_items) * self.weight, 'value': len(self.item_state) / float(tot_items) * self.weight,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment