summaryrefslogtreecommitdiff
path: root/addons/website_slides/data
diff options
context:
space:
mode:
authorFlorent Lejoly <fle@odoo.com>2019-09-30 11:25:38 +0000
committerThibault Delavallée <tde@odoo.com>2020-03-12 08:30:16 +0000
commit660e1054311d0115a107750aa30b9c282d10875f (patch)
tree5da5e664eb7dfad682f6524121e0240859d327e8 /addons/website_slides/data
parent1a92829c7dc21e1af1dcc72fbac7cc4633e9f570 (diff)
[IMP] website_[sale_]slides: allow users to take the slide quiz before joining the course
PURPOSE When previewing a slide of type 'quiz', users are tempted to answer the questions even if they are not member of the course yet. This commit will allow users to answer the quiz without being a member of the course, and offer a smart redirection to join / buy based on the enroll type of the channel. SPECIFICATIONS We introduce a "CourseJoinWidget" that will handle the display and the behavior of the "join" button based on the user (public or not) and the enroll type (public course or based on a payment). When the user answers questions and he's not a member yet, we store the answers temporarily in the session object. When he comes back on the quiz page after having completed his membership, we fill in the quiz based on his previously entered answers and clean the session. LINKS Task 2045571 PR #41972 Co-authored-by: Florent Lejolyn <fle@odoo.com> Co-authored-by: Aurélien Warnon <awa@odoo.com>
Diffstat (limited to 'addons/website_slides/data')
-rw-r--r--addons/website_slides/data/slide_slide_demo.xml3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website_slides/data/slide_slide_demo.xml b/addons/website_slides/data/slide_slide_demo.xml
index e4761ec3d1c..fa19dff58f1 100644
--- a/addons/website_slides/data/slide_slide_demo.xml
+++ b/addons/website_slides/data/slide_slide_demo.xml
@@ -75,7 +75,7 @@
<field name="channel_id" ref="website_slides.slide_channel_demo_0_gard_0"/>
<field name="is_published" eval="True"/>
<field name="date_published" eval="datetime.now() - timedelta(days=8)"/>
- <field name="is_preview" eval="False"/>
+ <field name="is_preview" eval="True"/>
<field name="public_views">0</field>
<field name="completion_time">1</field>
<field name="description">Show your newly mastered knowledge !</field>
@@ -126,7 +126,6 @@
<field name="question_id" ref="slide_slide_demo_0_4_question_1"/>
</record>
-
<!-- CHANNEL 1: Taking care of Trees -->
<!-- ================================================== -->