Files
odoo_source/addons/survey/tests/__init__.py
T
nie d7961f1489 [FIX] survey: conditional score with sections
Steps:
- Go to Surveys
- Create an new survey:
  - Questions:
    1. First section
    2. First question:
       - Multiple choice: only one answer
       - Answers:
         1. First answer
            - Choice: Yes
            - Is a correct answer: Checked
            - Score for this choice: 1
         2. Second answer
            - Choice: No
    3. Second question:
       - Multiple choice: only one answer
       - Answers:
         1. First answer
            - Choice: Yes
            - Is a correct answer: Checked
            - Score for this choice: 1
         2. Second answer
            - Choice: No
       - Options tab:
         - Conditional display: Checked
         - Triggering question: (First question)
         - Triggering answer: (First question, First answer)
  - Options tab:
    - Layout: One page per section
    - Scoring: Scoring with answers at the end
- Click Test
- Select the two correct answers
- Submit

Bug:
The score is 50% instead of 100%.

Explanation:
Since multiple questions are submitted at the same time, we cannot know
before saving the question whether the following is still going to be
active.

This commit re-evaluates, for each question, which are the ones that are
still active.

opw:2537713

closes odoo/odoo#72126

X-original-commit: ec836acdc7bf10212f14a8bc98eac4cfa2f12e26
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-06-14 13:46:36 +00:00

17 lines
574 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import common
from . import test_survey
from . import test_survey_flow
from . import test_survey_flow_with_conditions
from . import test_certification_flow
from . import test_survey_invite
from . import test_survey_security
from . import test_survey_randomize
from . import test_survey_ui_certification
from . import test_survey_ui_feedback
from . import test_survey_ui_session
from . import test_survey_compute_pages_questions
from . import test_certification_badge