1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-27 02:55:25 +02:00

Changed score calculation in survey

This commit is contained in:
Ehouarn
2025-07-23 16:48:59 +02:00
parent 296d021d54
commit bfa5734d55
5 changed files with 240 additions and 55 deletions

View File

@ -1246,6 +1246,10 @@ class WEISurveyView(LoginRequiredMixin, BaseFormView, DetailView):
if not self.survey:
self.survey = CurrentSurvey(obj)
if request.GET.get("reset") == "true":
info = self.survey.information
info.reset(obj)
# If the survey is complete, then display the end page.
if self.survey.is_complete():
return redirect(reverse_lazy('wei:wei_survey_end', args=(self.survey.registration.pk,)))