Skip to content
Snippets Groups Projects
  1. Sep 03, 2019
    • Thibault Delavallée's avatar
      [FIX] website_slides: do not allow fullscreen to bypass ACLs · 3f4bd440
      Thibault Delavallée authored
      Currently fullscreen takes all information from categorized slides to
      display its menu. In order to avoid calls to server some information
      is prepared in DOM to speedup loading. It means slide information is
      available even when not being member of a course which leads to some content
      leak.
      
      This commit fixes that by correctly checking that a slide can be accessed
      before allowing to have access to its information and embedded code. Access
      of a slide is either member of a course, either course publisher.
      
      Task 2058595 (eLearning v13 testing)
      Task 2064112 (fullscreen bug report)
      3f4bd440
  2. Aug 08, 2019
    • qmo-odoo's avatar
      [REF] website_slides: replace slide.category by slide with is_category flag · b180c66a
      qmo-odoo authored
      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
      b180c66a
  3. Aug 05, 2019
  4. Aug 12, 2019
    • Aurélien Warnon's avatar
      [REF] website_slides: remove index_content field from slide.slide · 5e4f37a1
      Aurélien Warnon authored
      The 'index_content' field was only filled when uploading from the frontend.
      That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view.
      The field was also not cleaned if the slide content changed.
      
      As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
      5e4f37a1
  5. Aug 02, 2019
    • Sébastien Theys's avatar
      [IMP] *: rename image fields · 58a2ffa2
      Sébastien Theys authored
      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
      58a2ffa2
  6. Jun 24, 2019
    • qmo-odoo's avatar
      [IMP] website(_sale)_slides: Add login,join,buy button on quiz · cd8afe85
      qmo-odoo authored
      
      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: default avatarThibault Delavallee (tde) <tde@openerp.com>
      cd8afe85
  7. Jun 18, 2019
    • Patrick Hoste's avatar
      [FIX] website_slides: fix various issues to eLearning platform · f0ec2a8f
      Patrick Hoste authored
      
      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: default avatarThibault Delavallee (tde) <tde@openerp.com>
      f0ec2a8f
  8. Jun 14, 2019
  9. Jun 12, 2019
  10. Jun 11, 2019
  11. Jul 31, 2019
  12. May 03, 2019
  13. May 06, 2019
  14. Mar 21, 2019
    • qmo-odoo's avatar
      [FIX] website_slides: fix various non-fullscreen view issues · 3e09ed15
      qmo-odoo authored
      This commit provides a few fixes for the non-fullscreen view:
      
        * remove the subquiz link on slides of type 'quiz' in the sidebar;
        * hide completion icons in sidebar if not member;
        * only show the 'embed on your website' option when a slide has an embed
          code. This will prevent slides of type 'certification' or 'quiz' to
          display an empty embed box;
      
      Commit linked to task ID 1941250 and PR #31977
      3e09ed15
    • qmo-odoo's avatar
      [FIX] website_slides: fix various quiz-related issues · 258a1e41
      qmo-odoo authored
      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
      258a1e41
    • sri-odoo's avatar
      [FIX] website_slides: improve documentation course layout and not fullscreen lesson page · af41430b
      sri-odoo authored
      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
      af41430b
    • sri-odoo's avatar
      [FIX] website_slides: improve quiz and its success modal layout and design · 7d27a6d6
      sri-odoo authored
      Commit linked to task ID 1941250 and PR #31977
      7d27a6d6
    • sri-odoo's avatar
      [FIX] website_slides: improve course overall layout and training content list · d372c8c4
      sri-odoo authored
      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
      d372c8c4
  15. Mar 19, 2019
    • David Beguin's avatar
      [REF-FIX] website_slides : review and fix access, vote, comment and rating · 12fd6a01
      David Beguin authored
      Commit 5798ca28 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 5798ca28
      PR #31567
      12fd6a01
  16. Mar 15, 2019
    • Jérome Maes's avatar
      [FIX] website_slides: prevent to mark a certification as done · 954e8ca6
      Jérome Maes authored
      When a certification slide is display in no fullscreen
      mode, the done button is clickable. Same applies to quiz
      slide.
      This commit prevents user to manually mark a slide as done
      for slide type that requires an other action (submit answer,
      pass survey, ...).
      
      Task-1941250
      954e8ca6
    • David Beguin's avatar
      [IMP] website_slides : improve get slide access computation · 5798ca28
      David Beguin authored
      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
      5798ca28
    • David Beguin's avatar
      [IMP] website_slides : allow review, comment and vote only if enough karma · d4db21a9
      David Beguin authored
      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
      d4db21a9
  17. Mar 12, 2019
    • qmo-odoo's avatar
      [FIX] website_slides: no completion for public user · 24d30331
      qmo-odoo authored
      
      When a slide is seen by user, it should be marked as completed
      (according to its type), and the user completion for the course
      is updated. But for public user, we don't want those RPC calls
      to be done, as completion for visitor makes no sense.
      This commit also hide progressbar when current user is public.
      
      Task-1942852
      
      closes odoo/odoo#31700
      
      Signed-off-by: default avatarJérome Maes (jem) <jem@openerp.com>
      24d30331
  18. Mar 08, 2019
    • Thibault Delavallée's avatar
      [FIX] website_slides: various fixes · 7afd23e5
      Thibault Delavallée authored
      
      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: default avatarThibault Delavallee (tde) <tde@openerp.com>
      7afd23e5
  19. Mar 07, 2019
    • Thibault Delavallée's avatar
      [REF] website_slides: rework standard lesson page view · 20e68b32
      Thibault Delavallée authored
      
      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: default avatarThibault Delavallee (tde) <tde@openerp.com>
      20e68b32
    • Jérome Maes's avatar
      [REF] website_slides: redesign quiz widget · 3393dd00
      Jérome Maes authored
      
      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: default avatarThibault Delavallee (tde) <tde@openerp.com>
      3393dd00
  20. Mar 06, 2019
  21. Feb 26, 2019
  22. Apr 23, 2019
  23. Feb 21, 2019
    • David Beguin's avatar
      [FIX] website_slides: add various design and UX fixes · c2629d11
      David Beguin authored
      - 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.
      c2629d11
  24. Feb 20, 2019
    • Thibault Delavallée's avatar
      [IMP] website_slides: perform some code linting and re-order frontend templates · 9ae7f5a2
      Thibault Delavallée authored
      Purpose is to perform some linting in code. No functional change should
      occur with this commit, only some code move. Diff may appear huge but
      it is just because some files are split.
      
      This cleaning allow to better understand code and templates architecture
      now that eLearning feature has landed in Odoo Community. It will ease future
      additions, modifications and fixes.
      
      Containing :
       * [REF] make some internal slide-related methods private as they are not
         intended to be called by outside world;
       * [MOV] new channel invite wizard in wizard folder;
       * [MOV] split frontend templates in some files to better locate code. There is
         now files for homepage, course, lesson, embed and utils in addition to
         slide-related profile template;
       * [REM] dead (unused) templates;
      
      Commit linked to task ID 1941250 and PR #31272.
      9ae7f5a2
  25. Feb 19, 2019
    • Thibault Delavallée's avatar
      [REF] website_slides: improve and make access options clearer · 18f917fe
      Thibault Delavallée authored
      
      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: default avatarAurélien Warnon <awa@odoo.com>
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      18f917fe
Loading