Commit 9823f0ea by Xavier Antoviaque

Merge pull request #17 from aboudreault/increase-first-right-attempt

Always increase the first right attempt, and always display completed message then
parents 81702c53 93039336
......@@ -125,15 +125,15 @@ class MentoringBlock(XBlockWithLightChildren):
child.save()
completed = completed and child_result['completed']
# Once it has been completed once, keep completion even if user changes values
if self.completed:
completed = True
if completed:
message = self.get_message_html('completed')
else:
message = ''
# Once it has been completed once, keep completion even if user changes values
if self.completed:
completed = True
if self.has_missing_dependency:
completed = False
message = 'You need to complete all previous steps before being able to complete '+\
......@@ -147,11 +147,11 @@ class MentoringBlock(XBlockWithLightChildren):
'max_value': 1,
})
self.completed = bool(completed)
if not self.completed and self.max_attempts > 0:
self.num_attempts += 1
self.completed = bool(completed)
return {
'submitResults': submit_results,
'completed': self.completed,
......
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