Commit bf986ecf by Alan Boudreault

server-side check to not set completion if the max_attempts is reached

parent fd3e1723
......@@ -132,6 +132,10 @@ class MentoringBlock(XBlockWithLightChildren):
if self.completed:
completed = True
# server-side check to not set completion if the max_attempts is reached
if self.max_attempts > 0 and self.num_attempts >= self.max_attempts:
completed = False
if completed:
message = self.get_message_html('completed')
else:
......
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