When finishing (and succeeding) a certification in the e-learning module, you can 'share' the content of the course by email. But the "Send Email" button is unresponsive. This is caused by having nested `<form>` tags: the one of the share modal is inside the main survey form element. To resolve this issue, we turn the `<form>` tag into a `<div>` tag in the sharing template, as it does not need to be a form since it's never submitted. Indeed, the sharing request is sent through attaching an event handler on the "Send Email" button which still works fine after our tag replacement. Note that this fix requires updating the module, but there is no (easy) way to fix it otherwise, and we consider it acceptable as the impact is pretty low. In addition to that, we also need to add a survey form JS override to correctly attach the "ShareMail" widget when the screen is loaded to the "finished" page. Indeed, as the survey form loads and replaces its content in AJAX rather than fully reloading the page, we need to watch for the screen refresh and then manually attach the widget so that the button handler is functional. During FW to 16.4, we also fixed a small oversight of: odoo/odoo@e0257347a7 Where we did not correctly add the "email_sharing" parameter when sharing the certification content in the success screen. Task-3360175 closes odoo/odoo#130613 X-original-commit: 337762b864d7b06abd7d1622083c5f00d7c7e7f7 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
51 lines
2.0 KiB
Python
51 lines
2.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
{
|
|
'name': "Course Certifications",
|
|
'summary': 'Add certification capabilities to your courses',
|
|
'description': """This module lets you use the full power of certifications within your courses.""",
|
|
'category': 'Website/eLearning',
|
|
'version': '1.0',
|
|
'depends': ['website_slides', 'survey'],
|
|
'installable': True,
|
|
'auto_install': True,
|
|
'data': [
|
|
'security/ir.model.access.csv',
|
|
'views/slide_channel_views.xml',
|
|
'views/slide_slide_partner_views.xml',
|
|
'views/slide_slide_views.xml',
|
|
'views/survey_survey_views.xml',
|
|
'views/website_slides_menu_views.xml',
|
|
'views/website_slides_templates_course.xml',
|
|
'views/website_slides_templates_lesson.xml',
|
|
'views/website_slides_templates_lesson_fullscreen.xml',
|
|
'views/website_slides_templates_homepage.xml',
|
|
'views/website_slides_templates_utils.xml',
|
|
'views/survey_templates.xml',
|
|
'views/website_profile.xml',
|
|
'data/mail_template_data.xml',
|
|
'data/gamification_data.xml',
|
|
'views/res_config_settings_views.xml',
|
|
],
|
|
'demo': [
|
|
'data/survey_demo.xml',
|
|
'data/slide_slide_demo.xml',
|
|
'data/survey.user_input.line.csv',
|
|
],
|
|
'assets': {
|
|
'web.assets_frontend': [
|
|
'website_slides_survey/static/src/scss/website_slides_survey.scss',
|
|
'website_slides_survey/static/src/js/slides_upload.js',
|
|
'website_slides_survey/static/src/js/slides_course_fullscreen_player.js',
|
|
'website_slides_survey/static/src/xml/website_slide_upload.xml',
|
|
'website_slides_survey/static/src/xml/website_slides_fullscreen.xml',
|
|
],
|
|
'survey.survey_assets': [
|
|
'website_slides_survey/static/src/js/survey_form.js',
|
|
'website_slides_survey/static/src/scss/website_slides_survey_result.scss',
|
|
],
|
|
},
|
|
'uninstall_hook': 'uninstall_hook',
|
|
'license': 'LGPL-3',
|
|
}
|