Commit Graph
293 Commits
Author SHA1 Message Date
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Juhil Somaiya 860ab5a1c2 [FIX] website_slides: fix webiste menu being not clickable in lesson fullscreen
Before this commit, the navigation menu was not clickable because of higher
z-index of the slides fullscreen menu. This commit fixes that by correctly
setting z-index, using the standard variable to avoid custom values.

task-2036877

closes odoo/odoo#35107

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-23 13:44:06 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Lucas Lefèvre 9d29056989 [FIX] website_slides: Display button when not in fullscreen
When answering a quiz, the button "Check your answers"
is not displayed when not in fullscreen.

JS error: `def.resolve is not a function`
because an already instantiated Promise does not have a
resolve function.
A promise cannot be resolved from outside its callback scope.

closes odoo/odoo#34762

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-11 07:14:05 +00:00
Julien Castiaux f69bd5c23c [FIX] website_slides: fix typo in enroll attribute
opw-2032459

closes odoo/odoo#34686

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-09 11:22:45 +00:00
Christophe Simonis 5e81b18e24 [MERGE] forward port branch saas-12.3 up to 0247d2f35f 2019-06-27 20:45:52 +02:00
Christophe Simonis 6c5783bd5a [MERGE] forward port branch saas-12.2 up to 465909f0fd 2019-06-27 19:10:09 +02:00
Christophe Simonis cf51b5f25d [MERGE] forward port branch saas-12.3 up to 793933a128 2019-06-25 14:23:48 +02:00
qmo-odoo cd8afe8546 [IMP] website(_sale)_slides: Add login,join,buy button on quiz
This commit improves the elearning onboarding on the quizzes

If the user is not logged in, a log in button will show up under
the quiz

If he is logged in but not a member of the course and the course is public,
a join button will appear under the quiz

If the course needs to be bought, a buy button will appear under the quiz.

If the course is on invite only, a message under the quiz will inform the
user about it

TaskID: 2003986
PR: #33861

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-24 10:51:27 +00:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00
Patrick Hoste f0ec2a8fc8 [FIX] website_slides: fix various issues to eLearning platform
Including

* change h4 to h1 on the slide page;
* add the rel='canonical' link header on the fullscreen view in order to
improve SEO and links;
* add space between quiz questions;
* remove social share statistics as they are broken and not really useful;
* moved tabs before the Quiz on the slide page;
* allow to modify slide in backend by removing some readonly attributes;

Linked to task ID 2010024
Related to PR #34176

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-06-18 11:25:03 +00:00
sri-odoo 508e374306 [FIX] website_slides: don't show sidebar, mobile
On mobile, don't show automatically the sidebar in order to
avoid covering the lesson's content.
The user will have to click on the toggle button to open it.

part of: https://github.com/odoo/odoo/pull/34151
2019-06-17 07:17:16 +00:00
Christophe Simonis 34a8754d4f [MERGE] forward port branch saas-12.2 up to 498b4b4350 2019-06-14 15:20:01 +02:00
Christophe Simonis 25e3f27062 [MERGE] forward port branch saas-12.3 up to 48a9f5a633 2019-06-17 13:20:35 +02:00
sri-odoo ed7b3b0fa4 [FIX] website_slides: design, questions margins
Slightly increase margins between questions in a test.

closes odoo/odoo#34055

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-12 14:09:15 +00:00
Christophe Simonis 71a50a2214 [MERGE] forward port branch saas-12.3 up to 409679866b 2019-06-06 11:54:35 +02:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Christophe Simonis d5e1fd16b4 [MERGE] forward port branch saas-12.4 up to cda4f3c308 2019-07-29 14:10:30 +02:00
Patrick Hoste 3295ffe632 [IMP] website_slides: add a visual effect for unpublished course
Purpose of this commit is to help designers seeing lessons state, notably
published, and modifying it directly from frontend.

The unpublished courses card are now a little bit translucent
and there is a 'unpublished' tag to clearly show their state.

Task 2033052

closes odoo/odoo#34880

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-19 09:11:37 +00:00
Patrick Hoste 38b5a666c5 [IMP] website_slides: add a share button on the fullscreen view
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

closes odoo/odoo#33418

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-19 08:31:20 +00:00
Patrick Hoste af690f678f [IMP] website_slides: allow to toggle free preview from frontend
Purpose of this commit is to ease slides / lessons management in eLearning
frontend.

The publisher will now be able to see if a slide is in preview mode from
the slide list in frontend of eLearning.

He'll be able to activate/deactivate the free preview mode with a button.

Task 1999705.

closes odoo/odoo#34182

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-19 06:57:44 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis a97037c6d4 [MERGE] forward port branch saas-12.2 up to 78b3b650b0 2019-05-06 12:27:51 +02:00
qmo-odoo 8d9c054842 [FIX] website_slides: fix various quiz issues
This commit fixes a few issues with quizz

  * change background-color to white in fullscreen mode;
  * prevent going up to the top of the page when selecting an answer;
  * highlight selected answers in fullscreen;
  * fix the display of already completed quizzes

Commit linked to task ID 1978530 (fixes linked to internal testing).

closes odoo/odoo#33140

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-03 13:01:10 +00:00
qmo-odoo 9d26c122ab [FIX] website_slides: fix the end course button
This commit fixes the "End Course" button displayed after successfully passing
a quizz. Before this commit, the button didn't do anything, now, it redirects
to the slides homepage.

ommit linked to task ID 1978530 (fixes linked to internal testing).

closes odoo/odoo#33133

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-03 09:52:02 +00:00
qmo-odoo fa24d7df3a [FIX] website_slides: fix join course widget selector
This commit fixes the selector for the slide_course_join widget. This issue
comes from the removal of the selector 'o_wslides_wrap' recently removed
when cleaning the DOM [1].

Commit linked to task ID 1978530 (fixes linked to internal testing).

[1] See e5c7e43c71
2019-05-03 09:43:15 +00:00
Thibault Delavallée 8c642167e9 [FIX] website_slides: propose to signup instead of login
When joining a course of liking a slide if the user is not logged there
is a popover asking him to login. If auth signup allows user creation
link instead redirects to signup instead of login to save a click and
improve onboarding.

closes odoo/odoo#33755

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-29 13:40:04 +00:00
Sébastien Theys 9dec7ba7e9 [IMP] web, *: add utils to get dataURL (base64) from file/blob
* = partner_autocomplete, point_of_sale, web_editor,
website_forum, website_slides

This can be used for example to preview an image from a file input field.

It can also be used to send the base64 content of the input by RPC instead of
having to rely on form submit as POST with multipart/form-data.

Technically wrap FileReader.readAsDataURL in a Promise.

This will also be used in task-1930726

PR: #33508

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-21 11:37:20 +00:00
qmo-odoo bb36977c36 [IMP] website_slides: Improve new course modal
This commit changes the presentation of the "Create new course"
modal so that it is closer to what we have in backend

task id: 1978734
closes: #33119

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-13 12:03:03 +00:00
qmo-odoo b6f185b45d [FIX] website_slides: Remove read access on slide.answer
This commit removes the read access on slide.answer for all
users except website_publisher and admin

Task: #1947884
PR: #32083

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-06 06:24:38 +00:00
qmo-odoo b0aa580c05 [FIX] website_slides: Fix displayed rewards on quiz
This commit fixes the amount of point gained in a quiz.
The amount of point displayed on the quiz was the number you
would gain on the next attempt instead of the actual amount you gained
when passing it. This was due to the usage of the wrong variable.

Task: #1947884
PR: #32083
2019-05-06 06:02:07 +00:00
sri-odoo e5c7e43c71 [IMP] website_slides: reduce bootstrap customization and improve circular progress design
Purpose: reduce some customization and ease eLearning link with themes. For
that purpose use the body class name propagation recently added.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:42 +00:00
Thibault Delavallée ae636d0739 [FIX] website_slides: remove reference to google+ in lesson statistics update
Let us consider this great social network is not necessary anymore.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:45:40 +00:00
qmo-odoo 258a1e41b0 [FIX] website_slides: fix various quiz-related issues
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
2019-03-21 11:44:09 +00:00
qmo-odoo adf80cf708 [FIX] website_slides[_survey]: fix various fullscreen issues
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
2019-03-21 11:43:03 +00:00
sri-odoo 64b4461229 [FIX] websiste_slides: perform small tweaks on elearning homepage
In Top menu, replace 'My courses' with 'Search' and adapt responsivness
for small devices. Truncate card's description and perform minors design
tweaks. Also add some slides-specific layouting to email validation banner.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:42:19 +00:00
sri-odoo af41430b31 [FIX] website_slides: improve documentation course layout and not fullscreen lesson page
Purpose of this commit is to perform a cleaning of

 * documentation course: add a new specific navigation for documentation
   course with a sort option and filters on slide types; clean overall layout
   of documentation course to have a better-looking result as this page was
   still not really updated;
 * lesson not fullscreen page: global layout and cleaning of not-fullscreen
   page to have a better-looking result. Notably related slides for
   documentation slide is set on right, and some UX bits are tweakes;

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:36 +00:00
sri-odoo f0ec67f106 [FIX] website_slides: improve upload modal overall design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:31 +00:00
sri-odoo 7d27a6d6bf [FIX] website_slides: improve quiz and its success modal layout and design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:23 +00:00
Thibault Delavallée de139a8508 [REF] website_slides: cleanup scss ordering, remove unused classes, add placeholder images
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:20 +00:00
sri-odoo d372c8c42f [FIX] website_slides: improve course overall layout and training content list
Purpose of this commit is to improve the global look of course layout
(notably banner, navigation, course / channel informations). Content list
layout displayed in training (orderable) is also tweaked and improved.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:14 +00:00
sri-odoo d5c6c908f4 [FIX] website_slides: fix course navigation design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:11 +00:00
sri-odoo b2e555eb0b [FIX] website_slides: fix various fullscreen layout issues
Improve overall widget layout, perform some small tweaks. Also remove
top title as it is not wanted.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:07 +00:00
David Beguin 12fd6a01c8 [REF-FIX] website_slides : review and fix access, vote, comment and rating
Commit 5798ca28bf was assuming the vote and
comment access on slide was related to is_preview mode and was, consequently,
depending on each slide separately.

In fact, it's not because a slide is in preview mode that the user has the right
to vote for this slide. He must be course member to interact with this preview
slide, even if he has the right to read it.

So the vote and comment right are now computed at the level of the course,
and apply to all the slides of this course.

This commit also reviews and apply fixes on review - rating access.

Here are the applied rules regarding vote, comment and rating on course and slides:

A user can review a course:
- If allow_comment is activated on the course AND
- If the user is publisher OR
- If the user has enough karma AND is member of the course.

Note : if the rating is not allowed on the course, not only the button
to review must be hidden but also the entire rating composer.

A user can vote and comment a slide:
- If allow_comment is activated on the course AND
- If the user is publisher OR
- If the user has enough karma AND is member of the course.

Other fix applied is this commit :
- Avoid crash when no promoted slide : When going on course homepage
(documentation type), if no promoted slide, we got a internal server error.

Task ID: 1941250
Partial revert of commit 5798ca28bf
PR #31567
2019-03-19 13:03:46 +00:00
jem-odoo 32c5632aa5 [FIX] website_slides: auto set done successfull quizz
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
2019-03-15 20:38:58 +00:00
sri-odoo 54261c4e3e [IMP] website_slides: embedded player restyling
The style and DOM structure of the embeded player (used
to display PDF file) is old, and it needed a little refresh
to be adapt to bootstrap4 and modern styling.

Task-1941250
2019-03-15 20:38:58 +00:00
sri-odoo 69fb136a48 [FIX] website_slides: styling fullscreen mode
Since the fullscreen widget has been revamped, it needed
to be pixel perfect. This commit cleans the CSS and DOM
structure in order to optimize and sublime it.

Task-1941250
2019-03-15 20:38:58 +00:00
David Beguin 5798ca28bf [IMP] website_slides : improve get slide access computation
As slides are returned in sudo to the template, the user rights were
checked via a can_access variable set in the template directly.
In order to disable the vote for user that cannot get access to the course
all the checks are now done in backend (also to avoid to get access to slides
in sudo mode with rpc calls). We add now, for each slide on the course view,
the access and vote rights to the template : can_access and can_vote.
Those two are computed in backend, using the user's access right instead of admin's.
But, as if the user is not member of the channel, he cannot get access to the
course slides (expect for Free Peview ones), so the check on can_vote
will crash. This is why we check the access rights before checking can_vote,
for each slides (as free preview slides are still accessible,
even if the user is not in channel members).

The vote widget is disabled if user's can_access or can_vote = False, enabled otherwise.
If user have access but have not enough karma, the controller will handle this
case and return an error to the user telling him he has not enough karma to vote.
If user can vote but cannot access, the controller will handle this
case and return an error to the user telling him he has no access to the lesson.

Task ID: 1943788
PR #31321
2019-03-15 15:05:54 +00:00
David Beguin d4db21a9cc [IMP] website_slides : allow review, comment and vote only if enough karma
To avoid eLearning to be spammed, the comment, review and vote behaviours
are now allowed only if the user has enough karma to do it.

Here is the new behaviour on courses and slides rating / comment / vote
    -If allow_comment is checked on Course :
        - Review (rating) is allowed on Course only if enough karma
        - Comment is allowed on slides within the course
            only if enough karma and course type is 'training'
        - Vote is allowed on slides within the course
            only if enough karma and course type is 'documentation'
    -If allow_comment is not checked on Course :
        - Review (rating) is not allowed on Course
        - Comment is not allowed on slides within the course
        - Vote is not allowed on slides within the course
    - Rating is not allowed on slides within the course anymore

Task ID : 1943788
PR #31321
2019-03-15 15:05:54 +00:00