odoo-addon-website-slides-attendees-completed-time 16.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/website_slides_attendees_completed_time/README.rst +137 -0
- odoo/addons/website_slides_attendees_completed_time/__init__.py +2 -0
- odoo/addons/website_slides_attendees_completed_time/__manifest__.py +17 -0
- odoo/addons/website_slides_attendees_completed_time/i18n/website_slides_attendees_completed_time.pot +24 -0
- odoo/addons/website_slides_attendees_completed_time/models/__init__.py +1 -0
- odoo/addons/website_slides_attendees_completed_time/models/slide_channel_partner.py +43 -0
- odoo/addons/website_slides_attendees_completed_time/post_install.py +11 -0
- odoo/addons/website_slides_attendees_completed_time/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/website_slides_attendees_completed_time/readme/DESCRIPTION.md +38 -0
- odoo/addons/website_slides_attendees_completed_time/readme/USAGE.md +3 -0
- odoo/addons/website_slides_attendees_completed_time/static/description/attendees_tree_view.png +0 -0
- odoo/addons/website_slides_attendees_completed_time/static/description/icon.png +0 -0
- odoo/addons/website_slides_attendees_completed_time/static/description/index.html +480 -0
- odoo/addons/website_slides_attendees_completed_time/tests/__init__.py +1 -0
- odoo/addons/website_slides_attendees_completed_time/tests/test_attendees_completed_time.py +97 -0
- odoo/addons/website_slides_attendees_completed_time/views/slide_channel_partner_views.xml +16 -0
- odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/METADATA +152 -0
- odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/RECORD +20 -0
- odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/WHEEL +5 -0
- odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
2
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
3
|
+
:alt: Odoo Community Association
|
|
4
|
+
|
|
5
|
+
=======================================
|
|
6
|
+
Website Slides Attendees Completed Time
|
|
7
|
+
=======================================
|
|
8
|
+
|
|
9
|
+
..
|
|
10
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
11
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
12
|
+
!! changes will be overwritten. !!
|
|
13
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
+
!! source digest: sha256:82bad123e5a772d5d332a747ed5f4b2e40f3da95310bdc4334e50fb2e64bf885
|
|
15
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
|
+
|
|
17
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
18
|
+
:target: https://odoo-community.org/page/development-status
|
|
19
|
+
:alt: Beta
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
21
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
22
|
+
:alt: License: AGPL-3
|
|
23
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--learning-lightgray.png?logo=github
|
|
24
|
+
:target: https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time
|
|
25
|
+
:alt: OCA/e-learning
|
|
26
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/e-learning-16-0/e-learning-16-0-website_slides_attendees_completed_time
|
|
28
|
+
:alt: Translate me on Weblate
|
|
29
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-learning&target_branch=16.0
|
|
31
|
+
:alt: Try me on Runboat
|
|
32
|
+
|
|
33
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
34
|
+
|
|
35
|
+
π Completed Time: Time-Based Completion Tracking per Attendee (in Hours)
|
|
36
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
37
|
+
|
|
38
|
+
This addon enhances Odoo eLearning by introducing a new metric:
|
|
39
|
+
**Completed Time**, computed **per attendee**, which represents the
|
|
40
|
+
**sum of the completion times (in hours)** of the slides they have
|
|
41
|
+
completed.
|
|
42
|
+
|
|
43
|
+
π§ What's Built-In vs. What's Added
|
|
44
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
45
|
+
|
|
46
|
+
**Built-in (Odoo):**
|
|
47
|
+
|
|
48
|
+
- **Progress**
|
|
49
|
+
``Progress = Number of Completed Slides / Total Number of Slides`` β A
|
|
50
|
+
simple ratio, based only on slide count.
|
|
51
|
+
|
|
52
|
+
**Added by this addon:**
|
|
53
|
+
|
|
54
|
+
- **Completed Time (in hours)**
|
|
55
|
+
``Completed Time = Ξ£(completion_time of each completed slide)`` β A
|
|
56
|
+
cumulative total of time-based effort for each attendee.
|
|
57
|
+
|
|
58
|
+
π‘ Why This Matters
|
|
59
|
+
^^^^^^^^^^^^^^^^^^^
|
|
60
|
+
|
|
61
|
+
- β±οΈ **Duration-Aware Insight** Accurately reflects how much content a
|
|
62
|
+
learner has completed, by time spent rather than steps clicked.
|
|
63
|
+
|
|
64
|
+
- π€ **Per-Attendee Computation** Each attendee has a personalized
|
|
65
|
+
Completed Time value, making metrics more meaningful for trainers and
|
|
66
|
+
reports.
|
|
67
|
+
|
|
68
|
+
- π **Actionable Training Analytics** Trainers can better identify
|
|
69
|
+
high-effort learners and tailor support accordingly.
|
|
70
|
+
|
|
71
|
+
π§ͺ Example
|
|
72
|
+
^^^^^^^^^^
|
|
73
|
+
|
|
74
|
+
For a course with 10 slides (total 20 hours), if an attendee completes:
|
|
75
|
+
|
|
76
|
+
- 1 slide of 15 hours β **Progress**: 10% β **Completed Time**: 15h
|
|
77
|
+
|
|
78
|
+
--------------
|
|
79
|
+
|
|
80
|
+
This addon is ideal for serious training environments, compliance
|
|
81
|
+
programs, and professional development, where **time commitment** is a
|
|
82
|
+
better measure than simple slide count.
|
|
83
|
+
|
|
84
|
+
**Table of contents**
|
|
85
|
+
|
|
86
|
+
.. contents::
|
|
87
|
+
:local:
|
|
88
|
+
|
|
89
|
+
Usage
|
|
90
|
+
=====
|
|
91
|
+
|
|
92
|
+
After module installation, you will see course's completed time within
|
|
93
|
+
attendee views.
|
|
94
|
+
|
|
95
|
+
|Attendees Tree View|
|
|
96
|
+
|
|
97
|
+
.. |Attendees Tree View| image:: https://raw.githubusercontent.com/OCA/e-learning/16.0/website_slides_attendees_completed_time/static/description/attendees_tree_view.png
|
|
98
|
+
|
|
99
|
+
Bug Tracker
|
|
100
|
+
===========
|
|
101
|
+
|
|
102
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-learning/issues>`_.
|
|
103
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
104
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
105
|
+
`feedback <https://github.com/OCA/e-learning/issues/new?body=module:%20website_slides_attendees_completed_time%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
106
|
+
|
|
107
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
108
|
+
|
|
109
|
+
Credits
|
|
110
|
+
=======
|
|
111
|
+
|
|
112
|
+
Authors
|
|
113
|
+
-------
|
|
114
|
+
|
|
115
|
+
* Binhex
|
|
116
|
+
|
|
117
|
+
Contributors
|
|
118
|
+
------------
|
|
119
|
+
|
|
120
|
+
- Rolando PΓ©rez rrebollo@binhex.cloud https://binhex.cloud
|
|
121
|
+
|
|
122
|
+
Maintainers
|
|
123
|
+
-----------
|
|
124
|
+
|
|
125
|
+
This module is maintained by the OCA.
|
|
126
|
+
|
|
127
|
+
.. image:: https://odoo-community.org/logo.png
|
|
128
|
+
:alt: Odoo Community Association
|
|
129
|
+
:target: https://odoo-community.org
|
|
130
|
+
|
|
131
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
132
|
+
mission is to support the collaborative development of Odoo features and
|
|
133
|
+
promote its widespread use.
|
|
134
|
+
|
|
135
|
+
This module is part of the `OCA/e-learning <https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time>`_ project on GitHub.
|
|
136
|
+
|
|
137
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright 2025 Binhex
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
{
|
|
5
|
+
"name": "Website Slides Attendees Completed Time",
|
|
6
|
+
"summary": """Show course completed time in attendee views""",
|
|
7
|
+
"version": "16.0.1.0.0",
|
|
8
|
+
"license": "AGPL-3",
|
|
9
|
+
"author": "Binhex,Odoo Community Association (OCA)",
|
|
10
|
+
"website": "https://github.com/OCA/e-learning",
|
|
11
|
+
"depends": ["website_slides"],
|
|
12
|
+
"post_init_hook": "channel_partner_recompute_completion",
|
|
13
|
+
"data": [
|
|
14
|
+
"views/slide_channel_partner_views.xml",
|
|
15
|
+
],
|
|
16
|
+
"demo": [],
|
|
17
|
+
}
|
odoo/addons/website_slides_attendees_completed_time/i18n/website_slides_attendees_completed_time.pot
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * website_slides_attendees_completed_time
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
|
9
|
+
"Last-Translator: \n"
|
|
10
|
+
"Language-Team: \n"
|
|
11
|
+
"MIME-Version: 1.0\n"
|
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
+
"Content-Transfer-Encoding: \n"
|
|
14
|
+
"Plural-Forms: \n"
|
|
15
|
+
|
|
16
|
+
#. module: website_slides_attendees_completed_time
|
|
17
|
+
#: model:ir.model,name:website_slides_attendees_completed_time.model_slide_channel_partner
|
|
18
|
+
msgid "Channel / Partners (Members)"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#. module: website_slides_attendees_completed_time
|
|
22
|
+
#: model:ir.model.fields,field_description:website_slides_attendees_completed_time.field_slide_channel_partner__completed_time
|
|
23
|
+
msgid "Completed Time (hours)"
|
|
24
|
+
msgstr ""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import slide_channel_partner
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Copyright 2025 Binhex
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
from odoo import fields, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class SlideChannelPartner(models.Model):
|
|
8
|
+
_inherit = "slide.channel.partner"
|
|
9
|
+
|
|
10
|
+
completed_time = fields.Float("Completed Time (hours)")
|
|
11
|
+
|
|
12
|
+
def _recompute_completion(self):
|
|
13
|
+
res = super()._recompute_completion()
|
|
14
|
+
read_group_res = (
|
|
15
|
+
self.env["slide.slide.partner"]
|
|
16
|
+
.sudo()
|
|
17
|
+
._read_group(
|
|
18
|
+
[
|
|
19
|
+
"&",
|
|
20
|
+
"&",
|
|
21
|
+
("channel_id", "in", self.mapped("channel_id").ids),
|
|
22
|
+
("partner_id", "in", self.mapped("partner_id").ids),
|
|
23
|
+
("completed", "=", True),
|
|
24
|
+
("slide_id.is_published", "=", True),
|
|
25
|
+
("slide_id.active", "=", True),
|
|
26
|
+
],
|
|
27
|
+
["channel_id", "partner_id", "slide_id:array_agg"],
|
|
28
|
+
groupby=["channel_id", "partner_id"],
|
|
29
|
+
lazy=False,
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
mapped_data = dict()
|
|
33
|
+
Slide = self.env["slide.slide"]
|
|
34
|
+
for item in read_group_res:
|
|
35
|
+
mapped_data.setdefault(item["channel_id"][0], dict())
|
|
36
|
+
mapped_data[item["channel_id"][0]][item["partner_id"][0]] = sum(
|
|
37
|
+
Slide.browse(set(item["slide_id"])).mapped("completion_time"), 0.0
|
|
38
|
+
)
|
|
39
|
+
for record in self:
|
|
40
|
+
record.completed_time = mapped_data.get(record.channel_id.id, dict()).get(
|
|
41
|
+
record.partner_id.id, 0.0
|
|
42
|
+
)
|
|
43
|
+
return res
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Β© 2025 Binhex - Rolando PΓ©rez <r.perez@binhex.cloud>
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
from odoo import SUPERUSER_ID, api
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def channel_partner_recompute_completion(cr, registry):
|
|
9
|
+
env = api.Environment(cr, SUPERUSER_ID, {})
|
|
10
|
+
env["slide.channel.partner"].search([])._recompute_completion()
|
|
11
|
+
return
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Rolando PΓ©rez <rrebollo@binhex.cloud> https://binhex.cloud
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
### π Completed Time: Time-Based Completion Tracking per Attendee (in Hours)
|
|
2
|
+
|
|
3
|
+
This addon enhances Odoo eLearning by introducing a new metric: **Completed Time**, computed **per attendee**, which represents the **sum of the completion times (in hours)** of the slides they have completed.
|
|
4
|
+
|
|
5
|
+
#### π§ What's Built-In vs. What's Added
|
|
6
|
+
|
|
7
|
+
**Built-in (Odoo):**
|
|
8
|
+
- **Progress**
|
|
9
|
+
`Progress = Number of Completed Slides / Total Number of Slides`
|
|
10
|
+
β A simple ratio, based only on slide count.
|
|
11
|
+
|
|
12
|
+
**Added by this addon:**
|
|
13
|
+
- **Completed Time (in hours)**
|
|
14
|
+
`Completed Time = Ξ£(completion_time of each completed slide)`
|
|
15
|
+
β A cumulative total of time-based effort for each attendee.
|
|
16
|
+
|
|
17
|
+
#### π‘ Why This Matters
|
|
18
|
+
|
|
19
|
+
- β±οΈ **Duration-Aware Insight**
|
|
20
|
+
Accurately reflects how much content a learner has completed, by time spent rather than steps clicked.
|
|
21
|
+
|
|
22
|
+
- π€ **Per-Attendee Computation**
|
|
23
|
+
Each attendee has a personalized Completed Time value, making metrics more meaningful for trainers and reports.
|
|
24
|
+
|
|
25
|
+
- π **Actionable Training Analytics**
|
|
26
|
+
Trainers can better identify high-effort learners and tailor support accordingly.
|
|
27
|
+
|
|
28
|
+
#### π§ͺ Example
|
|
29
|
+
|
|
30
|
+
For a course with 10 slides (total 20 hours), if an attendee completes:
|
|
31
|
+
|
|
32
|
+
- 1 slide of 15 hours
|
|
33
|
+
β **Progress**: 10%
|
|
34
|
+
β **Completed Time**: 15h
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
This addon is ideal for serious training environments, compliance programs, and professional development, where **time commitment** is a better measure than simple slide count.
|
odoo/addons/website_slides_attendees_completed_time/static/description/attendees_tree_view.png
ADDED
|
Binary file
|
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
+
<title>README.rst</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
:Author: David Goodger (goodger@python.org)
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
|
+
|
|
14
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document">
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="website-slides-attendees-completed-time">
|
|
370
|
+
<h1>Website Slides Attendees Completed Time</h1>
|
|
371
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
372
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
373
|
+
!! changes will be overwritten. !!
|
|
374
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
+
!! source digest: sha256:82bad123e5a772d5d332a747ed5f4b2e40f3da95310bdc4334e50fb2e64bf885
|
|
376
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time"><img alt="OCA/e-learning" src="https://img.shields.io/badge/github-OCA%2Fe--learning-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/e-learning-16-0/e-learning-16-0-website_slides_attendees_completed_time"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/e-learning&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
|
+
<div class="section" id="completed-time-time-based-completion-tracking-per-attendee-in-hours">
|
|
379
|
+
<h2>π Completed Time: Time-Based Completion Tracking per Attendee (in Hours)</h2>
|
|
380
|
+
<p>This addon enhances Odoo eLearning by introducing a new metric:
|
|
381
|
+
<strong>Completed Time</strong>, computed <strong>per attendee</strong>, which represents the
|
|
382
|
+
<strong>sum of the completion times (in hours)</strong> of the slides they have
|
|
383
|
+
completed.</p>
|
|
384
|
+
<div class="section" id="what-s-built-in-vs-what-s-added">
|
|
385
|
+
<h3>π§ Whatβs Built-In vs. Whatβs Added</h3>
|
|
386
|
+
<p><strong>Built-in (Odoo):</strong></p>
|
|
387
|
+
<ul class="simple">
|
|
388
|
+
<li><strong>Progress</strong>
|
|
389
|
+
<tt class="docutils literal">Progress = Number of Completed Slides / Total Number of Slides</tt> β A
|
|
390
|
+
simple ratio, based only on slide count.</li>
|
|
391
|
+
</ul>
|
|
392
|
+
<p><strong>Added by this addon:</strong></p>
|
|
393
|
+
<ul class="simple">
|
|
394
|
+
<li><strong>Completed Time (in hours)</strong>
|
|
395
|
+
<tt class="docutils literal">Completed Time = Ξ£(completion_time of each completed slide)</tt> β A
|
|
396
|
+
cumulative total of time-based effort for each attendee.</li>
|
|
397
|
+
</ul>
|
|
398
|
+
</div>
|
|
399
|
+
<div class="section" id="why-this-matters">
|
|
400
|
+
<h3>π‘ Why This Matters</h3>
|
|
401
|
+
<ul class="simple">
|
|
402
|
+
<li>β±οΈ <strong>Duration-Aware Insight</strong> Accurately reflects how much content a
|
|
403
|
+
learner has completed, by time spent rather than steps clicked.</li>
|
|
404
|
+
<li>π€ <strong>Per-Attendee Computation</strong> Each attendee has a personalized
|
|
405
|
+
Completed Time value, making metrics more meaningful for trainers and
|
|
406
|
+
reports.</li>
|
|
407
|
+
<li>π <strong>Actionable Training Analytics</strong> Trainers can better identify
|
|
408
|
+
high-effort learners and tailor support accordingly.</li>
|
|
409
|
+
</ul>
|
|
410
|
+
</div>
|
|
411
|
+
<div class="section" id="example">
|
|
412
|
+
<h3>π§ͺ Example</h3>
|
|
413
|
+
<p>For a course with 10 slides (total 20 hours), if an attendee completes:</p>
|
|
414
|
+
<ul class="simple">
|
|
415
|
+
<li>1 slide of 15 hours β <strong>Progress</strong>: 10% β <strong>Completed Time</strong>: 15h</li>
|
|
416
|
+
</ul>
|
|
417
|
+
<hr class="docutils" />
|
|
418
|
+
<p>This addon is ideal for serious training environments, compliance
|
|
419
|
+
programs, and professional development, where <strong>time commitment</strong> is a
|
|
420
|
+
better measure than simple slide count.</p>
|
|
421
|
+
<p><strong>Table of contents</strong></p>
|
|
422
|
+
<div class="contents local topic" id="contents">
|
|
423
|
+
<ul class="simple">
|
|
424
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
|
425
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
|
426
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
|
427
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
|
428
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
|
429
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
|
430
|
+
</ul>
|
|
431
|
+
</li>
|
|
432
|
+
</ul>
|
|
433
|
+
</div>
|
|
434
|
+
<div class="section" id="usage">
|
|
435
|
+
<h4><a class="toc-backref" href="#toc-entry-1">Usage</a></h4>
|
|
436
|
+
<p>After module installation, you will see courseβs completed time within
|
|
437
|
+
attendee views.</p>
|
|
438
|
+
<p><img alt="Attendees Tree View" src="https://raw.githubusercontent.com/OCA/e-learning/16.0/website_slides_attendees_completed_time/static/description/attendees_tree_view.png" /></p>
|
|
439
|
+
</div>
|
|
440
|
+
<div class="section" id="bug-tracker">
|
|
441
|
+
<h4><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h4>
|
|
442
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/e-learning/issues">GitHub Issues</a>.
|
|
443
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
444
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
445
|
+
<a class="reference external" href="https://github.com/OCA/e-learning/issues/new?body=module:%20website_slides_attendees_completed_time%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
446
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
447
|
+
</div>
|
|
448
|
+
<div class="section" id="credits">
|
|
449
|
+
<h4><a class="toc-backref" href="#toc-entry-3">Credits</a></h4>
|
|
450
|
+
<div class="section" id="authors">
|
|
451
|
+
<h5><a class="toc-backref" href="#toc-entry-4">Authors</a></h5>
|
|
452
|
+
<ul class="simple">
|
|
453
|
+
<li>Binhex</li>
|
|
454
|
+
</ul>
|
|
455
|
+
</div>
|
|
456
|
+
<div class="section" id="contributors">
|
|
457
|
+
<h5><a class="toc-backref" href="#toc-entry-5">Contributors</a></h5>
|
|
458
|
+
<ul class="simple">
|
|
459
|
+
<li>Rolando PΓ©rez <a class="reference external" href="mailto:rrebollo@binhex.cloud">rrebollo@binhex.cloud</a> <a class="reference external" href="https://binhex.cloud">https://binhex.cloud</a></li>
|
|
460
|
+
</ul>
|
|
461
|
+
</div>
|
|
462
|
+
<div class="section" id="maintainers">
|
|
463
|
+
<h5><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h5>
|
|
464
|
+
<p>This module is maintained by the OCA.</p>
|
|
465
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
466
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
467
|
+
</a>
|
|
468
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
469
|
+
mission is to support the collaborative development of Odoo features and
|
|
470
|
+
promote its widespread use.</p>
|
|
471
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time">OCA/e-learning</a> project on GitHub.</p>
|
|
472
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
473
|
+
</div>
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
</div>
|
|
478
|
+
</div>
|
|
479
|
+
</body>
|
|
480
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import test_attendees_completed_time
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
from odoo.tests import tagged
|
|
2
|
+
from odoo.tools import mute_logger
|
|
3
|
+
|
|
4
|
+
from odoo.addons.website_slides.tests import common
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@tagged("-at_install", "post_install")
|
|
8
|
+
class TestAttendeesCompletedTime(common.SlidesCase):
|
|
9
|
+
@mute_logger("odoo.models")
|
|
10
|
+
def test_channel_attendees_completed_time(self):
|
|
11
|
+
channel_publisher = self.channel.with_user(self.user_officer)
|
|
12
|
+
channel_publisher.write(
|
|
13
|
+
{
|
|
14
|
+
"enroll": "invite",
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
channel_publisher._action_add_members(self.user_emp.partner_id)
|
|
18
|
+
self.channel.with_user(self.user_emp)
|
|
19
|
+
|
|
20
|
+
members = self.env["slide.channel.partner"].search(
|
|
21
|
+
[("channel_id", "=", self.channel.id)]
|
|
22
|
+
)
|
|
23
|
+
member_emp = members.filtered(
|
|
24
|
+
lambda m: m.partner_id == self.user_emp.partner_id
|
|
25
|
+
)
|
|
26
|
+
member_publisher = members.filtered(
|
|
27
|
+
lambda m: m.partner_id == self.user_officer.partner_id
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
slides_emp = (self.slide | self.slide_2).with_user(self.user_emp)
|
|
31
|
+
slides_emp.action_set_viewed()
|
|
32
|
+
self.assertEqual(member_emp.completed_time, 0)
|
|
33
|
+
|
|
34
|
+
slides_emp.action_mark_completed()
|
|
35
|
+
|
|
36
|
+
slides_emp_completed_time = sum(slides_emp.mapped("completion_time"))
|
|
37
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
38
|
+
self.slide_3.with_user(self.user_emp)._action_mark_completed()
|
|
39
|
+
slides_emp_completed_time += self.slide_3.completion_time
|
|
40
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
41
|
+
|
|
42
|
+
# The following tests should update the completed_time even for users
|
|
43
|
+
# that have already completed the course
|
|
44
|
+
|
|
45
|
+
self.slide_3.is_published = False
|
|
46
|
+
slides_emp_completed_time -= self.slide_3.completion_time
|
|
47
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
48
|
+
self.slide_3.is_published = True
|
|
49
|
+
self.slide_3.active = False
|
|
50
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
51
|
+
|
|
52
|
+
# Should update completed_time when slide is marked as completed
|
|
53
|
+
|
|
54
|
+
self.assertEqual(member_publisher.completed_time, 0)
|
|
55
|
+
self.slide.with_user(self.user_officer).action_mark_completed()
|
|
56
|
+
slides_publisher_completed_time = self.slide.completion_time
|
|
57
|
+
self.assertEqual(
|
|
58
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# Should update completed_time when slide is (un)archived
|
|
62
|
+
self.slide_3.active = True
|
|
63
|
+
slides_emp_completed_time += self.slide_3.completion_time
|
|
64
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
65
|
+
self.assertEqual(
|
|
66
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
# Shouln't update completed_time when a new published slide is created
|
|
70
|
+
self.slide_4 = self.slide_3.copy({"is_published": True})
|
|
71
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
72
|
+
self.assertEqual(
|
|
73
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Shouldn't update completed_time when slide is (un)published
|
|
77
|
+
self.slide_4.is_published = False
|
|
78
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
79
|
+
self.assertEqual(
|
|
80
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# Should update completed_time when slide is marked as uncompleted
|
|
84
|
+
self.slide.with_user(self.user_emp).action_mark_uncompleted()
|
|
85
|
+
slides_emp_completed_time -= self.slide.completion_time
|
|
86
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
87
|
+
self.assertEqual(
|
|
88
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# Should update completed_time when a slide is unlinked
|
|
92
|
+
slides_publisher_completed_time -= self.slide.completion_time
|
|
93
|
+
self.slide.with_user(self.user_manager).unlink()
|
|
94
|
+
self.assertEqual(member_emp.completed_time, slides_emp_completed_time)
|
|
95
|
+
self.assertEqual(
|
|
96
|
+
member_publisher.completed_time, slides_publisher_completed_time
|
|
97
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<!-- Copyright 2025 Binhex
|
|
3
|
+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
|
4
|
+
<odoo>
|
|
5
|
+
|
|
6
|
+
<record model="ir.ui.view" id="slide_channel_partner_view_tree">
|
|
7
|
+
<field name="model">slide.channel.partner</field>
|
|
8
|
+
<field name="inherit_id" ref="website_slides.slide_channel_partner_view_tree" />
|
|
9
|
+
<field name="arch" type="xml">
|
|
10
|
+
<field name="completion" position="before">
|
|
11
|
+
<field name="completed_time" widget="float_time" />
|
|
12
|
+
</field>
|
|
13
|
+
</field>
|
|
14
|
+
</record>
|
|
15
|
+
|
|
16
|
+
</odoo>
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-website_slides_attendees_completed_time
|
|
3
|
+
Version: 16.0.1.0.0.2
|
|
4
|
+
Summary: Show course completed time in attendee views
|
|
5
|
+
Home-page: https://github.com/OCA/e-learning
|
|
6
|
+
Author: Binhex,Odoo Community Association (OCA)
|
|
7
|
+
Author-email: support@odoo-community.org
|
|
8
|
+
License: AGPL-3
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Framework :: Odoo
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
15
|
+
|
|
16
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
17
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
18
|
+
:alt: Odoo Community Association
|
|
19
|
+
|
|
20
|
+
=======================================
|
|
21
|
+
Website Slides Attendees Completed Time
|
|
22
|
+
=======================================
|
|
23
|
+
|
|
24
|
+
..
|
|
25
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
27
|
+
!! changes will be overwritten. !!
|
|
28
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
|
+
!! source digest: sha256:82bad123e5a772d5d332a747ed5f4b2e40f3da95310bdc4334e50fb2e64bf885
|
|
30
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
31
|
+
|
|
32
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
33
|
+
:target: https://odoo-community.org/page/development-status
|
|
34
|
+
:alt: Beta
|
|
35
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
36
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
37
|
+
:alt: License: AGPL-3
|
|
38
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--learning-lightgray.png?logo=github
|
|
39
|
+
:target: https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time
|
|
40
|
+
:alt: OCA/e-learning
|
|
41
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
42
|
+
:target: https://translation.odoo-community.org/projects/e-learning-16-0/e-learning-16-0-website_slides_attendees_completed_time
|
|
43
|
+
:alt: Translate me on Weblate
|
|
44
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
45
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-learning&target_branch=16.0
|
|
46
|
+
:alt: Try me on Runboat
|
|
47
|
+
|
|
48
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
49
|
+
|
|
50
|
+
π Completed Time: Time-Based Completion Tracking per Attendee (in Hours)
|
|
51
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
52
|
+
|
|
53
|
+
This addon enhances Odoo eLearning by introducing a new metric:
|
|
54
|
+
**Completed Time**, computed **per attendee**, which represents the
|
|
55
|
+
**sum of the completion times (in hours)** of the slides they have
|
|
56
|
+
completed.
|
|
57
|
+
|
|
58
|
+
π§ What's Built-In vs. What's Added
|
|
59
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
60
|
+
|
|
61
|
+
**Built-in (Odoo):**
|
|
62
|
+
|
|
63
|
+
- **Progress**
|
|
64
|
+
``Progress = Number of Completed Slides / Total Number of Slides`` β A
|
|
65
|
+
simple ratio, based only on slide count.
|
|
66
|
+
|
|
67
|
+
**Added by this addon:**
|
|
68
|
+
|
|
69
|
+
- **Completed Time (in hours)**
|
|
70
|
+
``Completed Time = Ξ£(completion_time of each completed slide)`` β A
|
|
71
|
+
cumulative total of time-based effort for each attendee.
|
|
72
|
+
|
|
73
|
+
π‘ Why This Matters
|
|
74
|
+
^^^^^^^^^^^^^^^^^^^
|
|
75
|
+
|
|
76
|
+
- β±οΈ **Duration-Aware Insight** Accurately reflects how much content a
|
|
77
|
+
learner has completed, by time spent rather than steps clicked.
|
|
78
|
+
|
|
79
|
+
- π€ **Per-Attendee Computation** Each attendee has a personalized
|
|
80
|
+
Completed Time value, making metrics more meaningful for trainers and
|
|
81
|
+
reports.
|
|
82
|
+
|
|
83
|
+
- π **Actionable Training Analytics** Trainers can better identify
|
|
84
|
+
high-effort learners and tailor support accordingly.
|
|
85
|
+
|
|
86
|
+
π§ͺ Example
|
|
87
|
+
^^^^^^^^^^
|
|
88
|
+
|
|
89
|
+
For a course with 10 slides (total 20 hours), if an attendee completes:
|
|
90
|
+
|
|
91
|
+
- 1 slide of 15 hours β **Progress**: 10% β **Completed Time**: 15h
|
|
92
|
+
|
|
93
|
+
--------------
|
|
94
|
+
|
|
95
|
+
This addon is ideal for serious training environments, compliance
|
|
96
|
+
programs, and professional development, where **time commitment** is a
|
|
97
|
+
better measure than simple slide count.
|
|
98
|
+
|
|
99
|
+
**Table of contents**
|
|
100
|
+
|
|
101
|
+
.. contents::
|
|
102
|
+
:local:
|
|
103
|
+
|
|
104
|
+
Usage
|
|
105
|
+
=====
|
|
106
|
+
|
|
107
|
+
After module installation, you will see course's completed time within
|
|
108
|
+
attendee views.
|
|
109
|
+
|
|
110
|
+
|Attendees Tree View|
|
|
111
|
+
|
|
112
|
+
.. |Attendees Tree View| image:: https://raw.githubusercontent.com/OCA/e-learning/16.0/website_slides_attendees_completed_time/static/description/attendees_tree_view.png
|
|
113
|
+
|
|
114
|
+
Bug Tracker
|
|
115
|
+
===========
|
|
116
|
+
|
|
117
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-learning/issues>`_.
|
|
118
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
119
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
120
|
+
`feedback <https://github.com/OCA/e-learning/issues/new?body=module:%20website_slides_attendees_completed_time%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
121
|
+
|
|
122
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
123
|
+
|
|
124
|
+
Credits
|
|
125
|
+
=======
|
|
126
|
+
|
|
127
|
+
Authors
|
|
128
|
+
-------
|
|
129
|
+
|
|
130
|
+
* Binhex
|
|
131
|
+
|
|
132
|
+
Contributors
|
|
133
|
+
------------
|
|
134
|
+
|
|
135
|
+
- Rolando PΓ©rez rrebollo@binhex.cloud https://binhex.cloud
|
|
136
|
+
|
|
137
|
+
Maintainers
|
|
138
|
+
-----------
|
|
139
|
+
|
|
140
|
+
This module is maintained by the OCA.
|
|
141
|
+
|
|
142
|
+
.. image:: https://odoo-community.org/logo.png
|
|
143
|
+
:alt: Odoo Community Association
|
|
144
|
+
:target: https://odoo-community.org
|
|
145
|
+
|
|
146
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
147
|
+
mission is to support the collaborative development of Odoo features and
|
|
148
|
+
promote its widespread use.
|
|
149
|
+
|
|
150
|
+
This module is part of the `OCA/e-learning <https://github.com/OCA/e-learning/tree/16.0/website_slides_attendees_completed_time>`_ project on GitHub.
|
|
151
|
+
|
|
152
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
odoo/addons/website_slides_attendees_completed_time/README.rst,sha256=Giy9uxuqD3zUGWTkkiSGQtPoRrHFkVsn-yVe1xREvsI,4989
|
|
2
|
+
odoo/addons/website_slides_attendees_completed_time/__init__.py,sha256=uFzLTecRIblFLRTSGM5JGXCZwDJEqJwIamXSIecINS8,84
|
|
3
|
+
odoo/addons/website_slides_attendees_completed_time/__manifest__.py,sha256=au0JrgIWE7b3XfQpHT0awgPC56dpSErOftF5EKSRzQ8,562
|
|
4
|
+
odoo/addons/website_slides_attendees_completed_time/post_install.py,sha256=zOmvarhdmFOjIEn3rVA_bQKiy80hFDnXpN5QAAb0ZZQ,349
|
|
5
|
+
odoo/addons/website_slides_attendees_completed_time/i18n/website_slides_attendees_completed_time.pot,sha256=qzegwkIFejftd3WXkV-WCLuWQri5-LSFfzUNbTheTzU,796
|
|
6
|
+
odoo/addons/website_slides_attendees_completed_time/models/__init__.py,sha256=qfZ4JUwqKh9L7rFAORb0DZuI1tQVjl96pibobKBJdPs,36
|
|
7
|
+
odoo/addons/website_slides_attendees_completed_time/models/slide_channel_partner.py,sha256=GdadsfZ0pjvdTnxcMJzVymVvYngxsnT_whkt0LTNlg8,1564
|
|
8
|
+
odoo/addons/website_slides_attendees_completed_time/readme/CONTRIBUTORS.md,sha256=jOOvqgLUDeC0PFeD5T3-DoiRYqww6d4golMWQ2Ufzoo,62
|
|
9
|
+
odoo/addons/website_slides_attendees_completed_time/readme/DESCRIPTION.md,sha256=zdZjEHpPA42OdN3JmVydRVt_SQt9HDdvmZyuDZGRE5Q,1471
|
|
10
|
+
odoo/addons/website_slides_attendees_completed_time/readme/USAGE.md,sha256=jmSOPxtC8msx2Y5jPUxwzAOY4N0pYrPGvJPO0jAcyxU,158
|
|
11
|
+
odoo/addons/website_slides_attendees_completed_time/static/description/attendees_tree_view.png,sha256=9vYVNjY-evzDLDGOfnioGIVkTFGY4d55S1t7qkWNUUQ,190625
|
|
12
|
+
odoo/addons/website_slides_attendees_completed_time/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
13
|
+
odoo/addons/website_slides_attendees_completed_time/static/description/index.html,sha256=qJPcgg9TmNeZM_w86-EjmW0AOSKAGMq_4FOH9962Kwk,15097
|
|
14
|
+
odoo/addons/website_slides_attendees_completed_time/tests/__init__.py,sha256=QYPTtLYC6BPA1nnQaKtZhsnlUExz0D03wxc_QR52zag,44
|
|
15
|
+
odoo/addons/website_slides_attendees_completed_time/tests/test_attendees_completed_time.py,sha256=GRemlO34CLCnnVtQyV76477GKzqXszsUwaB98mvr4A8,4185
|
|
16
|
+
odoo/addons/website_slides_attendees_completed_time/views/slide_channel_partner_views.xml,sha256=9ZtX0cRtKMaXOSLOQkNxYITixMhbfF06Y_1j9Im9nBo,587
|
|
17
|
+
odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/METADATA,sha256=nZJ-M08b1t93cgIZ_hjBCg9-U5QaG9o-_v8xgEYd0j8,5542
|
|
18
|
+
odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
19
|
+
odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
20
|
+
odoo_addon_website_slides_attendees_completed_time-16.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|