summaryrefslogtreecommitdiff
path: root/addons/auth_oauth
diff options
context:
space:
mode:
authorOdoo's Mergebot <xmo+roboto@odoo.com>2020-03-19 17:00:26 +0100
committerGitHub <noreply@github.com>2020-03-19 17:00:26 +0100
commit70f3dd8a17f10e1206c9cd7fc48fd2fe904766b0 (patch)
treefdd15f1866573bbceb7cc921b858a8384af12408 /addons/auth_oauth
parent0beebad0ffa9df2295ef5104e1092dcb39f4f903 (diff)
parent0ca0e681db14df2a029bc294f7c4c4d91686a627 (diff)
[IMP] survey: allow more question type scoring
### PURPOSE Support correct answers, scoring mechanism, and demo data on additional question types: - Numerical Value - Date - Datetime Additional improvements and fixes include: - When checking answer type, add in check to allow 0 as a valid survey answer to a question of type Numerical Value. - Include "most common" tab for question type Date in results page. - Do not show skipped answer (i.e. blank User Response value) rows in results page tables (for results of non-choice questions). ### SPECIFICATIONS **New question types scoring:** Previously only the question_types: 'simple_choice' and 'multiple_choice' could be scored and have a "correct" answer(s). This change makes it so that question_types: 'numerical_box', 'date', and 'datetime' can also have a "correct" answer and an associated 'answer_score'. Some restructuring of scoring logic was required in order to accommodate and better streamline new question_types scoring. Demo and testing data also added for these new scorable question types. New demo data includes both scored and unscored (i.e. answer_score = 0) instances for the 3 question types to ensure differing behavior is viewable in survey results. During this update, errors in existing demo data were fixed when discovered. The same demo data additions/updates were duplicated in the relevant tests. **Additional improvements/fixes:** - Answer type check: additional conditional needed to handle 0 evaluating to False even though it is a valid entry as a numerical value. - "most common" tab added only for Date since it is currently not expected to be useful for Datetime questions. Implementation is left generic for future additional question types scoring implementations. - Skipped answers were shown either as a blank value for Date, Datetime, Multiple Line Text Box, Single Line Text Box or 0.0 for Numerical Value question types. A simple check to skip these skipped lines from being shown in the results page is all that is needed. - Light rewriting of question form view to include answer-related options and choices directly in the "Answer" tab. LINKS Upgrade PR: odoo/upgrade#835 Task ID: 2061937 closes odoo/odoo#43014 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/auth_oauth')
0 files changed, 0 insertions, 0 deletions