When accessing answers (survey.user_input) through the survey form view, we used a separate action
to hide the test entries.
This could be confusing when you actually wanted to see the test entries for that survey.
This commit changes that to use a default filter instead, leading to the same visual behavior.
Task #2058598closesodoo/odoo#36835
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When a user tests the Survey, he should not get a valid certification document when he succeeds.
To avoid that, we add a "specimen" watermark on the background when the user_input is a test_entry.
In addition, we also don't send the mail containing the certification for test entries.
Task#2058598
Still due to some recent ORM changes: finding a real ID, assigning values
even in create mode with default values.
Task 2058598 (survey internal testing)
PR #36756
Before:
The method _get_mark called Model.exists() just after calling
Model.browse
This process makes 2 calls to database to do almost the same thing
Now:
Removed the method _get_mark and directly call Model.browse
FP feedback
Task 2066646
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
closesodoo/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>
PURPOSE
Perform a back2basics review of survey to improve daily use, new user
onboarding and labelling.
SPECIFICATIONS
When finishing a certification survey, add an overall correctness circular
graph. Quarters are
* correct
* partially (if multiple corrects answers on the survey);
* incorrect
* unanswered
Questions without points are not displayed in this graph.
LINKS
Task 2039068
PR #36229
PURPOSE
Perform a back2basics review of survey to improve daily use, new user
onboarding and labelling.
SPECIFICATIONS
Order answer lines following question order.
Display section in answer lines form view to better understand question and
answer organization.
Add a correct flag on answer lines and display it in user input embedded
view in order to know which line are correct.
LINKS
Task 2039068
PR #36229
PURPOSE
Perform a back2basics review of survey to improve daily use, new user
onboarding and labelling.
SPECIFICATIONS
Reorder some code to better understand module organization.
LINKS
Task 2039068
PR #36229
PURPOSE
Perform a back2basics review of survey to improve daily use, new user
onboarding and labelling.
SPECIFICATIONS
Improve labels of fields and wording in actions. See commit content for proper
specifications.
LINKS
Task 2039068
PR #36229
In order to display some stats on survey's card (in the kanban view), the survey's card has been reorganized:
We remove all the button present in the bottom of the card, button concerned are:
• analyze answers
• test
• share
We recreate the button "share" in the dropdown menu of the card.
We add the next information:
- For each survey with scoring, the number of people who passed the test is displayed as well as the success rate.
- For each survey with scoring and certification, a certification icon is displayed and the string "passed" (corresponding to the number of people who passed the test) bec$
TASK-ID : 2045617
closesodoo/odoo#35479
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This attribute is misleading as it is insufficient to correctly upgrade
the database. It only renames the column in the database, but other
operations are needed, like updating the corresponding `ir.model.fields`
record (and its xmlid). The default values and the translations are also
lost during the upgrade.
Moreover, this feature was misused. It was:
- left on fields during multiple versions.
- used on reports (SQL views). This would be ok if the feature was
complete, but, as is, it was useless.
- kept unchanged after a second renaming of the field (which can happen
versions later the first rename).
- used, even when the meaning of the field changed. i.e. the field
`archived` has been renamed to the classic `active`, but the value
in the database should be switched.
PURPOSE
eLearning should have its own application in manager. Indeed this is becoming
a big application and having it embedded inside Website application is not
enough anymore. It should also hold updated and easy-to-use menus,
navigation, actions and views in backend.
SPECIFICATIONS
Add menu entry inside Courses
* Certifications: kanban view of surveys of type certificate
Add menu entry inside Reporting
* Certifications: list view on surveys of type certificate
Columns: Title, Survey Stage, Registered People, Certified People, Attempts
Success Rate (certified/attempts), Average Results
LINKS
Task 1978729
PR #35061
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
Adds two stats button on res.partner form view :
- The first one will show all the courses that the partner is following.
- The second one will show all the certifications the partner has passed.
When the partner is a company :
- All the courses followed by all the partners are shown without duplicate.
- All the certifications passed by all the partners are shown.
PR : #34908
Task ID : 2034097
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
To avoid having to wait the cron that distribute badges to elligible users,
we run the cron manually at the survey passed
if the survey is a certification and if the certification delivers a badge.
Task ID : 1935136
PR #31486
This commit allow gaining a badge at the end of a certification survey if succeeded.
The badge can be configured on the survey if the certification mode is activated.
The badge is linked directly to the survey and not the challenge,
because it makes more sense to configure directly the reward on the survey and
not the way to gain this reward. As the way is always the same.
Only one badge can be set on the certification survey.
Only the name, description, image and badge level can be configured.
The rest of badge configuration is automatically set to correspond to the use case.
When a badge is configured on a certification survey, the needed challange, goal
and challenge line are autogenerated.
The badge is available on the user's profile page if he gained it.
Once the badge is configured on the survey, he cannot be changed
(remove + create new one), only modified (badge attributes edition).
The only way to remove the badge is to uncheck 'certification_give_badge'.
When removing the badge from the certification survey, all the autogenerated
records (at badge creation) are deleted to avoid ghost records (as they have
no purpose outside of this context). If the badge is owned by someone, the badge
is only archived. If nobody owns the badge, the badge is deleted.
Survey users now have the right to create badges but not challenges or goals.
All the autogenerated records are handled in sudo, to allow the survey user
to configure a badge on their survey.
Note : To avoid having to rewrite the complete context in an xpath expression
only to display the certification badge on the user's profile page,
the default website_published value of the certification badge is defined
directly in the survey module even if survey does not depend of website.
This attribute will be ignored until website module is installed.
Task ID : 1935136
Closes PR #31486
Purpose
=======
This commit adds the attempt number on the answer (= survey.user_input)
form & tree views.
The attempt number is always relative to its "pool" of attempts and
depends on the "invite_token" if specified.
ex: Attempt n° 2 / 4 (where "4" is the attempts_limit of the related survey).
closesodoo/odoo#31771
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.
Task 1937686
closesodoo/odoo#31243
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
As other modules than survey (namely hr_skills) now need a hook to add specific
behavior when a survey answer is marked as 'done', we removed the '_send_certification'
method and replaced it with a '_mark_done' method.
It will make it easier to override this method as it has a more generic meaning.
closesodoo/odoo#32880
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- When tyring to test a survey as a "Survey User" you are redirected to the
homepage.
This is due to a faulty access rights check that only allows "Survey
Managers" to test them.
closesodoo/odoo#33132
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Task#1958723
This commit fixes the survey form to allow creating, testing and sharing
surveys that don't have sections as long as they don't use the "page_per_section"
layout.
closesodoo/odoo#32159
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, user input lines of type ´datetime´ are not
correctly displayed in both situations:
1. not displayed at all in the survey result frontend page
2. the answered value is not displayed in the form view of
a user input line.
This commit fixes both issues
closesodoo/odoo#31815
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Purpose
=======
This commit adds a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.
On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.
Purpose
=======
The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.
This commit adds the quizz_passed field in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)
Purpose
=======
This commit fixes the shared dict in the survey statistics computation that
causes surveys to incorrectly share the same stats when computed in batch.
Puprose
=======
This commit fixes the survey to allow sending invitation even if the survey
has no pages as long as the questions_layout is 'page_per_question'.
Task #1940360
Subtask of #1902304
Purpose
=======
Adds certification capabilities to the website_slides module.
Channel/courses can now include certifications as a new type of slide.
This new type of slide is available as a "Certification" button on the slide creation
frontend view (next to "Video", "Presentation", ...).
Users have to link the slide to an actual survey that has the 'certificate' field
set to true (that will populate the slide's survey_id field).
Slides of type certification are handled in frontend in a very simple way for now:
- A button "Begin certification" that redirects the user to the related survey frontend.
- A button "Download certification" when the user has succeeded the certification.
- When the survey is done, if it's linked to a slide, a button "Go back to course" allows
the user to go back to the slide frontend.
(There is a special use case for when the website_publisher designing the survey lands on a
certification slide: he is allowed to test the survey with a survey_input created as test_entry)
Survey creation as well as limited time, limited number of attempts, ... are still completely
handled in the survey module. That means that the user will have to first create a suitable survey
that is a certification and only then create a slide of type "certification" and link
the created survey to it.
Ideally, the taking of the survey should be transparently included in the slide frontend but
it requires a full refactoring of the way surveys are submitted. This will most likely come in
a later commit.
This commit is an advanced merge of full eLearning module (see task #1902304).
Task #1902306
Purpose
=======
When you invite people to take a certification multiple times, the user will have his "attempts" count reset
with every invitation.
This is important when there is a limited number of attempts available.
ex: A user invited twice will have 2 x allowed_attempts_count to succeed the survey.
Attempts are now separated in different pools using a "invite_token" field on the survey.user_input.
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.
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.
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.
Purpose is to clean a bit those fields. A field holding the number of send
invitations is added as well as a button. It allows to directly jump on
answer linked to an invite which helps dealing with private surveys.
This commit is linked to task ID 1935176 and PR #30689 .
A field exists to differentiate answers done manually through frontend of
survey and answers created through invitation. The field was not correctly
set by the invite wizard. This commit fixes it.
This commit is linked to task ID 1935176 and PR #30689.
Purpose of this merge is to improve access mode and authentication management
introduced at 9771fdfe8f . Purpose of this cleaning is to simplify options and make
them clearer. Instead of a selection with 4 entries we propose to use two
fields on survey model :
* access_mode: everyone with a public link can access and answer; or only
invited people;
* login required: whether people have to login to answer or not;
All main use cases are covered with combination of those two options.
This commit is linked to task ID 1932508 and PR #30508.
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.
- Change the default value of the Validation Error message on
the Date : "The answer you entered is not valid."
- If long page, click on next and one error, the page should go up
to allow the visitor to see where the error is.
Task ID : 1911291
Closes PR #29054
Purpose of this commit is to remove test entries from statistics and reports
in survey. Indeed they are not real results and should not be taken into
account. We also display a warning on portal page of surveys when user is
in test mode.
This commit is linked to task ID 1865453 and PR #29316.
Purpose of this commit is to add a category selection field on surveys. It
will allow to filter / select surveys according to their category and their
main use.
This commit is linked to task ID 1911586 and PR #28986.
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.
Purpose is to clean and simplify invite wizard on surveys. Main purpose is
to simplify options.
Public link is displayed for public surveys, allowing to quickly share
it. When sending emails a token is now generated for each recipient. There is
no "batch public link" sending option anymore as it is not really necessary.
Check is done on recipients and emails to match the access mode option. Having
a restricted survey gives the same limitations on people to invite (users,
employees, ...).
Code is cleaned to ease its understanding and prepare future evolution notably
with appraisals.
An existing mode field is added on invite model. All options are currently
not used but it prepares future addition to survey, notably for certifications.
Its purpose is to know what to do with existing tokens when inviting new
recipients. It is used notably to resend tokens through the user_input form
view instead of relying on a custom context key.
This commit is linked to task ID 1911586 and PR #28986.
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.
Purpose of this commit is to adapt controllers and routes to new ACLs. As
survey access is now controlled routes have to use survey ID and browse
records as sudo when access is granted.
This commit is linked to task ID 1911586 and PR #28986.
Otherwise having this value coming from a view triggers a write on the
survey stage model. This write is unnecessary ad is_closed should really
be readonly. It may also causes access rights issues notably for survey
users that cannot update stages.
This commit is linked to task ID 1911586 and PR #28986.