Skip to content
Snippets Groups Projects
  1. Mar 15, 2019
    • 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
    • David Beguin's avatar
      [FIX] website_slides : fix and add tests on karma gain · 81cebf34
      David Beguin authored
      Fix karma channel completion computing and karma gain :
          set to complete only if not completed
          and handle eventual multi course completion
      Removes unused karma gain rules.
      Add karma unvote rule to loose the karma gained if user changes his mind.
      Test karma gain on each users.
          Note : technically, public user could be member of a course,
          but functionally speaking, this case should and could never happen
          (it's a non sens anyway)
          -> public user has not been tested for this reason.
      
      Task ID : 1943788
      Closes PR #31321
      81cebf34
    • David Beguin's avatar
      [IMP] website_profile, gamification, : add search bar in all users page · d7cc1520
      David Beguin authored
      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
      d7cc1520
    • David Beguin's avatar
      [IMP] website(_profile,_forum,_slides): move validation email to profile and... · fb40c6bf
      David Beguin authored
      [IMP] website(_profile,_forum,_slides): move validation email to profile and use in forum and elearning
      
      Email validation was necessary on the forum to be able to begin to use the forum
      (ask or answer questions, vote, etc..)
      
      As the new elearning also uses karma since 705376a9,
      the email validation is now also necessary in the eLearning platform.
      
      This is why this commit is moving the email validation process to website_profile
      and extend website_slides (eLearning) and website_forum to use this feature.
      
      In function of where the user asked to send him the validation email,
      the user is redirected on the forum or on the elearning when he clicks on
      'Validate my account' in the received 'email validation' email.
      
      Task ID : 1943788
      PR #31321
      fb40c6bf
  2. Mar 14, 2019
  3. Mar 13, 2019
  4. Mar 12, 2019
  5. Mar 13, 2019
  6. Mar 11, 2019
  7. Mar 12, 2019
Loading