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
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>
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
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
Allow publishers to add a comment on frontend reviews with ratings. Purpose
is to allow to give some feedback or context on published reviews.
SPECIFICATIONS
In order to answer to a rating message (review) of a course (eLearning) or a
product (eCommerce) we add a way to the publisher to directly comment a review
inside the website rating chatter.
Any publisher can add/edit/remove comment of a rating message from the website.
The goal is not to enter into a discussion but just to give a feedback. This
comment is not sent or propagated to anyone, just displayed for information
purpose.
In portal chatter
* add 1 button below a review "Comment" (for publishers of the website only)
* only one comment possible by review/rating
* when the comment is added, display
* author name, date, comment
* 2 buttons, only visible by the website publisher: edit and delete
LINKS
Task ID : 2026911
closesodoo/odoo#35956
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit improves the email that the members get when a new content
is published on the course and prevents the template to crash on preview.
task-1985511
when a user subscribe to a course, the user is now automatically
follower of the course in order to be notified when a new content
is published
task-1985511
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
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
Remove "Our Documentation" dummy default existing data. It makes no sense
to have void data. Instead just add a small explanation text in eLearning
front-end telling the user to create its first course if he has rights to
do so.
In order to better show the new backend add some demo data for missing
numbers, notably
* sales: add confirmed sale orders in order to have revenues value;
* forum: add some posts and answers;
* quiz: update slide.slide.partner demo data to hold quiz attempts count;
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
Update manifest and make website_slides an application separated from
website embedded menus.
Implement new menu structure
* Courses
* Courses
List view: Course Name, # Views, # Attendees, # Ratings, Revenues,
Reviews
* Contents
* Reporting
* Courses: list view on slide.channel model, ordered by # views.
* add a graph view (group by content)
* Contents: graph view on slide.slide model
Area Graph: X month
Y measure: # Views (others measures: Attendees, ...)
Group by: course (color)
* Reviews: see kanban of latest reviews;
* Quiz: list view on slide.question model.
List view: Add # Quizz Trials, # Quizz Passed, Avg Attempts
* Configuration
* Settings
* Allow Forum on Courses (installs website_slides_forum)
* Allow Certifications (installs website_slides_survey)
* Allow Selling Courses (installs website_sale_slides)
* Course Tags
* See channel.tags.group with label Course Tags, form view allow to
configure group tags
* https://drive.google.com/a/odoo.com/file/d/1G0g2UnG5cZG55EXQ5icbgwe7T2eSZskT/view?usp=drivesdk
* On click: open :https://drive.google.com/a/odoo.com/file/d/1I_PW3aZAbrslXadiYqmVF-_6dGXx8knd/view?usp=drivesdk
* Content Tags
This structure will gain new items in sub-modules, notably bridge with
form and website_sale. Those will be implemented in next commits.
LINKS
Task 1978729
PR #35061
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Jérémy Hennecart <jeh@odoo.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`
The following models are already using big images, or they might need big images
in the future:
- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank
PR: #34925
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
A share button has been added to the fullscreen view to avoid
exiting the view to access the share tab on the full description
of the slide.
Task ID : 1984509
closesodoo/odoo#33418
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before, a portal user who tried to share a slide by mail got
a Odoo Server Error. He will now be able to share it without
any error.
closesodoo/odoo#34320
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit moves formatting helpers method used in mail.template to tools. The goal
is to reuse them anywhere in odoo, and not only in mail templates. Thoses method are
used to format date, datetime, amount, ... according to user localization (currency,
language, pattern, ...).
This commit also improve the formatting methods of 'date' and 'datetime': we are now
taking the 'lang_code' into account. Indeed, as the implementation uses `babel` lib,
it is easy and usefull to add the language option, to display the given dates into a
particular language. This parameter is optional to keep compatiblity with existing
code.
Task-2025396
Code Courtesy of @tde-banana-odoo
Display
* improve color of trophy displayed on top of course main page (success if
course done, warning while working on it);
* correctly fetch and display karma/xp points on course lesson list. It is
either gain of next try, either awarded points depending on slide
completion;
* fix control buttons in course main page (prev, next, set done,
set completed, fullscren), notably correctly set them disabled;
Linting / Code
* put demo in no update;
* rename some parameter in website_slides_survey to avoid conflict between
quiz (on a slide) and certification (a survey);
Commit linked to task ID 1941250 and PR #31697.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have a bit more demo data allowing to test quizzes and see
how they behave. Notably
* have more than one question in existing quizzes to check answer validation
more in-depth;
* have more than 2 answers to check answer highlighting more in-depth;
* clean a bit user related demo for channels and slides;
Commit linked to task ID 1941250 and PR #31512.
Purpose of this commit is to improve eLearning demo data. Notably links
(links to external resources on a given slide) and quizzes (allowing to
gain karma) are added. Some slides are added. Demo user interaction with
eLearning is also added, such as membership and votes. Finally a channel
is specifically kept specific to 1 single slide of type certification as
its flow has to bypass some screens when selling pure certifications.
Commit linked to task ID 1941250 and PR #31453
Some addition to demo data, notably some members and a few more slides.
I bet there will be other commits improving demo data, one slide at a time.
Commit linked to task ID 1941250 and PR #31317.
- slidesChannelDropdownSort : dropdown items back to visible (was white on white)
- Featured lesson : change icon to bullhorn instead of + icon
- Pass certification fullscreen button : btn primary
- set max height to fullscreen content to 100% minus header
- Fix 'infographic' slide type image view
- change image for 'Furniture Technical Specifications' course
- fix fullscreen presentation mode: The condition to add the iframe that
contains the presentation of the document was wrong and, so, never met.
Those conditions are evaluated in javascript and not in python as it's part
of t-name template linked to a javascript widget.
Commit linked to task ID 1941250 and PR #31279.
Purpose of this commit is to provide a better way to display channel information.
Description is split into two fields. A text one, holding the short description
and used in channel header. A long html one, holding more details course
description.
Commit linked to task ID 1941250 and PR #31272.
Purpose is to ensure more advanced use cases are still supported in new
elearning platform in addition to more public use cases. Fields controlling
access are now
* enroll: who can enroll on course: public (everyone, simply click on join
button), invite (added by already members) and payment (in bridge with
website_sale, if SO with product is confirmed);
* enroll_group_ids: automatically add members of those groups to the channel
to ease having groups for a given subset of users;
* visibility: who can see a channel and its slides: public (everyone, it means
channel is visible on website for example), members (hidden for non members)
* website_published on channels and slides; non publishers cannot see what
is not published, whatever other parameters;
* upload_group_ids: who can upload on a channel;
* download_security on a slide is completely removed as it makes no sense
for most slide types;
To ensure a better user experience responsible of a channel is added in its
members. People uploading a slide are now also allowed to read it to avoid
having inconsistency behavior between upload_group_ids and access rules.
Some tests are added.
This commit is linked to task ID 1942836 and PR #31239.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Purpose of this commit is to introduce a new way of displaying and managing
slides in eLearning module. Its purpose is to give a better experience to
users when going through a course. Notably a fullscreen mode allows to take
lessons one by one without going out of the elearning display. Integration
of all slide types eases taking the course step by step.
Quiz are introduced in this commit. Those are an addition to slides with
some question / answers (multiple choice). It allows customer to gain karma
and improves gamification. Certifications are still done using the survey
application. Quiz targets only small tests at the end of a given slide.
A new widget is added to display and control slide display in fullscreen
mode. Old display is still available for documentation channels or when
going out of fullscreen mode, to see details on comments / review / statistics
and have access to share options.
This commit is linked to task ID 1902304 and PR #29876. It closes the main
work on refactoring website slides into eLearning, with other tasks already
merged in current community [1][2][3][4][5].
[1] Task ID 1940360 landed at b2149bc7a2: certification inclusion
[2] Task ID 1936153 landed at 6c6179e57c: homepage inclusion
[3] Task ID 1937160 landed at 8b7605c9e5: selling courses
[4] Task ID 1922159 and 1940516 landed at 5fa651cb01 and 6a64c3ce82:
new user profile and gamification of slides / forum
[5] Task ID 1938643 landed at 77b5673a0d: upload channel/slide
Task #1940360
Subtask of #1902304
Purpose
=======
Adds certification capabilities to the website_slides module.
Channel/courses can now include certifications as a new type of slide.
This new type of slide is available as a "Certification" button on the slide creation
frontend view (next to "Video", "Presentation", ...).
Users have to link the slide to an actual survey that has the 'certificate' field
set to true (that will populate the slide's survey_id field).
Slides of type certification are handled in frontend in a very simple way for now:
- A button "Begin certification" that redirects the user to the related survey frontend.
- A button "Download certification" when the user has succeeded the certification.
- When the survey is done, if it's linked to a slide, a button "Go back to course" allows
the user to go back to the slide frontend.
(There is a special use case for when the website_publisher designing the survey lands on a
certification slide: he is allowed to test the survey with a survey_input created as test_entry)
Survey creation as well as limited time, limited number of attempts, ... are still completely
handled in the survey module. That means that the user will have to first create a suitable survey
that is a certification and only then create a slide of type "certification" and link
the created survey to it.
Ideally, the taking of the survey should be transparently included in the slide frontend but
it requires a full refactoring of the way surveys are submitted. This will most likely come in
a later commit.
This commit is an advanced merge of full eLearning module (see task #1902304).
Purpose of this commit is to rewrite slides demo data. More channels, more
slides, more images, less Odoo oriented content.
Everything is still not completely clean but at least it begins to look like
something we could show to people. Thanks to @awa-odoo who gave some demo
data. No thanks to @xmo-odoo who did not give demo data about the emu war.
This commit is linked to task ID 1936153 and PR #30770.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
Purpose of this commit is to add challenges related to slide / elearning
module. 5 new challenges with their badges are added. Portal user partner
is now also published to have bioutifoul demo data. Commit linked to
eLearning tasks [1][2]
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
[1] new homepage task: ID 1936153 and PR #30770
[2] new user profile / gamification task: ID 1922159 and PR #30514 and #30988
Purpose
=======
Currently, the slide_channels having a visibility configured as 'invite' could
only add members manually.
This commit adds an 'Invite' button on top of the slide channel form that opens
a wizard allowing to send emails to contacts and also make them members of the
related slide channel.
Purpose of this commit is to clean a bit channel model. Promoted slide
feature is removed as people can already choose an order for a given
channel. Moreover promoted slide will not be used when having a eLearning
display of a channel.
Image field on channels is added as it is not depending on promoted slide
anymore.
To simplify future additions a search-specific template is removed to
have a unique template to display a channel content. It will ease future
merge.
This commit is linked to task ID 1936153 and PR #30985.
Purpose is to be able to filter, search and categorize channels. Notably
with eLearning in mind there will be more channels as a channel will also be
used to hold lessons.
For that purpose we add a model of tag linked to channels. Those tags are
organized by groups in order to be able to display them using a menu or
a small hierarchy of tags. Displaying a tag group as a specific navigation
element is controlled by a specific field.
Those models will be used to display a new and improved home page for
channels / courses.
This commit is linked to task ID 1936153 and PR #30985.
Purpose of this commit is to clean access rights on slide models and give
less access to public / portal / internal users. Website publishers and
editors have rights to edit slides content and manage channels.
Another purpose is to clean and refactor access options on channels and slides.
Access to a given slide depends on the current user being a member of the
slide channel. A channel can be either public (joined easily) or on invitation
only (manual addition of members).
Slide can be flagged as preview, meaning they are accessible without any
concern about channel membership. It is used as teasing or free promotion
of a channel.
Publish flag is orthogonal. Non published slides are not visible to everyone
except website content editor. It allows to work and improve slides without
displaying them to members or public people.
Technically a new model is added to model membership on channels. It is
a decorated m2m between channels and partners; on this m2m the state of
membership is added. In a near future additional information will be stored
on this model, like completion of channel or certification information.
Other technical changes implied by this commit
* visibility is simplified to either public or invite;
* can_see and can_see_full are removed, as well as concept of 'partial'
display of slides;
* group_ids related to private access is removed;
* a computed / searchable field is added to be able to efficiently find
and search active members of a channel;
This commit is linked to task ID 1937411 and PR #30847.
Purpose of this merge is to polish a bit this module before turning
it into "courses" (see task #1902304 for more details on this)
Contains
* split python model into separate main files to ease models understanding;
* split views into separate main files to ease views finding;
* rename files according to guidelines;
* merge templates in the same file to have all available at hand;
* move assets in their own file in order to remove noise from templates;
* Split javascript widgets into their own separate files
No functional behavior change should occur with this commit. Only move
has been performed.
Note that we might lose part of the history as splitting files creates a new
history for new files.
Task: #1909281Closes: #28679
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.
Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.
Related to task 1972615
Linked to PR #32872
Set up env & tools for module website multiwebsite (blog, event, sale..)
website_id in modelConverter and ir_rule
add _compute_domain_keys to have a different cache per website
or rules would not be correctly website_dependant
eg: blog 1 on website 1, blog 2 on website 2
access blog 1 from website 1 => can access -> normal
access blog 1 from website 2 => can access -> should crash because (ir rule)
split mixing website.published.mixin and website.published.multi.mixin to have
website_id only on last one.
multi mixing will:
- override website_published compute to take current_website into account (not in backend)
- force website when clicking on published in backend
- website blog, website_sale, website_event, website_forum, website_slides are now multi website
Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
In this commit we improve templates used in website_slides. Purpose of this commit
is to have templates that embed or use standard Odoo email layouts to make
them look modern and have a common style across all emails.
Main guidelines
* better use of div / p / br to try to lessen layout issues, especially
when updating templates using the editor;
* correctly sequence the templates fields definition;
* correctly set templates values notably auto_delete and user_signature
fields to avoid confusion;
* correctly layout the email content using light notification email. It
can either propagate the layout choice through various send mail methods
or directly embed the styling in the templates for more technical or
complex templates;
* use email_formatted computed field when possible to avoid having hand-made
from / to addresses;
* fix various typos and improve subjects when necessary;
Content of emails is not necessarily updated as the purpose of this task is
about styling, not content itself.
This commit is linked to task ID 1843376 (and 1868112) and closes PR #25349
(and #25889).