Steps to reproduce:
- Install eLearning module
- Create a course with 2 slides and publish them
- Add a user as a member of the course
- Complete the first slide
- Add a new slide to the course and publish it
- Go to course and click on `Attendees` stat button
Issue:
The member completion percentage is not updated.
Cause:
When (un)publishing a slide, only the current user that publish the
course have his completion percentage updated.
Solution:
When (un)publishing, (un)archiving, unlinking or creating slide(s)
(slide must be published for the creation case), or when user mark
slide as (un)completed manually, update the completion percentage of
all members of the course except the members that already have
completed the course.
From version saas-16.3 we do not need the custom context key we
introduced in 94e2dd2 because we will not update the completion
percentage of members that have completed the course even if they
manually mark a slide as uncompleted.
opw-3225707
closesodoo/odoo#134845
X-original-commit: 2796b3163c02306f1309e2dde764fff2f1b287cc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>