[FIX] website_slides: prevent auto-marking videos complete

When user will open the video in any course, it will be marked as completed
directly which behaves like any other content(pdf, image). This behavior was
introduced when 'slide_view' was modified in https://github.com/odoo/odoo/commit/4c291fe30468dab7cef9d2e5a0377c78484f5045, but in the case of video,
it must not be marked as completed before the video is watched up until(near)
the end, as per the previous behavior.

Task-3346507

closes odoo/odoo#125128

X-original-commit: 488ce25425f71733abc3aa7b32f299d6abf48055
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Jay Savaliya
2023-06-15 09:05:24 +02:00
parent 431a5bfe5a
commit e1f1767491
+1 -1
View File
@@ -933,7 +933,7 @@ class WebsiteSlides(WebsiteProfile):
return request.redirect(slide.channel_id.website_url)
if slide.can_self_mark_completed and not slide.user_has_completed \
and slide.channel_id.channel_type == 'training':
and slide.channel_id.channel_type == 'training' and slide.slide_category != 'video':
self._slide_mark_completed(slide)
else:
self._set_viewed_slide(slide)