Commit Graph
257 Commits
Author SHA1 Message Date
Florent Lejoly 9b1145001a [FIX] website_slides: use image_1920 instead of invalid 'image' field
Since the renaming of image fields to image_resolution (image_1920 in our case)
slide upload widget is using invalid field.
This commit adapt the field name to use the new naming (image_1920) instead.

Task id: 2179219
PR #43663

closes odoo/odoo#43816

X-original-commit: 5991eb5b3ba9c6fb9426db235da7c8eb3821f0e1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-23 08:40:39 +00:00
Tiffany Chang (tic) 830395e49a [IMP] website_slides,portal_rating: update UX
Minor updates to improve user useability of website_slides primarily with
clearer wording and more intuitive displays/display interactions. Primary
purpose is for onboarding wow.

Related to:

closes odoo/odoo#42030

Task: 2070662
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-16 09:11:27 +00:00
Mohammed Shekha a402dba783 [IMP] website_slides: adapt pdfjs 2.2.228
Use window.pdfjsLib instead of window.PDFJS.
PDF returned through getDocument() has _pdfInfo variable instead of
pdfInfo.

task-2124443

closes odoo/odoo#40917

Related: odoo/enterprise#6900
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-01-07 05:21:22 +00:00
Patrick Hoste 1894dc5414 [IMP] website_slides: allow to download slide content and additional resources
PURPOSE

Currently eLearning lacks feature of having downloadable resources on
lessons. Indeed for example teachers would like to attach zip files or
other resources linked to a given lesson.

SPECIFICATIONS

You can now allow the user to download the slide content for pdf and image
slides. A new icon will be visible next to the fullscreen button on the pdf
viewer.

Course maintainers can also add additional resources to a slide which will be
available to download for the user.

Task ID 2066741
PR #39890

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 09:53:20 +00:00
Patrick Hoste e42ee496f8 [IMP] website_slides: add comments on answers showed after answering a quiz
PURPOSE :

A quiz after a course content is a good way to check if the user gets the previous lesson.
Despite, the user/student may not understand why his answer was wrong/correct.
In this task we'll allow the teacher to add a comment next to the asnwer of a quiz.

SPECIFICATION :

The quiz creator will now be able to comment the answers to inform the frontend user why
his answer is wrong/correct. He will be able to add the comments both in backend and frontend.

Task ID : 2072566
PR : #41188

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-24 08:56:12 +00:00
Patrick Hoste 7b0df05706 [MOV/REF] website_slides: move quiz finish modal to its own dialog widget
This commit moves the finished quiz modal into a dedicated dialog widget.
It will lessen the "slide_course_quiz.js" code length and simplify the dialog template.

Task ID : 2126621
PR : #40801

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-18 09:11:24 +00:00
Florent Lejoly 39979b7558 [FIX] website_slides: fix cancel of uploaded file
Steps to reproduce

  * connect as any user with right to edit website;
  * go to website and chose a course;
  * add content -> chose any of the possibilities;
  * click on choose file, select a file and open it;
  * click on choose file again, and then cancel

You get a traceback. This is due to the right panel that displays a preview
of the selected file. IN this commit we fix that issue by removing the
preview panel.

Task id 2146217
PR#40895

closes odoo/odoo#41837

X-original-commit: e59b86e6474ae994307952d53f4e5a7571ac1763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-13 09:53:13 +00:00
Julien Castiaux c999d98421 [FIX] website_slides: image no more available
[Nighly Runbot #730241](http://runbot.odoo.com/runbot/build/730241)

closes odoo/odoo#41571

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-12-10 10:46:05 +00:00
Julien Castiaux ffeea439ca [FIX] website_slides: move tours under /static/
All assets have to be loadable directly from the browser, /tests/ is not
accessible, /static/ is.
2019-12-10 10:46:00 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Thibault Delavallée 9e0677882d [MOV] website_rating: move to portal_rating
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal

SPECIFICATIONS

Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_ratign module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
qmo-odoo a82fd08813 [FIX] website_slides: Fix traceback when creating content in mobile
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.

The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.

The solution to this is to just use the normal tree view behavior
instead of our override when we are in a mobile environment.

LINKS

closes odoo/odoo#41143

Taskid: 2071342
Pr: #40694
X-original-commit: 0dc7d956c59dfbece1f05e475c227affd51ce435
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 16:00:05 +00:00
Hoste Patrick ec9e389f2f [IMP] website_slides: allow to create and update quizzes directly in frontend
Purpose is to ease designing your courses by allowing to create and update
slide quiz directly in frontend, within the slide display.

With this commit you are able to

  * add a quiz to a slide or add a question to an existing quiz;
  * edit an existing question from a quiz:

   * change the title of the Question;
   * add, remove or update answers;
   * change the right answer;
   * delete an existing question;
   * reorder the questions from a quiz;
   * reset the quiz for the current user if he is a website designer, allowing
     to test the quiz and its answers;

New frontend widgets are introduced allowing to manipulate quiz. Slide page
now supports a readonly / taking quiz mode and an edit mode for quizzes
used notably for website designers / course maintainers.

Task ID : 1999636
PR : #35326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 13:36:25 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Florimond Husquinet (fhu) 07f70e3c10 [IMP] website_slide: add a card description independent from short description
The Channel model contains the two following fields: `description` and
`description_html`. The former is a short plain-text description that can be
filled in the creation form. The latter is a long html-formatted description.

Before this commit:

The description displayed on the card of the course is the `description` field.

After this commit:

There is an additional `description_short` field, which is initialized to the
same value as the `description` field. If the `description` field is modified
the `description_short` reflects the modifications. This happens however only
if the user didn't modify the `description_short` field manually. If it is
modified to another value manually, the link is broken.

Description short is now used only on the course page, below title, in the
header. Description short is used in kanban card displayed in homepage.
Html description is used as a long course description on course page.

Beside, in the creation form of a course, the description textarea is now a
one-line input field to reflect the fact that it's supposed to be a relatively
short description.

Task ID: 2026165
PR #39388

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-21 12:25:52 +00:00
laa 92cc770c90 [IMP] website_slides: indicate new content on courses to users
Purpose of this commit is to help users knowing there is new content in a
course by adding a visual insight. It is done through a new content arrow
displayed in courses homepage.

Regarding the file "website_slides_templates_homepage.xml", the choice to
incorporate the t-call attribute into a 't' balise was necessary to display
the customize option (part front) associated with the model course_card.

Side dish usability improvements raised during development

  * display completed courses as last instead of first in "my courses";
  * do not show promote strategy field for training courses as it has no
    use, only for documentation courses;

TASK ID 2025186
Closes PR #36703

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-20 14:59:07 +00:00
Aurélien Warnon fe74b69f89 [FIX] website_slides: correctly hide "quiz finish" modal on "Next" button
This commit fixes the "quiz finish" modal display by correctly hiding it when the user clicks on
the "Next" button in the modal.

Without this fix, the user could run into an issue where the "modal backdrop" would stay on the
screen, locking all actions and forcing a manual refresh.

Task#2118532

closes odoo/odoo#39899

X-original-commit: 84603c6d928e5ba9b19c4ed3e8b6edbab42a8a5b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-06 15:51:19 +00:00
Patrick Hoste 48a9db604f [FIX] website_slides: can join a course in a quiz preview
PURPOSE

Fix a bug where you get a traceback when trying to join a course on a quiz
preview not in fullscreen mode.

A variable was badly named in JS (id -> channelId), leading to the ID not
being forwarded to the "Join Course" sub-widget.

LINKS

Task ID 2079476
PR #38051

closes odoo/odoo#39891

X-original-commit: b32d30b8cde85ba37f9cef975838874a08ea7c07
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-06 14:34:55 +00:00
Patrick HosteandAurélien Warnon c957949b8c [IMP] website_slides: add an animation when user levels up
PURPOSE

If a user levels up after passing a quiz, we want to clearly show him in the success modal that he
actually passed a level instead of just showing his new rank and xp gauge.

This commit introduces an animation with the progress bar when the user is levelling up.

After reaching the upper bound of the next level:
- The progress bar goes back to 0 ;
- The lower/upper bounds change to reflect the new reached level bounds ;
- The message "Amazing!" becomes "Level Up!" ;
- The motivational phrase changes with a fade out/fade in animation.

LINKS

PR : #39870
Task ID : 2032649

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2019-11-06 13:01:17 +00:00
David Beguin bb35811320 [REF] website_slides : refactor share_modal to use same template(s) in all case
This commit prepares the next one. It creates generic main and sub templates
for slide share modal.

In order to be usable for all cases, header and body sub template have been added.
Also and in the same purpose, as the website url can be another url
than the record to share (or if the record doesn't have website_url), this website_url
can be specified separately from the record. Otherwise, the standard behaviour is to
use the record.website_url.

Task ID: 1950396
PR #31776
2019-10-15 11:45:22 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Juhil Somaiya ececa1f7bf [FIX] *: hide technical field widgets in non-debug mode (Studio)
*:
- account
- barcodes
- calenndar
- hr_timesheet
- mail
- mass_mailing
- partner_autocomplete
- web
- website_slides

This commit removes description of fields that should not be shown in
non-debug mode Studio. Only field widgets whose own description is
set are displayed in non-debug mode Studio in "Widget" of sidebar.
In other words, even if any ancestor has a description but not the
current widget, it won't be displayed in the sidebar in non-debug
mode.

Task-Id 2056992

closes odoo/odoo#35902

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-23 15:00:44 +00:00
Krunal Trivedi 78c0934f76 [FIX] website_slides: display bug after submitting quiz
After submitting the quiz, buttons and validation content was rendering  on top
of the quiz instead of under it. This display bug is fixed in this commit.

Task-2072564

closes odoo/odoo#37040

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-18 06:00:01 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
Thibault Delavallée c3b5f31307 [FIX][IMP] website_slides: move youtube dependent tour in its own tour and test
Contacting youtube API sometimes fails making falsy red runbot. In this commit
we remove video from member tour so that it tests the interface. Some demo
slides with youtube video are added in another course and new test is added
that crawls that channel.

Task 2066565

closes odoo/odoo#36697

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 12:39:26 +00:00
jbm-odoo 34038b7412 [FIX] website_slides: Fix kanban view with group by
id=2069603

closes odoo/odoo#36603

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 08:51:16 +00:00
Christophe Simonis 64e43808b7 [MERGE] forward port branch saas-12.5 up to 58a83d1222 2019-09-20 17:34:45 +02:00
Christophe Simonis 6c948c36bb [MERGE] forward port branch saas-12.5 up to 197474e5b9 2019-09-13 18:07:59 +02:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Lucas Perais (lpe) 42820c35db [FIX] website_slides: adapt youtube api widget to promise
Before this commit, the adaptation of Deferred to Promise was not well done
Hence, the change in video playing status was not handled correclty
i.e. When a video arrives to its end, the next slide or the questions should be displayed

After this commit, when a video is finished, the next slides is displayed

OPW 2052971

closes odoo/odoo#35863

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-20 13:55:48 +00:00
Christophe Simonis b2872e9bab [MERGE] forward port branch saas-12.3 up to 499d3efa7c 2019-08-13 10:08:12 +02:00
mcm-odoo 85e8de1dc8 [FIX] website_{portal, rating, slides): fix navigation tabs color
Text colors were white on a white background which can be difficult to read
in some extreme cases. Sort of.

Task 2026846
2019-08-12 09:57:12 +00:00
asa-odoo 3bd03e27bb [FIX] website_slides: fix quiz completion blocking users in fullscreen
Once a quiz is completed in elearning fullscreen view a pop-up is displayed.
Due to z-index it makes a black overlay on full-screen, so that we can not
click anywhere on the screen.

In this commit we update z-index value fix the issue and make screen clickable.
Website menu is also still clickable.

Task: 2044221
2019-08-09 11:43:44 +00:00
mcm-odoo 896f649285 [IMP] website_slides: improve "New content" modal
Upload new course content should be revamped

  * general layout: https://drive.google.com/a/odoo.com/file/d/1zbNO0Vg1262ijkXA6pwSuenMI0h4NsPm/view?usp=drivesdk
  * remove picture tab;
  * display as two column with preview on right on change of picture
    or document;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:10 +00:00
mcm-odoo e53c398789 [IMP] website_slides: revamp "New Course" menu
Purpose of this commit is to change the modal to make it more mobile friendly.
Notably remove the two columns.

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:45 +00:00
Michaël Mattiello 37bf69dd9d [FIX] website_slides: fixes some display issues in eLearning frontend
Fix some display issues in eLearning

  * fix the share button in documentation. It was not working as model was
    not correctly placed;
  * fix top3 users banners broken in mobile;
  * fix left menu of fullscreen being behind content on mobile (image, video);
  * removed upload button in training channel aside as there are already
    buttons available for that purpose;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:31 +00:00
Michaël Mattiello 8c9473fd78 [IMP] website_slides_{*}: improve backend UI, views and user actions
Purpose of this commit is to perform a back2basics on eLearning backend
views. It helps users in their daily use of eLearning and improve UI.

Containing

  * channel kanban view tweaking;
  * channel form view: some spacing and renaming improvements. Also set
    advanced field (new content email, share template) as group no one;

  * slide kanban view tweaking;
  * removed sections from kanban and list view for contents;
  * contents form view: various improvements, with notably

    * removed field website_url;
    * set publishded date is now readonly, tracked and in group_no_one as
      it is automatically set when publishing the lesson, and people should
      not update it manually;
    * removed the sum "Content" and replaced it by a stat button
    * reword quiz constraint error messages;

  * rating views improvements:
    * revamped the kanban view of rating that were a bit broken;
    * added a pivot view in Reporting/Reviews;
    * updated graph view in Reporting/Reviews;

This commit also provides some usability fixes

  * prevent sending email if new content is category;
  * email: Prevent displaying an image if there is no image;

LINKS

Task 2049640 (website slides back2basics and fiximp)
Task 2058595 (eLearning v13 testing)
2019-09-03 15:02:21 +00:00
Thibault Delavallée 3f4bd44075 [FIX] website_slides: do not allow fullscreen to bypass ACLs
Currently fullscreen takes all information from categorized slides to
display its menu. In order to avoid calls to server some information
is prepared in DOM to speedup loading. It means slide information is
available even when not being member of a course which leads to some content
leak.

This commit fixes that by correctly checking that a slide can be accessed
before allowing to have access to its information and embedded code. Access
of a slide is either member of a course, either course publisher.

Task 2058595 (eLearning v13 testing)
Task 2064112 (fullscreen bug report)
2019-09-03 15:02:16 +00:00
Thibault Delavallée 6d22405987 [FIX] website_slides: do not crash if there is any issue loading quiz data
Template displaying quiz should not crash if call to server did not answer
correctly. Minimal fix is to have void data to display. Real issue is that
unreadable quiz should not be displayed. This will be fixed in an upcoming
fix.

Task 2058595 (eLearning v13 testing)
Task 2064863 (quiz bug report)
2019-09-03 15:02:14 +00:00
Thibault Delavallée bf3cdac628 [FIX] website_slides: avoid display error messages twice in quizz completion
Purpose of this commit is to avoid having error message replacing the
cross used to close the container of the error message.

Task ID 2058595
PR #36281
2019-08-30 15:05:59 +00:00
Thibault Delavallée e9a5dcff74 [IMP] website_slides{_*}: improve demo data
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

Add some demo data to allow demonstrating various flows: training, lessons,
public, private, quizzes, ...

Also prepare future test tours by improving courses that will be used for
tours, notably the public one.

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00
Thibault Delavallée 608ea7f85d [FIX] website_slides: lessen concurrent update by waiting slide completion
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

When switching through slides using the fullscreen player it is quite
common to have concurrent updates on slide.slide.partner model as it is
used to store the viewed and completed. By correctly waiting for the
completion to be done we lessen potential concurrent errors.

LINKS

Task ID 1937768
2019-08-28 13:27:58 +00:00
Aurélien Warnon bee50c4284 [FIX] website_slides: fix auto-completion of Youtube lesson
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

A slide is supposed to be automatically completed in fullscreen mode when
Youtube player reaches the last 30 seconds of the video.

This feature was broken because of wrong Promise completion and also because
Youtube API has apparently changed the way they send "events". "Playing" event
was not sent every X seconds. Function running to check the video timer has
therefore been reworked to take that change into account.

LINKS

Task ID 1937768
2019-08-26 13:33:22 +00:00
mcm-odoo addaec1211 [IMP] website_slides: add modal to (un)subscribe or leave a course
- Before it was not possible to leave a course.
- This commit adds a modal to give the members the possibility to leave
  the course and also subscribe or unsubscribe to get notified or not.
  + Display a warning message when leaving if field enroll value is "payment".

task-1985511
2019-08-22 13:11:31 +00:00
Juhil Somaiya 7a56b76539 [FIX] website_slides: create new course traceback issue
This bug was generated because of the template was not initialized
at proper place, so put the xmlDependency at correct place.

task-2040460

closes odoo/odoo#35409

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-02 12:28:13 +00:00
Thibault Delavallée 26b7b0e286 [MOV] website_rating: rename portal files
PURPOSE

Fix frontend rating and clean a bit module organization

SPECIFICATIONS

In order to ease understanding of portal chatter dependencies let us name
files according to guidelines. In this commit we rename a bit files in
website mail to understand which widgets and portal parts are impacted by
website mail bridge module.

Assets are also moved in their own file to ease module discovering.

LINKS

Task 2057301
PR #35870
2019-08-21 12:50:51 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
mcm-odoo 49bd48ccd2 [IMP] website_slides: make course picture editable in frontend
Purpose of this commit is to allow website designers to change course images
directly from front-end.

Task 2026846
2019-08-13 12:57:19 +00:00
mcm-odoo 2ab0bd3236 [IMP] website_slides: add button to install Surveys application in Slide Upload modal
PURPOSE

Ease discovering of eLearning features by allowing to install surveys
directly from frontend in order to allow certification.

SPECIFICATIONS

Add a button in Upload a document to install Surveys. This button only
appears if surveys is not installed.

When button is clicked, ask for confirmation before installing survey.

LImitate this feature to group system: system people should see the button
and use standard ACLS about module installation.

LINK

Task ID 2026846
2019-08-12 15:40:36 +00:00
Aurélien Warnon 5e4f37a1f8 [REF] website_slides: remove index_content field from slide.slide
The 'index_content' field was only filled when uploading from the frontend.
That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view.
The field was also not cleaned if the slide content changed.

As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
2019-08-12 15:40:36 +00:00