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
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
* 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.
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.
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>
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
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
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
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
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.
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
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.
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.
When a portal user post a message to review a channel, we
want to allow him to edit its own comment and rating.
This commit modifies the special check access method in
portal to extract the security check and reuse it to
allow user to update its comment on slide.channel only.
We decided to reuse existing widget (new rating popup
composer) to do the message modification.
Task-1902304
This commit allows user to rate a slide channel: using the new Popup
Rating Composer, users having access to the slide channel can submit
a rating with a comment. Then, lower in the page, they can see the
ratings of other users.
Task-1902304
Purpose of this commit is to prepare future code addition by making some
noise in a separate commit. In this commit we move compute methods below
fields definition because currently it is a complete mess and finding a
given field gives a headache.
Commit linked to task ID 1933820 and PR #30830.
Task #1930691
Purpose
=======
If the download security is set to 'Authenticated users', the route should prevent public users
from downloading the slides.
closes#30281closesodoo/odoo#30399
Purpose of this commit is to store a relationship between slides and users.
Indeed starting from now we will track more user interaction with the slides
module.
In this commit we introduce a model that is used to populate and decorate
the relationship between slides and users, slide.users. From slides or users
point of view it behaves like a many2many. It can also be used to store
more information about the user interaction with the slide.
We use it here to store the user vote. Like and dislike are not static
counters anymore but computed fields based on user votes. It is implemented
as a tristate field.
As it is a technical model no access on slide.users is granted. Controllers
and methods grant access to the relationship in order to avoid information
lead and keep technical details private.
Future commits improving the eLearning use of slides will notably store
information about user having read the slide, taken a quizz or gaining
karma depending on some actions performed on the slide.
This commit is linked to task ID 1934488 and PR #30620 .
Purpose of this commit is to clean a bit interface of slides
* separate can_see from can_upload;
* correctly set can_see on partial visibility channels;
* remove upload button for portal users as they have no rights to upload a
document and this is not supported in any way;
This commit is linked to task ID 1933820 and PR #30553.
Like / dislike of slides is fixed and improved to make a tri-state like
behavior. Future commit will change this implementation in order to use
a relationship table between users and slides as we are moving towards
the eLearning platform. Let us have this simple implementation currently
and rewrite it in a near future.
This commit is linked to task ID 1933820 and PR #30553.
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>
If the user has limited_access, download_security field was not read due to the
override of check_field_access_rights and so the field not set.
When you try to access/read it, you got: Selection is not iterable.
Now we check in sudo the download_security.
We also add the **kw that should be present in all routes.
Avoid: "slide_download() got an unexpected keyword argument 'debug'"
We also remove this controller from the sitemap.
Before this commit, the route to the pager couldn't be resolved
because the <model("xxx.xxx") was having a typo
Now it doesn't, no traceback nor 500 error
OPW 801651
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.
Javascript don't check the onError, so the user never see the error and wait
that nothing happend.
Use rec_name in domain because some model like survey.survey don't have name field.
Check that query_string is setted to avoid traceback 'lower of None'
Don't add useless routes or route that will return 404.
Improve generate function from ModelConverter to have a better management of
query_string.
Now we have an helper sitemap_qs2dom that will analyse the current route and
check if query string is plausible and if yes, generate a domain, when the
query_string don't seems to match the route, we return a Falsy domain.
Before this commit, if qs was /product/ipad, enumerate_page check for each
modelconverter of the route a name ilike '/product/ipad'.
Now we check all routes that contains product and one converter that match ipad
or routes that contains ipad and one converter that match product.
This commit a new way to declare the sitemap for a route.
def sitemap_xx(env, rule, query_string):
yield {'loc': '/my_url'}
@http.route(..., sitemap=sitemap_xx)
In this case, only the loc returned by this function will be in the sitemap
for all rules.
You can pass sitempa=False, if you don't want that route are into the sitemap