Commit 6ab6beaa by Filippo Valsorda

Once completed, lock score by checking self.completed

parent d9423680
...@@ -148,6 +148,8 @@ class MentoringBlock(XBlockWithLightChildren): ...@@ -148,6 +148,8 @@ class MentoringBlock(XBlockWithLightChildren):
elif completed and self.next_step == self.url_name: elif completed and self.next_step == self.url_name:
self.next_step = self.followed_by self.next_step = self.followed_by
# Once it was completed, lock score
if not self.completed:
score = sum(r[1]['score'] for r in submit_results) / float(len(submit_results)) score = sum(r[1]['score'] for r in submit_results) / float(len(submit_results))
self.runtime.publish(self, 'grade', { self.runtime.publish(self, 'grade', {
'value': score, 'value': score,
......
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