10bb041a45213c2c155840c44358bd8a87385974
How to reproduce: 1. Open eLearning app 2. Go to any course having document with quiz. 3. Solve the quiz 4. Click multiple time quickly on 'Done' (green tick) button. 5. Multiple quiz are displayed if your connection is slow or you click fast enough. The fix ensures that only one quiz is displayed. We do the same change for video to prevent such problem with them. Technical note: when clicking on the "green tick" of the quiz, the method _toggleSlideCompleted is called which cause a _renderSlide. That method clears the content div (o_wslides_fs_content) and appends a new Quiz widget to that div. The problem is that the "append" is asynchronous (it call the "willStart" of Quiz widget that fetch the quiz) so if you click multiple time, the content div is cleared multiple times and then after each quiz created is ready (after having fetched the data), they are appended to the content div, resulting in multiple quiz displayed. We solve the problem by avoiding concurrent execution of the _renderSlide method: the body of the method is skipped when the rendering is ongoing (for example while waiting the quiz from the server). As the method is inserting the slide at the same place, its behavior was anyway unpredictable because depending on the response time of each request. By skipping the method body while already running we make it a bit more predictable, avoid the content duplication on the page, and we avoid unnecessary call to the server. Task-3412847 closes odoo/odoo#154069 X-original-commit: 72e035274de3bbf7fcc858008bc00d095163e7f3 Signed-off-by: Stéphane Debauche (std) <std@odoo.com> Signed-off-by: Pierre-Yves Dufays (pydu) <pydu@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%