From 835007df6fcdead2472920f14fbdfd09b6ba0a13 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Wed, 31 Aug 2022 15:34:43 +0200 Subject: [PATCH] Quiz validation in seminar_progress now check for validation date --- teleforma/context_processors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py index 18560d93..323c5b56 100644 --- a/teleforma/context_processors.py +++ b/teleforma/context_processors.py @@ -138,7 +138,9 @@ def seminar_progress(user, seminar, more=False): for quiz in quizs: if quiz: quiz_weight = 3 - quiz_validations = QuizValidation.objects.filter(user=user, quiz=quiz, validated=True) + startdate = seminar.date_added + enddate = seminar.expiry_date + quiz_validations = QuizValidation.objects.filter(user=user, quiz=quiz, validated=True, date_validated__range=[startdate, enddate]) total += quiz_weight if quiz_validations: -- 2.39.5