Skip to content
Snippets Groups Projects
Commit e973bd55 authored by Aurélien Warnon's avatar Aurélien Warnon
Browse files

[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: default avatarDavid Beguin <dbe@odoo.com>
parent 5e6c09a1
No related branches found
No related tags found
No related merge requests found
Showing
with 1285 additions and 112 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment