summaryrefslogtreecommitdiff
path: root/addons/website_slides/controllers/main.py
diff options
context:
space:
mode:
authorqmo-odoo <qmo@odoo.com>2019-02-22 09:47:39 +0000
committerjem-odoo <jem@openerp.com>2019-03-12 15:31:40 +0000
commitfd78a40836dad044bfb8c0ab30fcb37fc8ecf9af (patch)
treeb784b1227767b66a0fb041cd85a8d96989ebc8ea /addons/website_slides/controllers/main.py
parentc9f832d9f032b6af51807b387b325b5c2b8aad00 (diff)
[REF] website_slides: revamp fullscreen widget
This commit makes the 'Fullscreen' page a complete odoo widgets. We decided to split it into some sub widget: - Fullscreen: will be the master piece, handle communication of components, displaying slide content, setting slide as completed, handling server RPC calls, .... - Sidebar: responsible for slide navigation, based on the table of content. (prev, next, keyboard naviguation, ...) - VideoPlayer: display content for Youtube video and handling player event to auto set as completed, ... The DOM of this page is still rendered serverside. DOM was cleaned in order to be less complex and less deep. CSS style was also reviewed to decrease line of code. Fullscreen is now completely using Quiz widget with events triggered. Task-1942852
Diffstat (limited to 'addons/website_slides/controllers/main.py')
-rw-r--r--addons/website_slides/controllers/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py
index f8ebb91a70b..70137487c0c 100644
--- a/addons/website_slides/controllers/main.py
+++ b/addons/website_slides/controllers/main.py
@@ -622,8 +622,10 @@ class WebsiteSlides(WebsiteProfile):
'quizKarmaWon': quiz_info['quiz_karma_won'],
}
- @http.route('/slides/slide/quiz/submit', type="json", auth="user", website=True)
+ @http.route('/slides/slide/quiz/submit', type="json", auth="public", website=True)
def slide_quiz_submit(self, slide_id, answer_ids):
+ if request.website.is_public_user():
+ return {'error': 'public_user'}
fetch_res = self._fetch_slide(slide_id)
if fetch_res.get('error'):
return fetch_res