Commit Graph
48 Commits
Author SHA1 Message Date
Thibault Delavallée 65c3be37fd [FIX] survey: set email_from on certification mail template
Otherwise public users cannot receive their certification. Indeed email_from
will be the one of public user which is probably not set.

Task 2067872 (eLearning internal testing)
Task 2058598 (survey internal testing)
PR #36756
2019-09-13 10:05:15 +00:00
mcm-odoo f1b9ce5462 [IMP] (website_slides_)survey: add demo data for certifications
This commit adds a few demo data for the certifications.

FP feedback

Task 2066646
2019-09-11 09:16:40 +00:00
Hardik PrajapatiandMohammed Shekha 2581076a09 [IMP] survey: do not set a question type on question being section
This commit header is quite fun. If a question is not a question it should
not have a type. Maybe it should not be a question but, hey, you don't always
do what you want. That's life my dear Lucette.

In this commit we remove required attribute from python field definition of
question_type and make it required conditional based. Real questions have a
type, unreal questions have no type.

Alss update Questions menu entry to display only real questions, not unreal
questions.

Most of this commit message makes no sense, but remember who asked to push
this model.

Task 2053833

closes odoo/odoo#35835

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>


Co-authored-by: Hardik K Prajapati <hap@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-30 11:09:21 +00:00
Victor Feyens 50caae5bc0 [REF] survey: replace dynamic survey.stage by a static state on survey.survey
Stages modification through the clickable statusbar wasn't very intuitive.
By fixing default behavior through states (and corresponding buttons), default user experience is simplified.

3 static states available : draft, open, closed

Form view: navigation through states with buttons
Kanban view: disabled modification of survey state

Task ID : 1949110

closes odoo/odoo#32325

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-25 14:17:45 +00:00
Thibault Delavallée 678e04c19d [FIX][IMP] various: improve lang computation in mail templates
Purpose: add lang definition on templates where it is missing

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Priyanka Kakadiya 61495126ae [FIX] survey: correct score of answer in demo data
- when answer is correct, then score should be +1.

Related to Issue: 1967506

closes odoo/odoo#32612

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-11 07:02:59 +00:00
Aurélien Warnon 2fb9fe279a [FIX] survey: prevent certification email from being sent twice
Purpose
=======

The certification email template had both "email_to" and "partner_to" fields set
and that implied the mail being sent twice.

This commit removes the "partner_to" field to fix it.
2019-03-18 08:03:46 +00:00
Aurélien Warnon 7070fa3219 [IMP] survey: rename 'Survey' to 'Certification' when relevant
Purpose
=======

This commit reworks some views to rename 'Survey' to 'Certification'
for a better visual integration of the new certification flow.
2019-03-11 10:46:11 +00:00
Aurélien Warnon 445541989f [IMP] survey: add randomization and survey layout selection
Task #1902306

Purpose
=======

The "page" concept is now only present in the user interface.
Surveys are split in "sections" that have two purposes:
- Organizing a (long) survey/certification
- Allow to pick a random questions count for that section (more information here after)

On the user interface, based on the questions_layout field, surveys are displayed:
- On a single page, where sections still appear but are only used as visual separations
- On multiple pages, having one page per section (this matches the previous behavior)
- On multiple pages, having one page per *question*

On top of that page concept, this commit added randomization for the survey questions.
The randomization mechanism will take X questions per section of the survey.
The survey.user_input is initialized with the selected questions to be sure to keep that
set of questions and avoid showing a new set of questions every time the user refreshes the page.
This also allows to easilly go back and know which question we have to show.
2019-02-06 10:34:43 +00:00
Aurélien Warnon afb1abbb60 [IMP] survey: scoring & certification
Task #1902306

Purpose
=======

This commit adds certification capabilities to the survey module.

A certification is a survey with the "certification" flag set to true than can be linked
to a certification email template that contains a certification document (PDF).
This template can be edited by the user in the technical settings to customize the certification email/document.

To be able to implement this certification concept, we also have to add scoring mechanisms to surveys.
survey.questions of type 'simple_choice' and 'multiple_choice' now have scores for the suggested answers.
These question scores allow to compute a global score that is used to determine whether the user has successfully
passed the certification or not.

As additional features, we also have:
- A time limit with an interface timer that limits the test to X minutes
  When reached, the survey is automatically submitted and unregistered (= unsubmitted) answers are not taken into account.
- A limited number of attempts for the survey/certification
  If reached, the user can't take the survey/certification anymore

The 'survey result' layout was adapted accordingly to show the success rate of participants and the correct answers
to the survey questions.

Specs
=======
- Create a new survey :
  - Add a description field for the survey

- Options on a survey :
  - Passing score : (sum of all good answers) in %
  - If No scoring => No passing score, no certificate
  - If Scoring with answers => Passing score and can see the answers (can create certificate)
  - If Scoring without answers => Passing score but can't review the answers at the end (can create certificate)
  - for the questions, if "no scoring" selected, can 't see the option "good answer" and "score" on the questions
  - If the 2 others options, can see the options "good answer" and "score" on the questions
  - all the types of questions are available for each option.

- Questions
  - Add the option correct answer on the multiples questions (one or more good answers)

- Certifications
  - If scoring, force "mandatory" for "mutliple choices (1or multiple answers)"
  - On the dashboard => visual information that this specific survey is a certification
  - Time Limit : The student is informed on the home screen of the survey of the time limit.
    The clock start when he clicks on "start survey"
  - Template of the certificate : send email with attachment PDF

- Front-end :
  - Add some margin
  - Replace "Back to survey" with the blue-bar from the portal
  - Add a timer (start when the survey starts)
  - Add a progress bar (number of section and number of question inside the section)

- Analyse of the results :
  - First a global graph with the number of people who''ve participated and passed the test

- Stages of a survey :
  - Remove the stage "Permanent"
  - 3 stages :
    - draft : not on-line but can be tested (with phantom token)
    - In progress : on-line
    - closed : not on-line
  - Who can test a survey : the manager and the user. Add this condition to the phantom token.
2019-02-06 10:34:40 +00:00
Aurélien Warnon dba4783326 [REF] survey: convert survey.page to survey.question -> is_page=True
Task #1902306

Purpose
=======

survey.question is now also the model used for the survey's pages (with the "is_page" field set to True).
This allows to put all the pages and questions together in a o2m field on the view side and
easily reorganize your survey by dragging the items around.

It also removes one level of encoding by directly having 'Add a page' and 'Add a question'
links on the tree view of questions, enabling a faster encoding.

However, this has the downside of making the code reading a little bit more complicated.
Efforts were made at the model level to create computed fields so that the use of these models
still seems somewhat logical. That means:
- A survey still has "page_ids" (question_and_page_ids filtered on is_page = True)
- These "page_ids" still have question_ids (questions located between this page and the next)
- These "question_ids" still have a "page_id"

That makes the use and display of these information at view and controller levels easier to understand.
2019-02-06 09:37:59 +00:00
Thibault Delavallée c801eecf23 [IMP] survey: access survey through access tokens
Purpose of this commit is to use an access token to access survey instead
of their ID. Routes are updated to use that token instead of the survey ID.
Purpose is to have less discoverable routes and be able to control a bit more
survey access even if it is not really a security parameter.

Some renaming is performed to avoid confusion in terms. Survey token and
answer token are now clearly labeled differently in the code to know which
model we are working on.

Some templates are updated to directly use the answer as base record to
have access to token and test_entry fields instead of giving those parameter
values directly in the controller. It makes some more diff but also allow
easier edition and improvement in templates when having directly survey
and answer record available.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:11:50 +00:00
Thibault Delavallée bde36a276e [FIX] survey: fix invite mail template
Purpose of this commit is to improve the recently-introduced mail template
used to invite people to surveys. Containing

 * fix the display of deadline that is not required;
 * correctly talk about survey, not apparaisal;

This commit is linked to task ID 1932508 (side-dish fix).

closes odoo/odoo#30537
2019-01-25 09:21:50 +00:00
Thibault Delavallée 7d110c20c5 [REF] survey: refactor template use on invite wizard
Purpose of this merge is to remove the ugly __URL__ hack of survey templates.
It is solved by making template rendered on user_input model. This means each
invitation recipient will received its own rendered mail. Small jinja code
allows therefore to include the url in a clean odoo-style way.

Subject and body in survey invite wizard are not rendered anymore. It means
jinja could be displayed. This is necessary as this wizard will work in batch
mode, rendering the body on each recipient.

This commit is linked to task ID 1911586 and PR #28986.
2019-01-14 15:22:18 +00:00
Thibault Delavallée 7c50807bec [REF] survey: improve access mode options and survey form view
In this commit we extend access option on survey model. Access mode is now
defined as

 * public: everyone can access this survey. People having a link to the survey
   can create answers and fill survey. Those are used for example as
   satisfaction surveys;
 * login required: only users can access this survey. Depending on auth
   signup configuration this either limits survey access or forces people
   to create an account;
 * employees only: only users belonging to base.group_user can access this
   survey. Those are used for example for internal polls;
 * on invitation only: only people receiving a token can access this survey.
   They do not need to be an user, having a token is sufficient. Those are
   used for example for appraisals;

Note that survey officers and managers can always create and update answers
according to their ACLs.

In this commit we also improve a bit survey form view while changing the
access field. Surveys users now have access to all buttons and some labels
have been updated to better fit current Odoo style. Archive button is now
always displayed as it is considered as a standard way of managing surveys.

This commit is linked to task ID 1911586 and PR #28986.
2019-01-14 15:22:18 +00:00
Thibault Delavallée 7df9cd7ca6 [IMP] survey: improve demo survey
Purpose of this commit is to provide a new simpler survey as demo data in
survey application. Current survey is about Odoo use which is not coherent
with the demo data set used currently in Odoo. It is now a survey about
ecommerce use with an example of each different questions.

Survey tour is updated accordingly. It now uses a standard routing instead
of the test route. Indeed purpose of tests is to use real life use case
not corner case like testing capabilities of survey application.

This commit is linked to task ID 1912228 and PR #29303.
2018-12-06 14:49:15 +01:00
Thibault Delavallée 6da632a68e [MOV] survey: split and move files according to their underlying model
Purpose of this commit is to polish a bit this old module before working
on it. Contains

 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * move data lost in views to data files (server action notably);
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;

No functional behavior change should occur with this commit. Only move
has been performed.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-14 14:57:27 +00:00
Thibault Delavallée 066d677b56 [MOV] survey: rename files according to guidelines
Purpose of this commit is to rename some files before going into some more
work. No split or cleaning is done here, only preparing by doing some pure
renaming.

No functional behavior change should occur with this commit. Only move
has been performed.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-14 14:51:25 +00:00
mreficent b70ccc45bd [REF] survey: rename survey.question type field to question_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:13:09 +00:00
Haresh Kansara cebf0c740c [IMP] survey: make templates more modern and updated with Odoo guidelines
In this commit we improve templates used in survey. Purpose of this commit
is to have templates that embed or use standard Odoo email layouts to make
them look modern and have a common style across all emails.

Main guidelines

 * better use of div / p / br to try to lessen layout issues, especially
   when updating templates using the editor;
 * correctly sequence the templates fields definition;
 * correctly set templates values notably auto_delete and user_signature
   fields to avoid confusion;
 * correctly layout the email content using light notification email. It
   can either propagate the layout choice through various send mail methods
   or directly embed the styling in the templates for more technical or
   complex templates;
 * use email_formatted computed field when possible to avoid having hand-made
   from / to addresses;
 * fix various typos and improve subjects when necessary;

Content of emails is not necessarily updated as the purpose of this task is
about styling, not content itself.

This commit is linked to task ID 1843224 (and 1868112) and to PR #25313
(and #25889).
2018-07-24 15:33:22 +02:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
Thibault Delavallée efd55ab8a5 [REF] various: rename openerp node to odoo in xml files 2016-08-10 15:48:10 +02:00
Tanguy Charlier 09ea5c7d49 [IMP] survey: add gc of empty survey userinputs in the autovacuum cron 2016-07-15 12:57:51 +02:00
Martin Trigaux b776d66d85 [FIX] all: ressource -> resource
Courtesy of Kris Krnacs
2015-10-01 10:54:04 +02:00
Yenthe 0f5e557172 [IMP] survey: Launchpad > Github
As seen on the translation for Transifex. Shouldn't Launchpad be Github?
2015-09-07 12:49:49 +02:00
Jaysinh Shukla 72b48a4111 [FIX] survey: Fixing documentation link in demo data of survey page. 2015-06-09 11:14:24 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Richard Mathot (OpenERP) b177624219 [FIX] Demo data
bzr revid: rim@openerp.com-20140408152022-n9ol6aaypxgkb5mn
2014-04-08 17:20:22 +02:00
Richard Mathot (OpenERP) 42aee473b4 [FIX] Adapting demo data to the new model
bzr revid: rim@openerp.com-20140408145835-036xh7znapwdxcsz
2014-04-08 16:58:35 +02:00
Richard Mathot (OpenERP) 33fb17ab9f [IMP] Survey: Lots of usability improvements (wip)
bzr revid: rim@openerp.com-20140407133140-mu2dl1zkq6wazuob
2014-04-07 15:31:40 +02:00
Richard Mathot (OpenERP) e32122fda8 [IMP] New demo data: answers for surveys + [TYPO] in previous demo data
bzr revid: rim@openerp.com-20140324095021-7t85wpv0e8bnn4p8
2014-03-24 10:50:21 +01:00
Richard Mathot (OpenERP) 2ffa234d3d [IMP] survey:
- Kanban view refactoring
- Move to Marketing menu
[FIX] survey:
- stages display

bzr revid: rim@openerp.com-20140321145434-4l7wvpizqurdsj8v
2014-03-21 15:54:34 +01:00
Richard Mathot (OpenERP) 7a77412cca [IMP] Update demo data: add stages
bzr revid: rim@openerp.com-20140321075345-a9wfarz2etaijy4p
2014-03-21 08:53:45 +01:00
Richard Mathot (OpenERP) fbbe8631c9 [FIX] Partial fix of 'hr_evaluation', which is broken by the new 'survey' + code cleaning and simplification
bzr revid: rim@openerp.com-20140211153524-kxupg07ns5dny658
2014-02-11 16:35:24 +01:00
Richard Mathot (OpenERP) b650340a29 [FIX] adaptation of hr_recruitment module to the new version of survey
bzr revid: rim@openerp.com-20140207162615-n8txh4ymlipatbwl
2014-02-07 17:26:15 +01:00
Richard Mathot (OpenERP) 206e4cbeb5 [DEMO] Demo answers (part)
bzr revid: rim@openerp.com-20140207131428-qen2nri5yqtgouap
2014-02-07 14:14:28 +01:00
Richard Mathot (OpenERP) c8a320553c [IMP] Quizz mode
bzr revid: rim@openerp.com-20140205081626-0e1r5g71c53r5x5w
2014-02-05 09:16:26 +01:00
Richard Mathot (OpenERP) 04870c93b4 [IMP] Demo data: recruitment form
bzr revid: rim@openerp.com-20140123111831-0vx0ahpbbc31t0oy
2014-01-23 12:18:31 +01:00
Richard Mathot (OpenERP) 6d7f084067 [IMP] Demo data: user feedback form
bzr revid: rim@openerp.com-20140122110748-cxajrf6vf4zjg886
2014-01-22 12:07:48 +01:00
Richard Mathot (OpenERP) 81c60f7123 [FIX] Sequence error in demo data
bzr revid: rim@openerp.com-20140121160540-115gx2qdz1z38l4a
2014-01-21 17:05:40 +01:00
Richard Mathot (OpenERP) a6f149d9b3 [IMP] Demo data: employee appraisal form
bzr revid: rim@openerp.com-20140121134348-fnd0g7slscuzcrls
2014-01-21 14:43:48 +01:00
Richard Mathot (OpenERP) 108d9d258d [ADD] new demo data
bzr revid: rim@openerp.com-20140120161339-91u7ljxnnd03dh70
2014-01-20 17:13:39 +01:00
Richard Mathot (OpenERP) 47fd05247e [IMP]
bzr revid: rim@openerp.com-20140114074322-99mm19e3o2002diz
2014-01-14 08:43:22 +01:00
Richard Mathot (OpenERP) fe8a84f0c1 [IMP] Demo data for OpenERP pre-certification
bzr revid: rim@openerp.com-20140107105348-faca9zwgzdoecrlg
2014-01-07 11:53:48 +01:00
Richard Mathot (OpenERP) 9d69b2f702 [FIX] Small fixes
bzr revid: rim@openerp.com-20140106151245-lump4flfquxuv1wu
2014-01-06 16:12:45 +01:00
Richard Mathot (OpenERP) 08c04d6199 [REF] moving cron to data
bzr revid: rim@openerp.com-20140106084812-nbgc6o6rx8312wy9
2014-01-06 09:48:12 +01:00
Richard Mathot (OpenERP) 313dd2a49e [IMP] Demo data (wip)
bzr revid: rim@openerp.com-20140102132415-iipu8f7gkjvvf07q
2014-01-02 14:24:15 +01:00