Purpose
=======
Change all masculine nouns in Odoo's code to neutral nouns (when
possible), making sure that demo data is correctly handled. This is
particularly important since our code is open source, and nowadays lots
of machine learning models are trained on open source repositories.
With this small change we contribute to training more "fair" models, and
teaching models that "employee" or "user" != "he".
This also affects some text visible by the user, hence making it more
inclusive for Odoo users.
Task-2853046
closesodoo/odoo#91292
Related: odoo/enterprise#27302
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When the user submits a quiz, the user will not get much feedback. To
improve the user experience, we will now indicate how many points the
users earned per question. With that information, the users could detect
errors and report them to the administrators. We will also add some
minor layout improvements to make things clearer.
When the administrator creates a quiz, the administrator might not want
to set a limit on the number of attempts that a user can have on a quiz.
To allow that, we added an option in the quiz settings called 'Unlimited
Tries'. When the administrator checks that option, a button will appear
below the quiz and will let the users reset the quiz at will.
Sometimes, the administrator might also want to (1) give points for an
answer that is not wrong or (2) give no point for a correct answer. This
is not currently possible as we considered that the correct answer is the
answer that rewards points. To allow that, we will add a new boolean
field on each answer to mark the correct answer.
task-2504216
COM PR: odoo/odoo#69585
UPG PR: odoo/upgrade#2408
Right now, if we want to add a quiz to the event track, we need to
create it from the m2o field available in the form view. But it is
not very intuitive as user will have to select 'Create and Edit'
option from the m2o drop-down. Quick create is not really helpful
here. Also, trying to add question for the quiz will pile up the
modals which looks messy.
With this commit, in the event track's form view, we:
- Remove the m2o for `quiz_id` (from the track form view, not from model)
- Introduce "Add Quiz" header button, which redirects user to form view
of the quiz, with no option to create new quiz directly as only one quiz
should be linked to quiz. Also, once the quiz is added, this button will
be hidden.
- Introduce new stat button "Go to Quiz", which redirects user to the form
view of quiz (again, does not allow creation from the same reason). This
button is visible only if the quiz is already added for the track.
Apart from that, re-arrage the quiz form view `event_quiz_view_form` by
putting 'Event' and 'Event Track' fields on the same line, and we utilize
the same view while creating / updating quiz from the track.
Note:
Since the creation of quiz is now done in its own form view (with action button
"Add Quiz" from track's form view), we are passing the default `event_track_id`
while creating the quiz. It means that we don't need to compute it anymore.
Instead, now we need to compute the `quiz_id` on the track, based on the
`event_track_id` field alreay set on the quiz.
So, we introduce new One2Many `quiz_ids` field to compute the `quiz_id` on the
track, and we remove `event_track_ids` from the quiz. Basically, the logic of
setting `quiz_id` (on the track) and `event_track_id` (on the quiz) is inverted
with the commit, and the demo data is updated accordinlgy.
TaskID-2486552
closesodoo/odoo#70067
Related: odoo/upgrade#2522
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Community menu field is added in website_event module. It is used in two
inheriting modules, website_event_meet and website_event_track_quiz. There
is no other common ancestor for those two modules.
In website_event, community menu field should be False and not displayed
as it has no real use. Only in those sub-applications it should be
computed like other menu fields, and displayed in event views (both
event and event type for configuration).
PR #56340
RATIONALE
Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...
PURPOSE
Allow to configure a quiz on event tracks, much like eLearning.
The quiz is taken at the end of the live stream / track video.
(Or when the talk is 'live' of 'done').
SPECIFICATIONS
Users can now configure an event.quiz on event.track.
The quiz is a simple collection of event.quiz.questions that in turn contain
a few event.quiz.answers.
Only one of the answer is considered as correct and should be configured with
"awarded_points" greater than 0.
On the event.track frontend page, attendees can take the quiz when the track
is "live" (or "done") and earn the total amount of configured awarded_points.
Each quiz can only be taken once (if you fail, you can't try again).
Attendees are then ranked in a leaderboard that is displayed in the "Community"
section of the event frontend menus.
The leaderboard allows to see your own position as well as basic search for
other attendees.
The points earned during the event are event-specific and will not be shared
with other instances of event.event.
Points as well as quiz completion are stored in the relationship between a
visitor and a track (event.track.visitor).
The models are very much based on a similar feature in website_slides, even
though the implementation in event is not karma based.
We will probably have to merge the features later into a base gamification_quiz
module.
LINKS
Task ID-2252655 (Main Online Event task)
Task ID-2283771 (Quizzes on Talks, Leaderboard)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>