Skip to content

Commit

Permalink
bugs fix minor
Browse files Browse the repository at this point in the history
1.Actually save module and training progress
 Earlier, the status of module or training progress was not being updated.
2.If the user has completed a module, then we should be sending them to the first content or quiz, but because of a small bug, we were redirecting them to end of module
  • Loading branch information
superryeti committed Mar 28, 2023
1 parent 5b827de commit b71b467
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion physionet-django/training/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def take_module_training(request, training_id, module_id):
if not resume_content_or_quiz_module:
resume_content_or_quiz_from = 1
else:
resume_content_or_quiz_from = resume_content_or_quiz_module.get_next_content_or_quiz().order
resume_content_or_quiz_object = resume_content_or_quiz_module.get_next_content_or_quiz()
resume_content_or_quiz_from = resume_content_or_quiz_object.order if resume_content_or_quiz_object else 1

# get the ids of the completed contents and quizzes
completed_contents = training_progress.module_progresses.filter(
Expand Down

0 comments on commit b71b467

Please sign in to comment.