Stages modification through the clickable statusbar wasn't very intuitive.
By fixing default behavior through states (and corresponding buttons), default user experience is simplified.
3 static states available : draft, open, closed
Form view: navigation through states with buttons
Kanban view: disabled modification of survey state
Task ID : 1949110
closesodoo/odoo#32325
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
This commit provides a few fixes for quiz feature:
* fix amount of karma won by the user in a quiz;
* correctly display the fact that a subquiz was completed by the user instead
of just looking like a non-completed quiz;
* going on a previously completed quiz, good answers are hightlighted and
inputs disabled;
* effectively put the quiz in readonly mode if not a channel member.
Commit linked to task ID 1941250 and PR #31977
This commit provides a few fixes for the fullscreen view:
* make external links associated with a slide clickable again in fullscreen
mode;
* hide completion icons if not member:
* add margin to subquiz icon in header;
* add dedicated button to exit the fullscreen mode;
* change "Pass certification" button to "Test Certification" if not member
of the channel (for website publishers);
Commit linked to task ID 1941250 and PR #31977
- Fix certification card in user's profile page
Since design review, certification card were not displaying well.
This commit applies the course card template on certification card
and modifies the way the certification get downloaded by calling directly the
controller instead of using class catched in javascript that calls afterward the
controller.
- Allow review button only if allow_comment in FS mode + redirect url
'write a review' button in fullscreen mode must not be displayed if the course
is not in allow_comment mode. Also, the url if this button was redirecting
to slide view in non fullscreen mode. As no review can be done from this point,
the url redirect now to the course view.
- Fix fullscreen slide height.
- Fix all slides view per category pager and page rendering
Since the introduction of categorized data dictionnary that is given to the template,
if a category is empty, it's rendered anyway, which is good for publisher,
to quickly see all existing categories.
But other users should not see those empty categories.
Also, if the slides from a course are filtered (with View all button) by category,
all the slides should be reachable, using the pager. This was not the case as
categorized slides dictionnary returned no slides if page <= 2.
(as bound of array was from offset to limit and offset and limit were equals)
The number of slides per category must be overwritten if search category is activated,
to see more than the 4 first slides of the category.
Finally, if search category is activated, only the target category should be displayed,
and not the others, for performance reason.
- Show 'not verified' next to user's name if user karma = 0
Instead of using the email_validation_done flag. As email validation is only used
to offer the user some karma in order to be able to interact in the forum or eLearning.
If the user already has karma, he is already considered as active and 'verified'
- Correct URL of certification in FS mode
Task ID : 1941250
Closes PR #31567
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Task #1945036
Purpose
=======
If the user fails his last attempt at a course certification, we remove him from
the members of the course (and he has to enroll again).
He receives an email in the process notifying him of his failure and suggesting
he enrolls to the course again.
The purpose is to have a 'certification flow' where the user can re-purchase the
certification when they have failed it.
This could lead to some issues if the course containing the certification also has
other slides with content because the user will not have access to them after failing.
This also prevents configuring courses with multiple certifications since the membership
will be removed at the first failure.
These use cases are considered "non standard" by the business and are thus not handled
in the code. We assume that users will configure their courses "correctly".
Purpose of this commit:
In case there is only one slide in the course and that unique slide
is of type certification, clicking on the link redirects the user
to the survey page instead of the fullscreen view
Task-1946511
closesodoo/odoo#31843
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Before this commit, in fullscreen mode, clicking on the "pass certification"
button would redirect the user to the "non-fullscreen" view.
After this commit, the button directly redirects the user to the survey page.
To avoid generating user_input of survey (test entry or not) for
certification slides in fullscreen mode (table of content), we decided
to create those user_input lazily: we redirect the user to a route that
create (or reuse) the correct user_input.
Task-1946511
Purpose
=======
When the user successfully takes a certification, he can download the certification
document using a new "Download certification" button.
(In addition to receiving an email containing the certification)
Also cleaned a bit the way certifications are downloaded.
Task-1941250
For now, in no fullscreen mode, if the quiz is succeed, the
user progress is not updated because the quiz is not set
to done.
This commit implements this call to mark slide as done and
green the check bullet.
We decided to unify the submit RPC call with the done one,
so a quiz (or a slide with questions) can only be done when
submitting answers. As consequence, we need to prevent some
slide type to use the /set_completed route (quiz and certif).
Task-1941250
This commit adds the search bar in 'All users' page in order to filter on name or company name.
To be able to keep the position, a non stored computed field has been added on res_users
to get the position depending on the user's karma.
The podium (top 3 users) is now displayed only if there is no search applied and if the page = 1
because it has no sens anymore in other cases.
Special thanks to @jem-odoo who helped me finding smart solution for position computing.
Task ID : 1943788
PR #31321
This commit makes the 'Fullscreen' page a complete odoo
widgets. We decided to split it into some sub widget:
- Fullscreen: will be the master piece, handle communication of
components, displaying slide content, setting slide as completed,
handling server RPC calls, ....
- Sidebar: responsible for slide navigation, based on the table of
content. (prev, next, keyboard naviguation, ...)
- VideoPlayer: display content for Youtube video and handling player
event to auto set as completed, ...
The DOM of this page is still rendered serverside. DOM was cleaned in
order to be less complex and less deep. CSS style was also reviewed
to decrease line of code.
Fullscreen is now completely using Quiz widget with events triggered.
Task-1942852
Information was already present, let us use it instead of having access issues
on membership.
Commit linked to task ID 1941250 and PR #31708.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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>
This commit sets the completed flag to True for a slide of type certification
when this certification is succeeded (quizz_passed set to True).
Also, the Download certification button has been added to the fullscreen mode
if the certification is passed by the user.
Task ID : 1941250
PR #31697
Purpose of this commit is to perform a cleaning and upgrade of the lesson
view in front-end when not using the fullscreen mode. This page had not
been updated since eLearning addition.
A method is added on slide model to have a protected method computing quiz
related information on a given set of slides, notably potential karma gain,
gained karma and number of attempts. It is mainly a code move from controllers
now working in batch.
Some linting is also done, notably a badly-named file.
See original eLearning task for main specifications [1].
Commit linked to task ID 1941250 and PR #31657.
[1] See task ID 1902304
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit makes the quiz widget a real odoo widget that triggers up some
events. The widget is now only responsible of
* fetching quiz data (if not given)
* decorating the anwsers according to the result
* displaying message (error or modal)
To do so, some code move/rewrite was needed
* extract and factorize some template
* add 'sudo' on technical model to avoid access rights error
* factorize some python method from controller to model
* remove some CSS classes to lighten the code
* fixing access model error
* make quiz widget handle the display of error message
* give browse record for template rendering, rather than slug
* cleaning some spaghetti code in Fullscreen widget
* ...
Commit linked to task ID 1941250 and PR #31584.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to perform a cleaning pass on website_profile templates. It
cleans the DOM, templates and CSS and proposes various improvements on
general design and layouting. This includes notably
* lessen custom CSS and use bootstrap 4 classes;
* simplify layout when possible;
* make is responsive and mobile friendly;
No functional changes should occur with this commit.
Sub modules are impacted as profile is extended in various other
applications: eLearning, forum and certification.
Commit linked to task ID 1941250 and PR #31453
A specific template to display an icon depending on slide type has been
added recently. However presentation icon was missing. This commit fixes
that.
We also added an option to tune the classes added on the icon. It gives more
flexibility when using it.
Commit linked to task ID 1941250 and PR #31453
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
Purpose
=======
This commit introduces an icon template to factorize some xml code.
It also correctly overrides this template in website_slides_survey to add
the 'certification' case.
Commit linked to task ID 1942852 and PR #31394.
Purpose of this commit is to perform some linting and cleaning in lesson widget
JS and its related css. Notably for fullscreen widget of eLearning. Containing
* better naming of css classes;
* deleted sidebar file as it is now included directly in the fullscreen
widget;
* removed unused css;
* apply JS linting;
* clean some controllers;
Commit linked to task ID 1942852 and PR #31394.
- 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.
Force white background + add the default bootstrap shadow. Do not use <h4>
tags to keep the right font-size on mobile. Simplify layout, add a second
navabar to handle content supposed to be moved to the right.
Commit linked to task ID 1941250 and PR #31279.
This commit puts the certification slide from the demo data into a category
so that it's correctly displayed on the channel frontend view.
Commit linked to task ID 1941250 and PR #31279.
Purpose is to reduce model naming complexity. Currently you have: slide_type
<type>, and related statistics on channel and category nbr_<type>s with a
trailing and error-prone s. Let us remove the trailing s to reduce complexity
of code reading. Some code cleaning in statistics computation is also done.
Commit linked to task ID 1941250 and PR #31272.
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
As the eLearning (website_slides) is also using website_profile users,
the All Users page is moved from website_forum to website_profile, to be
useable in both forum and eLearning.
This page displays also the number of karma point, badges and certificates
of each user.
The users are sorted by their karma points and the first 3 users are
promoted on a podium.
Use span instead of b tag in profile page
Task ID : 1922159
PR #31109
For users viewing their own profile page on the website,
a new section 'Certifications' is added to the about tab.
Thoses certifications are the survey that activated certificate.
Task ID : 1922159
PR #31109
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).