diff options
| author | Florent Lejoly <fle@odoo.com> | 2019-11-27 12:51:28 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-04-16 10:26:32 +0000 |
| commit | 24033e4aaf65a52fedaa13fc0846eb745238f09d (patch) | |
| tree | c15a062d15ba6d1776ad2a4fee237735d6951d51 /addons/website_slides_survey/static/src/xml/website_slide_upload.xml | |
| parent | dd53c515c8c4d63ec714c765db911f2407bae175 (diff) | |
[IMP] website_slides,_survey: allow certification creation at frontend
Purpose
=======
Before this commit, in the front end, you had to create a certification before
adding it to a course. This commit allows creation of certification in
front-end with pre-filled settings.
Functional Spec
===============
1. On a course, add content, type certification, you can choose an existing one
(normal flow) or create a new one in the dropdown by typing a new survey
name (new flow).
3. When submitting (Publish or save as draft), a certification survey, with
pre-filled settings is created and linked to the slide.
Pre-filled settings:
* One page per question
* Attempts limit : 1
* Time limit : no limit
* Scoring without answers
* Passing score : 70%
* Is Certification : True
* Email Template : Certification: Send by email
* Give Badge : False
4. After submit, the user stays on the Course Content.
5. A toaster is displayed in the top right saying:
Toaster's Title: Certification created
Content: Follow this link to add questions to your certification.
<a>Edit certification</a>
A website editor can select a certification (if available) for the creation of
a slide.
Task id: 1981399
PR #43577
Co-Authored-By: Florent Lejoly <fle@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Diffstat (limited to 'addons/website_slides_survey/static/src/xml/website_slide_upload.xml')
| -rw-r--r-- | addons/website_slides_survey/static/src/xml/website_slide_upload.xml | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/addons/website_slides_survey/static/src/xml/website_slide_upload.xml b/addons/website_slides_survey/static/src/xml/website_slide_upload.xml index 0b273a15b21..073a16277c3 100644 --- a/addons/website_slides_survey/static/src/xml/website_slide_upload.xml +++ b/addons/website_slides_survey/static/src/xml/website_slide_upload.xml @@ -3,33 +3,28 @@ <t t-name="website.slide.upload.modal.certification"> <div> <form class="clearfix"> - <div class="form-group row"> - <label for="certification_id" class="col-form-label col-md-3">Certification</label> - <div class="controls col-md-9"> - <input class="form-control" id="certification_id" required="required"/> + <div class="row"> + <div class="col" id="o_wslides_js_slide_upload_left_column"> + <div class="form-group"> + <label for="certification_id" class="col-form-label col-md-3">Certification</label> + <input class="form-control" id="certification_id" required="required"/> + </div> + <div class="form-group"> + <label for="upload" class="col-form-label">Choose an Image</label> + <input id="upload" class="form-control" data-prevent-onchange='true' name="file" accept="image/*" type="file" required="required"/> + </div> + <t t-call="website.slide.upload.modal.common"/> + <canvas id="data_canvas" class="d-none"></canvas> </div> - </div> - <t t-call="website.slide.upload.modal.common"/> - <div class="form-group row"> - <div class="col-md-4"> + + <div id="o_wslides_js_slide_upload_preview_column" class="col-md-6 d-none"> <div class="img-thumbnail"> <div class="o_slide_preview"> <img src="/website_slides/static/src/img/document.png" id="slide-image" title="Content Preview" alt="Content Preview" class="img-fluid"/> </div> </div> - </div> - <div class="col-md-8"> - <ul class="list-group"> - <li class="list-group-item"> - <h5 class="list-group-item-heading"> - <label for="upload" class="col-form-label">Cover Image File</label> - </h5> - <input id="upload" name="file" class="form-control" accept="image/*" type="file" required="required" data-prevent-onchange="1"/> - </li> - </ul> - </div> - </div> - <canvas id="data_canvas" class="d-none"></canvas> + </div> + </div> </form> </div> </t> |
