From b71b46768c35f4a88f57ce2b02b8786592d00560 Mon Sep 17 00:00:00 2001 From: Amit Upreti Date: Mon, 27 Mar 2023 21:21:42 -0400 Subject: [PATCH] bugs fix minor 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 --- physionet-django/training/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/physionet-django/training/views.py b/physionet-django/training/views.py index 5f781cb69f..b1b1ccf592 100644 --- a/physionet-django/training/views.py +++ b/physionet-django/training/views.py @@ -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(