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
Since 556b6454dab07cdf716d404ec0db9aa51a09b165, channel can be linked to a dedicated forum.
But the link could only be done in backend, in the slide.channel configuration
For now on, website_publishers can create a new dedicated forum when they create
a new slide.channel.
Link buttons have been added in both forum and slide.channel headers to navigate easily
between them.
Fix the relation between course and forum in a model point of view.
Task ID : 1922159
PR #31109
To gamify the new elearning, karma can be gained on various actions
- rank a slide_channel (course)
- vote for a slide
- finish a course
This commit also fix the 'completed' computation on slide.channel.partner
Task ID : 1922159
PR #31109
Two new sections are added in the profile page : Completed courses and Followed courses
Thoses sections replace the former 'Courses' section.
Use span instead of b tag in profile page
Task ID : 1922159
PR #31109
Purpose of this commit is to improve karma and gamification inclusion in
elearning [1].
* remove a border, replaced by a standard hr, in rank template. It allows to
reuse it easier as we don't necessarily want that border in other templates
using it;
Commit linked to task ID 1941250 and PR #31133.
[1] task ID 1922159 (landed at 5fa651cb01)
Purpose of this commit is to
* clean user avatar controller and its calls;
* extract default image computation;
* add a controller to get slide image even when not having access to the slide
as all slide name and images are displayed even if not available to the
current user;
Commit linked to task ID 1941250 and PR #31133.
This commit fixes various issues introduced by recent commits in slides
* fix slide type computation: using a dict in a fromkeys makes a shared
object for all keys. It is better to fix that behavior;
* correctly display number of course steps in elearning homepage. Currently
number of steps of a course is simply the length of its one2many;
holding slides. However this one depends on access rights which give funny
results like a course with 2 steps for public users and 7 for admin;
Right computation is: number of published lessons, whatever your access
rights are. This is already computed as total_slides;
* people that cannot publish should not be able to unpublish;
Commit linked to task ID 1941250 and PR #31133.
Purpose
=======
Channel statistics computation in the _compute_slides_statistics method
did not work for a batch of channels.
(The stats dict was shared for all the channels).
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).
Task #1940360
Subtask of #1902304
Purpose
=======
The slide/all route now supports a 'slide_type' param that will filter channels
to contain at least one slide of type 'slide_type'.
This is a preliminary work for the slides_survey bridge.
Task #1940360
Subtask of #1902304
Purpose
=======
Some fields displayed on the slide.slide form view are not relevant
for all slide_types and should be hidden.
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>
This commit proposes a new homepage for slides module evolving towards
an eLearning platform. It includes
* a new main page displaying top courses / channels. It displays 3 most
popular and newest channels as well as its ongoing courses (if logged).
Achievements and karma update done by eLearning community allow to give
a gamification look and feel;
* an 'All' page displaying all courses / channels. Tag groups and tags
allow to search / filter displayed courses;
* a new pimped and revamped display for main course / channel page;
For more details about specifications, send an email to aware people that
will be able to send you mockups. Or see the related task. Thanks to
@qmo-odoo who helped developing this homepage based on its work.
This commit is linked to task ID 1936153 and PR #30770.
Co-Authored-By: qmo-odoo <qmo@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
This commit squashes several fixes / light improvements related to the new
slides / elearning homepage [1][2].
Containing notably
* clean promote strategy field on channel model: less entries as they
are now used only to display lessons in a given order on channels of
documentation type;
* remove promotional fields, not used anymore since partial access on channel
allowing to have some kind of small preview of slides has been removed;
* use standard image field (image, image_medium and image_small) and use
image_resize_image from tools like all other odoo applications;
* improve image resizing to have medium images better looking on frontend
and use that nice image_large that broke my build yesterday;
* add last publication date change on channel;
* clean dead code;
[1] new homepage task: ID 1936153 and PR #30770
[1] main elearning task: ID 1902304 and PR #29876
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <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
With this commit, the user can activate review on channel content when
creating a channel from frontend, or editing it from backend. Once
activated, the comment tab below the slide content will allow user
to post a comment with optional rating.
The way of commenting is different regarding channel type:
- documentation: user can post comment and vote (list/dislike) on
slide content
- training: user can post comment with review (rating)
Task-1902304
Before this commit, the user can only create a webpage slide
by setting its name, category and tags. On the channel grid,
no tumbnail was shown.
This commit allow the user to upload a cover image from the
slide upload modal and to modify it from form view. the
mimetype of webpage slide is now 'forced' through the
modal to 'text/html' to avoid conflit with 'image/png'
when setting the cover image.
Task-1902304
Task #1940360
Subtask of #1902304
Purpose
=======
Slide views made by non-members of the channel (typically the website_publisher
designing the survey) should be counted in the "public_views".
closesodoo/odoo#31096
Adds slides ands slide.channels specific information (courses) into the website_profile template page.
As there can be more than one slide.channel,the profile page shows everything linked to every slide.channel,
except if the channel_id is given in url arguments.
Adds the 'Go to eLearning' button in the 'new rank reached' mail to encourage the users to continue
to be active on the eLearning platform as well, to gain more karma point and improve there rank.
Task ID : 1922159
PR #30988
Task #1902304
Purpose
=======
The 'is_preview' field implied some functional behavior but it was not
manageable from back-end nor front-end.
It can now be configured on the slide upload form (front-end view) and on
the slide form (back-end view).
closesodoo/odoo#31073
New rules are
* on channel type documentation: can upload like before (employee or upload
groups specified); can publish like before (can upload and publisher)
* on channel type training: can upload like before (employee or upload
groups specified); can publish restricted to channel responsible
Tests are added.
This commit is a sub-part of task ID 1902304 (main eLearning task).
closesodoo/odoo#31082
Members is better computed using a sudo to avoid every access rights issues.
Moreover trigger is updated so that cache is correctly invalidated and
recomputed. Having the trigger on the relational model correctly triggers
the recompute when calling main API methods to add a channel member.
This commit is a sub-part of task ID 1902304 (main eLearning task).
Purpose
=======
A slide's 'Embedded views' are reworked as 'Public views' to simplify
the model and be more compliant with the new 'is_preview' field.
The rule is now the following:
A slide is a preview or the view is done as public user (once per session)
-> increment public_views
A slide is viewed as a logged in user that has access to the content
-> increment slide_views
Technically slide_views is a compute of the slide_slide_partner count.
Tests are also added to ensure it is effectively working.
This commit is a sub-part of task ID 1940360 (eLearning integration with
survey) and task ID 1902304 (main eLearning task).
With new slide type, it was required to change the
upload modaL. Now, the use select first the type
of document he wants to upload, then the correct
form appears. When filled, user can sumbit it to
be redirect to the slide he just create.
Task-1938643
The idea is a slide can be a HTML page completely customized by
user. So, you can now easily create custom content and publish
it on your website, like a normal slide.
Task-1938643
Having a unique constraint for a slide name in a channel look strange.
It force an RPC call to check this when uploading a slide, making the
process a little bit slow.
Morevover, name is a translatable field on slide.slide model, so the
constraint can not be fully respected.
To simplify the model, we decided to remove this.
Task-1938643
A slide can now have some external link. For instance, links to
the origin of the document (sources for scientifics papers, ...).
A new model is added to allow the user to provide several link
per slide. Those are display below the channel on website page.
Task-1938643
This commit provides the abilty to create channel from the website
instead of creating a slide. To do so, the user still have the "upload"
button on the channel home page.
The new modal allow user to set title, description, type and channel
tags. We prevent channel tag and group tag creation on the fly, as it
can impact the UI (coming in a future commits).
Task-1938643
Task #1937160
Purpose
=======
Performance improvement:
The members_count computed field now uses a compute_sudo with
a read_group allowing to compute all the members_count of the recordset
in a single query.
closesodoo/odoo#31013
Purpose
=======
With the new 'website_slides_sale' module users can now sell slide.channels.
This commit adds a setting to let the user know he has to install website_sale
to be able to sell courses / documentation.
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.
Task #1937160
Purpose
=======
This commit adds a "Attendees" stat button on the slide.channel form view
showing the members (partner_ids) count.
On click, it redirects to a tree view of slide.channel.partner. The tree
view is configured as editable to be able to administrate members
(add/update/delete).
Task #1937160
Purpose
=======
This commit adds sale capabilities to a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.
When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.
The feature is added in a new module 'website_sale_slides' that comes as a
bridge auto-installed between 'website_slides' and 'website_sale'.
The final goal is to be able to sell "courses" (see task #1902304).
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 of this commit is to add some statistics computation on slide.channel
model. We want notably to have a count of views and votes (likes and dislikes)
on channels. Completion is also computed.
Purpose is to be able to search and order channels based on those statistics.
Having stored computed fields for some statistics help achieving that purpose.
Tests are added.
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.
Just reflect access rights: publishers should be able to manage channel
members.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
closesodoo/odoo#30960
To avoid security issues or exploits, public method to add a member on a
channel allows to add only itself, under given restrictions, like being
a channel maintainer to add self on a private channel.
A private method allow to subscribe other people. It will be used notably
to allow publishers to invite other people.
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
This commit changes decorated many2many between slides and participants
recently introduced [1]. It was done between slide and users as people have to
login to have slide information.
Another many2many between channel and partners to store notably completion
and soon add statistics has been added [2]. It has been done between
channels and partners.
In this commit we choose to have the same relationship for slides, aka a link
between slides and partners. It allows to easily compute statistics and find
information based on partner_id.
Co-Authored-By: Quentin Mourrier <qmo@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
[1] See c273e89d55
[2] See 748b9072d6
Fixes related to commit 748b9072d6
* fix template still having an unnecessary t-else whereas the t-if has
been removed;
* move order by strategy on right class;
* fix access rights on intermediate model between channels and partners. It
should be accessible to website publisher as they will have so manage
channel members;
* fix some typos;
closesodoo/odoo#30949
Purpose
=======
The 'state' field for a member of a channel did not imply anything functionally
so we decided to remove it. It allows to remove an unnecessary computed fields.
ACLs are updated accordingly.
If needed, we will soon be able to check partner_ids that have ordered but
not paid a channel / course product by searching the related 'sale.order' model
for such products.
Purpose is to add a new widget and its route allowing to join a channel.
As visibility is now mainly based on membership a widget to join channels
is required.
This commit is linked to task ID 1937411 and PR #30847.
Slide upload access is a bit cleaned. A can_publish field is added controlling
who can publish slides. Currently website publishers are allowed to publish
content. Not publishers people allowed to upload cannot publish their own
content. It stays in a submitted non published state.
This commit is linked to task ID 1937411 and PR #30847.
Currently website_slides module lacks tests. This commit adds base for tests
and add some tests related to recently cleaned access rules and rights.
Future commits will gradually add more tests to the module as it evolves
towards a more broad and up-to-date application.
This commit is linked to task ID 1937411 and PR #30847.