Skip to content
Snippets Groups Projects
  1. Mar 21, 2019
    • 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. Mar 06, 2019
  8. Feb 26, 2019
  9. 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
  10. 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
  11. 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
    • qmo-odoo's avatar
      [IMP] website_slides: Add elearning feature to slides · c564ae6c
      qmo-odoo authored
      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 b2149bc7: certification inclusion
      [2] Task ID 1936153 landed at 6c6179e5: homepage inclusion
      [3] Task ID 1937160 landed at 8b7605c9: selling courses
      [4] Task ID 1922159 and 1940516 landed at 5fa651cb and 6a64c3ce:
          new user profile and gamification of slides / forum
      [5] Task ID 1938643 landed at 77b5673a: upload channel/slide
      c564ae6c
  12. Feb 15, 2019
    • Thibault Delavallée's avatar
      [IMP] website_profile, website_slides: add user ranking and karma on elearning main pages · bd2dae4f
      Thibault Delavallée authored
      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 5fa651cb)
      bd2dae4f
    • Thibault Delavallée's avatar
      [FIX] website_profile, website_slides: clean user avatar controller and add one for slides · 1bb7b242
      Thibault Delavallée authored
      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.
      1bb7b242
    • Aurélien Warnon's avatar
      [ADD] website_slides_survey: add a new bridge between slide and survey · f322816a
      Aurélien Warnon authored
      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).
      f322816a
    • Aurélien Warnon's avatar
      [FIX] website_slides: fix publisher slides frontend access · 949f6412
      Aurélien Warnon authored
      Purpose
      =======
      
      Website publisher should be allowed to access slides on the frontend even if
      he's not a member of the channel.
      949f6412
    • Thibault Delavallée's avatar
      [IMP] website_slides: new homepage and main channel page · 2cfacfc6
      Thibault Delavallée authored
      
      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: default avatarqmo-odoo <qmo@odoo.com>
      Co-Authored-By: default avatarThibault Delavallee <tde@odoo.com>
      2cfacfc6
    • Thibault Delavallée's avatar
      [REF] website_slides: perform some model code cleaning · c437832e
      Thibault Delavallée authored
      
      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: default avatarAurélien Warnon <awa@odoo.com>
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      c437832e
  13. Feb 14, 2019
    • Jérome Maes's avatar
      [IMP] website_slides: allow comments on slides · 8ad65abd
      Jérome Maes authored
      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
      8ad65abd
  14. Feb 12, 2019
    • qmo-odoo's avatar
      [IMP] website_slides: webpage slide type · 0f22f952
      qmo-odoo authored
      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
      0f22f952
    • qmo-odoo's avatar
      [IMP] website_slides: add external links on slide · 5aa645c8
      qmo-odoo authored
      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
      5aa645c8
  15. Feb 14, 2019
    • David Beguin's avatar
      [IMP] website_slides : use website_profile page template and adds... · d8f156ae
      David Beguin authored
      [IMP] website_slides : use website_profile page template and adds website_slides specific information
      
      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
      d8f156ae
  16. Feb 13, 2019
    • Aurélien Warnon's avatar
      [REF] website_slides: rework slide's public and embedded views · 82ce815a
      Aurélien Warnon authored
      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).
      82ce815a
  17. Feb 11, 2019
    • Thibault Delavallée's avatar
      [REF] website_slides: remove promoted slide feature, add image and channel_type · 7b81df37
      Thibault Delavallée authored
      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.
      7b81df37
    • Thibault Delavallée's avatar
      [IMP] website_slides: improve and add statistics computation · 7ee22f12
      Thibault Delavallée authored
      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.
      7ee22f12
  18. Feb 07, 2019
    • Thibault Delavallée's avatar
      [IMP] website_slides: add widget to join a channel · 797daba1
      Thibault Delavallée authored
      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.
      797daba1
    • Thibault Delavallée's avatar
      [IMP] website_slides: improve upload slide screen · ddccd33b
      Thibault Delavallée authored
      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.
      ddccd33b
Loading