* = stock, test_website, web, website_forum, website_slides, base
Replace KarmaError with AccessError and remove the related override made
on crash_manager and ir_http.
task-2069890
closesodoo/odoo#36655
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit fixes 2 issues coming from the recent ORM changes: records are
new records in onchange and compute methods must assign a value for all records.
In an onchange method, self.ids is a list of integer (real records)
whereas self.id is a NewId (virtual record)
Here a result dict was built using the reals ids as keys but later NewIds
are used as keys. Solution is to use record._origin to access the real record.
Moreover, the two dicts `result` and `type_stats` are the same. Assigning one
into the other is useless.
Task 2067872 (eLearning internal testing)
PR #36756
Since admin is responsible of all created demo channels and then re-added
manually as member in demo data of slide.channel.partner he is actually
twice member of some channels. This commit fixes that by resetting its
membership status before adding membership demo data.
PR #36756
When having not square images for user avatar several issues appear
* website_slides: heroes of the week banner is broken as circles are not
circles anymore. They look more like UFOs or funny snowmen;
* website_slides: my user status / leaderboard / achievements card display
is broken as image may take much more width than planned;
* website_slides: channel page view displays user avatar when having joined
it, and it is broken;
* website_profile: user avatars in top 3 of users karma ranking is broken.
In this commit we apply strict rules on width / height combined to an object
fit in order to always have a bioutifoul displayed circled image.
Task 2065425 (avatar ratio badly displayed)
PR #36756
Course content counters count only published content while content stat button
redirects to all contents. Solution to this mismatch is to apply a search
filter on button action to display published ontent by default.
Also remove unnecessary action. Using a type="edit" seems sufficient, no need
to define a python method just for that purpose.
Task 2067324 (counters / action on content mismatch)
PR #36756
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>
This commit improves a bit the existing backend views of the elearning
app (notably propagating content and course labeling instead of slide and
channel) and adds a pivot view for model slide.slide.
FP feedback
Task 2066646
PURPOSE
Allow to manage attachments when updating a frontend review.
SPECIFICATIONS
Currently when posting a review in eLearning or eCommerce one can attach
files to its review thanks for portal composer. Rating popup composer allow
to update its comment and rating. However this edit mode has two limitations.
It does not display attachments previously added and does not allow to add
attachments.
This commit fixes that by
* giving attachment values to the composer, allowing its display by the
composer display at startup;
* allowing to give new attachments and properly handle them in slides
route;
Uploaded and validated attachments cannot be removed by users. Indeed
message with attachments has probably already be sent to people and removing
attachments would lead to information loss.
LINKS
Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.
For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.
opw-2060055
closesodoo/odoo#36374
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.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)
Purpose of this commit is to add new content at last position in frontend.
Indeed backend uses last position in embedded list view, frontend should
do the same. Moreover when having a lot of content, having everything at
the bottom of the screen at the same position of Add content / section
buttons makes sens.
Specifications
* when adding a new category: add it as last category;
* when adding a new slide in a category: add it as last slide of the
category;
Specific case of slide without category
* when adding a new slide without category: add it as last slide of the
channel (display it as last) but keep it on top in backend view
(display as first);
Improve content list display in frontend of eLearning
* contents without section are now at the bottom;
* fixed alignment of buttons icon (Add Content and Add Section)
* fixed broken design because of title too long
Task 2049640 (website slides back2basics and fiximp)
Task 2061672 (new content bug report)
Co-Authored-By: Michaël Mattiello <mcm@odoo.com>
Co-Authored-By: Alexis Lacroix <laa@odoo.com>
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)
The canonical tag is important for SEO, indeed it prevents search engines from
indexing duplicate content.
Reasoning
=========
The choice has been made to create the canonical tag automatically depending on
the request path, ignoring the query string, and manually prefixing the
appropriate domain and language code.
Indeed creating it manually for each resource would create a lot of code and
potential mistakes.
It is more dangerous to do it the generic way, but after investigation it
appears that it is an acceptable trade-off since the vast majority of our routes
are well built and already ready for this:
- using query string only for minor features that do not change the main content
- having the models, the ids, the pager and other important features in the path
Override
========
It is still possible to override the default behavior by passing
`canonical_params` manually to the view or to the different methods.
This is done for `/event` because the only way to display Past Events is to add
`date=old`.
Languages
=========
Fix an issue where it was possible for a bot to be on the URL without language
code but to use a language that is not the default language.
Adapt hreflang, because it:
- must only be present on canonical pages
- must always lead to canonical pages
- should not be set if there is no alternate language
Misc
====
task-1958075
closes#12532
Inspired by OCA module `website_canonical_url` courtesy of Jairo Llopis.
closesodoo/odoo#35852
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Creating channels and slides in backend was leading to warnings and/or crashes
because of computed fields not being always updated. With new computed fields
coming from 9920f20e4c this cannot be done anymore.
Task ID 2058595
PR #36281
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
Before this commit, leaderboard was displayed only if user was not connected.
As we feel this is very interesting to show we decided to display it in all
cases (either connected or not) on eLearning frontpage. Activating it is
now done using an entry in the customize menu.
Task 2005981
closesodoo/odoo#35791
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In the the kanban view of slide.channel, text belong numbers
was invisible (white on white) on the community version.
We change the class to be visible for each version.
TASK-ID : 2049115
closesodoo/odoo#35858
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Test frontend and UI tools of eLearning.
SPECIFICATIONS
This commit adds a course tour that test a flow for course publishers. Main
steps of this tour are :
* a user (website publisher) creates a course;
* he updates it;
* he creates some lessons in it;
* he publishes it;
LINKS
Task ID 1937768
PURPOSE
Test frontend and UI tools of eLearning.
SPECIFICATIONS
This commit adds a course tour that test a flow for course members. Main
steps of this tour are :
* an user (either employee, website publisher or portal) joins a public
course;
* he has access to the full course content when he's a member of the
course;
* he uses fullscreen player to complete the course;
* he rates the course;
LINKS
Task ID 1937768
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
Portal users cannot post reviews as they have no write right on channels.
When trying to post a review on a channel this leads to a 403.
In this commit we correctly propagate channel access token to the composer
in order to allow rating.
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
Since 9920f20e4c course completion when finishing a certification survey
is broken. Indeed channel completion is not correctly recomputed. A
certification course can therefore never be completed and awarded. This
commit fixes that and correctly update channel completion based on survey.
In this commit we also rename some methods
* _compute_completion: renamed to _recompute_completion to avoid naming issue
with computed field convention;
* _post_completion_hook is not unnecessary as code in hr_skill can be done
after calling super of _recompute_completion;
* _completed_callback is renamed to _set_completed_callback to be coherent
with slides naming;
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
PURPOSE
Test frontend and UI tools of eLearning.
SPECIFICATIONS
This commit fixes issues spotted when testing eLearning in backend
* placeholder image was referring an unexisting image;
* kanban was still using image fields prior to some image.mixin refactoring;
LINKS
Task ID 1937768