Commit Graph
232 Commits
Author SHA1 Message Date
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 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
Aurélien Warnon 5269d8c27f [REF] website_slides: improve duration computation of a slide/course
The completion time of a slide now has default values for slides of type

  * video (duration of the YouTube video);
  * PDF (number of pages * 5 minutes);

This computation is done when uploading a slide in frontend or by an onchange
in backend. Field can still be given / modified by elearning people as
result may not be reliable (pdf parsing is not accurate, and/or you may
estimate time differently from strict page-based computation).

The course will sum up all durations of its (active) slides. Display has been
changed from "x minutes" to "x hours y minutes".

Task ID 2007294
2019-08-12 15:40:36 +00:00
Aurélien Warnon 5233c9097f [IMP] website_slides: remove checkbox "always visible" at lesson upload
Since af690f678f one can toggle the free preview boolean directly from
the slide list view in frontend. It is therefore not necessary to add
this checkbox when uploading it.

Task ID 2007294
2019-08-12 15:40:36 +00:00
mcm-odoo 91fc042454 [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 15:40:36 +00:00
Aurélien Warnon 0daf434ed8 [FIX] website_slides: correctly resolve course fullscreen YT Promise 2019-08-08 08:37:31 +00:00
Aurélien Warnon 3716a9b261 [FIX] website_slides: fix pdfjs library loading
This is (most likely) related to #32181 which lazy loads most assets.

That caused an issue where the global 'Util' variable from PDFJS can be (depending of which libraries load first)
overridden by the global 'Util' variable of bootstrap.
(See 'lib/bootstrap/js/util.js' and 'lib/pdfjs/src/shared/util.js')

This commit ensures that the global 'Util' variable is set to the one of PDFJS right before it's used.

Eventually, we should update or get rid of one of the two libraries since they're not compatible together,
or make a wrapper that makes them compatible.
In the mean time, this small fix allows not refactoring all of this and can not cause much harm.
2019-08-08 08:37:07 +00:00
qmo-odoo 340613d068 [REF] website_slides: revamp channel form view
PURPOSE

Like already done for sale order, invoice of survey, purpose of this commit
is to remove category model and replace by a flagged line (slide). It allows
to easily reorder slides in an embedded list view.

SPECIFICATIONS

This commit completely reworks the slide.channel form view

  * improve the content management from the form itself by adding a tree view
    with the possibility of drag and dropping slides from category to category.
    This tree view has buttons to quickly add content or certification. It
    also allow to add a category (slide with flag is_category) without opening
    a modal;
  * reorder tabs and fields, improve some labels;
  * add a custom float field widget to display ratings as stars;
  * add stat button for partners who completed/certified ;the course
  * add stat button that redirects to the forum posts;
  * add stat button that redirects to the channel reviews;

LINKS

Task 1978731
PR #33255
2019-08-08 08:29:34 +00:00
qmo-odoo b180c66a80 [REF] website_slides: replace slide.category by slide with is_category flag
PURPOSE

Like already done for sale order, invoice of survey, purpose of this commit
is to remove category model and replace by a flagged line (slide). It allows
to easily reorder slides in an embedded list view.

SPECIFICATIONS

Instead of having a fully fledged slide.category model, slide.slide will serve
that purpose with a is_category flag. This will allow to drag and drop slides
and sections in the channel form view.

This change had an impact on the way slides were added/sorted on the front-end.
In fact, whenever a slide is added from the front-end, a resequencing of all
the slides in the course has to be triggered.

Category of a slide is now a computed field based on the sequence. Order
of slides is based on sequence, with categories splitting the slide list based
on is_category flag.

In this commit tests are added. Some cleaning in tests is also performed to
speedup a bit tests (savepointcase) and some cleaning / renaming to ease
their understanding.

Future commit will add JS necessary to manage slides in the section list view.

LINKS

TaskID: 1978731
PR: #33255
2019-08-08 08:29:34 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Thibault DelavalléeandJérémy Hennecart 98bdb241de [IMP] website_slides: add an overview (kanban view) on course model
PURPOSE

eLearning should have its own application in manager. Indeed this is becoming
a big application and having it embedded inside Website application is not
enough anymore. It should also hold updated and easy-to-use menus,
navigation, actions and views in backend.

SPECIFICATIONS

Add course (slide.channel) kanban view. Each tile should contain

  * Title of the course (make it big, o_primary)
  * Tags below the title
  * Primary button "New Lesson"
  * Statistics :
    * Attendees
    * Running (progress != 100%)
    * (if one content is certificate) Certified or Finished
  * See
    * v1: https://drive.google.com/a/odoo.com/file/d/13K8FmkbwmBG4JQ5gH3Q5T8OlWPs3blcu/view?usp=drivesdk

With FP remarks https://drive.google.com/a/odoo.com/file/d/1mb7LUT0VUNs5fMcKB9c0Bfaqk2-XFFuu/view?usp=drivesdk
  * remove globe, type and visibility of course, lessen padding between rating
    views and watch time;
  * for rating, instead of 8.00 => 5 reviews (4.5/5);
  * replace "View Lesson" / "Invite" by "View Course" => Send to the front-end
  * In the menu of the card, add:
    * Invite (same behavior than before, when it was a primary btn)
  * click on x Contents:  land on the contents, group by category with sequence
  * re-order of the 3 infos/Stats at the bottom of the card: 1. Content,
    2. Attendee, 3. Certified
    * + number: font-weight: 500 + font-size 1.2em
    * + labels: remove text-uppercase, + text-color: #666666
    * + the "whole box" is clickable

LINKS

Task 1978729
PR #35061

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.com>
2019-08-05 08:40:33 +00:00
Thibault Delavallée 54192e4648 [IMP] website_slides: add a new kanban view for ratings
PURPOSE

eLearning should have its own application in manager. Indeed this is becoming
a big application and having it embedded inside Website application is not
enough anymore. It should also hold updated and easy-to-use menus,
navigation, actions and views in backend.

SPECIFICATIONS

Add in menu Courses, a new entry Reviews
  * Kanban view, full width, no default group by
    * Order by date (most recent on top)
    * See: https://drive.google.com/a/odoo.com/file/d/1IYE1QBIJa26BLugRiafyBop-srkYwndC/view?usp=drivesdk
    * add a tag for unpublished comments
    * Add the pic of the user above the stars
    * Click on card, send to front-end and able to (un)publish the comment
    * Kind of what's on the front-end:  https://drive.google.com/a/odoo.com/file/d/1e9aQSWvUM2QOynRT08XSUzIjFiGnjsv8/view?usp=drivesdk

LINKS

Task 1978729
PR #35061
2019-08-05 08:40:33 +00:00
jpr-odoo 21fb7a1f00 [FIX] website_slides: fix the title of the page in fullscreen mode
before this commit, the title of the page is not correct in fullscreen mode

after this commit, set the lesson name as the page title in the fullscreen mode
and changed the title of the page as per click on lesson name

task-2040899

closes odoo/odoo#35161

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-30 11:37:22 +00:00
Romain Derie cc1d78a80b [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
  on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
  `is_published` which would just go through the related for no reason.
  Plus, using `is_published` will make the field tooltip more accurate as we
  are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
  related field, which is just a readonly when we are not in a frontend
  context.
- Some create and write function would have security check on
  `website_published` value but that was wrong as the user could bypass that by
  simply writting on `is_published`. For the write method, check `is_published`
  is more accurate as it will cover both case since `website_published` will
  then call the write method on `is_published`
2019-08-03 09:51:22 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Juhil Somaiya 860ab5a1c2 [FIX] website_slides: fix webiste menu being not clickable in lesson fullscreen
Before this commit, the navigation menu was not clickable because of higher
z-index of the slides fullscreen menu. This commit fixes that by correctly
setting z-index, using the standard variable to avoid custom values.

task-2036877

closes odoo/odoo#35107

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-23 13:44:06 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Lucas Lefèvre 9d29056989 [FIX] website_slides: Display button when not in fullscreen
When answering a quiz, the button "Check your answers"
is not displayed when not in fullscreen.

JS error: `def.resolve is not a function`
because an already instantiated Promise does not have a
resolve function.
A promise cannot be resolved from outside its callback scope.

closes odoo/odoo#34762

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-11 07:14:05 +00:00
Julien Castiaux f69bd5c23c [FIX] website_slides: fix typo in enroll attribute
opw-2032459

closes odoo/odoo#34686

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-09 11:22:45 +00:00
Christophe Simonis 5e81b18e24 [MERGE] forward port branch saas-12.3 up to 0247d2f35f 2019-06-27 20:45:52 +02:00
Christophe Simonis 6c5783bd5a [MERGE] forward port branch saas-12.2 up to 465909f0fd 2019-06-27 19:10:09 +02:00
Christophe Simonis cf51b5f25d [MERGE] forward port branch saas-12.3 up to 793933a128 2019-06-25 14:23:48 +02:00
qmo-odoo cd8afe8546 [IMP] website(_sale)_slides: Add login,join,buy button on quiz
This commit improves the elearning onboarding on the quizzes

If the user is not logged in, a log in button will show up under
the quiz

If he is logged in but not a member of the course and the course is public,
a join button will appear under the quiz

If the course needs to be bought, a buy button will appear under the quiz.

If the course is on invite only, a message under the quiz will inform the
user about it

TaskID: 2003986
PR: #33861

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-24 10:51:27 +00:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00