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
closesodoo/odoo#36697
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#35863
Signed-off-by: Christophe Simonis <chs@odoo.com>
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
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)
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)
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)
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)
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)
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
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
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
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
- 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
This bug was generated because of the template was not initialized
at proper place, so put the xmlDependency at correct place.
task-2040460
closesodoo/odoo#35409
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
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
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.
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
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
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.
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
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
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>
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
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
closesodoo/odoo#35161
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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`
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
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
closesodoo/odoo#35107
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/odoo#34762
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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>