-
- Downloads
[IMP] survey: add a 'live session' mode to the survey app
PURPOSE
Add a "live session" mode for survey that allows the host to interact with its
audience.
He controls the pace of the survey and the audience answers questions one at a
time.
Results for each question can be displayed by the host to adapt his speech in
real time.
A gamification component even allows to give points to the attendees, based on
the quickness of their answer, and create ranking to keep everyone's attention.
SPECIFICATIONS
This whole feature is deeply integrated with survey.
It adds a layer of "survey session" on top if it that gathers attendees and
answers during the lifespan of the session.
The attendee identity is filled in by a special question that is marked as
"Save as user nickname".
If the host has not configured that question or if the user doesn't answer,
they are marked as "Anonymous" in the rankings.
The answer score computation is also altered during the session to take the
speed of the answer into account.
To ease the access to the survey to attendees, we have introduced two new
routes in the survey main controller:
- '/s/123456'
That uses the 6 first characters of the token to give quick access to the
survey and allow typing the URL manually somewhat conveniently.
- '/s' that renders a view that asks the attendee to enter the survey 'code',
which then redirects to the previous route.
This commit also fixes a few bugs:
- A bugged use case with the "enter key" listener.
When the survey is done, we display a "result template" that shows the user
his score and allows him to retry if possible.
When this template is displayed, we don't want to listen to the "enter" key
that allows to submit the survey form.
- We now correctly remove the timer and initialize the result
widget when the user presses 'enter' on the last page / question.
SURVEY SESSION FLOW
HOST point of view:
- On the Survey Form, the host configures:
- "Reward quick answers" that gives more points to attendees if they answer
quickly
- Question Time Limit, on each question, that defines the time limit for
that specific question, allowing to have different (or no) timer for each
question.
- From the Survey Form, the host can start a "live session"
Only one session per survey can be running at a time.
- When he starts the session, the session_state is marked as 'ready', meaning
all attendees landing on the survey page will be part of the session.
- The host will land on a page showing the current number of attendees as well
as the link for the attendees to join that session.
- The host starts the session, activating the first question of this session.
We keep an active reference to the "current_question_id" and use the bus to
trigger an event that will refresh the survey page for all attendees, showing
them the question and allowing them to answer.
- The host gets a "question management screen", from which he can:
- See the current question text & suggested answers
- See the current question timer
- See the number of answers received for the question
- Display the answers of the question (same view as the survey "results"
page, but only for the question)
- Display the ranking of attendees (if "competitive mode" is enabled)
- The host controls the pace of the survey by moving to the next question until
it's the last one of the survey, then ends the current session.
When the session is closed, we mark the answers of the attendees as "done".
- The host lands on a screen where he sees the survey results and the ranking
of all attendees.
ATTENDEE point of view:
- He reaches the survey when a session and open, and gets a screen asking him
to wait until the host decides to start the session.
- When the sessions starts, he's automatically redirected to the first question
(see above).
- If the session is already started when he reaches the link, he lands on the
current question (and NOT on the first one)
- If the host has configured a time limit, the attendee sees the countdown
while he's answering.
- When the attendee answers the question, the screen tells him the answer is
registered and he has to wait for the host to go to the next question, which
will happen automatically.
- If the timer reaches 0 and he has not submitted his answer, it's too late and
he waits for the next one.
- It continues like that until the end of the session.
- At the end of the session, the attendee gets a screen with his global results
(same as a regular scored survey).
PR #43568
Task 1972640
Co-authored-by:
David Beguin <dbe@odoo.com>
Showing
- addons/survey/__manifest__.py 1 addition, 0 deletionsaddons/survey/__manifest__.py
- addons/survey/controllers/__init__.py 1 addition, 0 deletionsaddons/survey/controllers/__init__.py
- addons/survey/controllers/main.py 110 additions, 23 deletionsaddons/survey/controllers/main.py
- addons/survey/controllers/survey_session_manage.py 118 additions, 0 deletionsaddons/survey/controllers/survey_session_manage.py
- addons/survey/data/survey_demo_feedback.xml 1 addition, 1 deletionaddons/survey/data/survey_demo_feedback.xml
- addons/survey/data/survey_demo_quiz.xml 6 additions, 0 deletionsaddons/survey/data/survey_demo_quiz.xml
- addons/survey/models/survey_question.py 14 additions, 2 deletionsaddons/survey/models/survey_question.py
- addons/survey/models/survey_survey.py 178 additions, 2 deletionsaddons/survey/models/survey_survey.py
- addons/survey/models/survey_user.py 97 additions, 18 deletionsaddons/survey/models/survey_user.py
- addons/survey/static/src/js/survey_form.js 169 additions, 29 deletionsaddons/survey/static/src/js/survey_form.js
- addons/survey/static/src/js/survey_quick_access.js 66 additions, 0 deletionsaddons/survey/static/src/js/survey_quick_access.js
- addons/survey/static/src/js/survey_result.js 12 additions, 4 deletionsaddons/survey/static/src/js/survey_result.js
- addons/survey/static/src/js/survey_session_manage.js 323 additions, 0 deletionsaddons/survey/static/src/js/survey_session_manage.js
- addons/survey/static/src/js/survey_timer.js 1 addition, 2 deletionsaddons/survey/static/src/js/survey_timer.js
- addons/survey/static/src/scss/survey_form.scss 158 additions, 31 deletionsaddons/survey/static/src/scss/survey_form.scss
- addons/survey/tests/common.py 5 additions, 0 deletionsaddons/survey/tests/common.py
- addons/survey/tests/test_certification_flow.py 3 additions, 0 deletionsaddons/survey/tests/test_certification_flow.py
- addons/survey/tests/test_survey_flow.py 3 additions, 0 deletionsaddons/survey/tests/test_survey_flow.py
- addons/survey/views/assets.xml 6 additions, 0 deletionsaddons/survey/views/assets.xml
- addons/survey/views/survey_question_views.xml 13 additions, 0 deletionsaddons/survey/views/survey_question_views.xml
Loading
Please register or sign in to comment