platform-plugin-aspects 0.9.6__tar.gz → 0.10.0__tar.gz
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.
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/CHANGELOG.rst +17 -0
- {platform_plugin_aspects-0.9.6/platform_plugin_aspects.egg-info → platform_plugin_aspects-0.10.0}/PKG-INFO +20 -1
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/README.rst +2 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/__init__.py +1 -1
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/apps.py +12 -1
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/settings/common.py +4 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/signals.py +26 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/__init__.py +1 -0
- platform_plugin_aspects-0.10.0/platform_plugin_aspects/sinks/course_enrollment_sink.py +20 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/course_overview_sink.py +3 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/serializers.py +27 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0/platform_plugin_aspects.egg-info}/PKG-INFO +20 -1
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/SOURCES.txt +1 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/LICENSE +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/MANIFEST.in +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/extensions/__init__.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/extensions/filters.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/management/__init__.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/management/commands/__init__.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/management/commands/dump_data_to_clickhouse.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/management/commands/load_test_tracking_events.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/settings/__init__.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/settings/production.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/base_sink.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/external_id_sink.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/user_profile_sink.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/sinks/user_retire_sink.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/css/superset.css +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/html/superset.html +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/html/superset_student.html +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/js/embed_dashboard.js +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/js/install_required.js +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/static/js/superset.js +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/tasks.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/templates/instructor_dashboard/aspects.html +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/urls.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/utils.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/views.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/waffle.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/xblock.py +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/dependency_links.txt +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/entry_points.txt +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/not-zip-safe +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/requires.txt +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects.egg-info/top_level.txt +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/requirements/base.in +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/requirements/constraints.txt +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/setup.cfg +0 -0
- {platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/setup.py +0 -0
|
@@ -14,6 +14,23 @@ Change Log
|
|
|
14
14
|
Unreleased
|
|
15
15
|
**********
|
|
16
16
|
|
|
17
|
+
0.10.0 - 2024-06-17
|
|
18
|
+
*******************
|
|
19
|
+
|
|
20
|
+
Added
|
|
21
|
+
=====
|
|
22
|
+
|
|
23
|
+
* A sink for the course enrollment model.
|
|
24
|
+
|
|
25
|
+
0.9.7 - 2024-06-14
|
|
26
|
+
******************
|
|
27
|
+
|
|
28
|
+
Fixes
|
|
29
|
+
=====
|
|
30
|
+
|
|
31
|
+
* 0.9.6 introduced a bug in the CourseOverview sink that caused block sink to fail to import to ClickHouse, this fixes it.
|
|
32
|
+
|
|
33
|
+
|
|
17
34
|
0.9.6 - 2024-06-07
|
|
18
35
|
******************
|
|
19
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Aspects plugins for edx-platform
|
|
5
5
|
Home-page: https://github.com/openedx/platform-plugin-aspects
|
|
6
6
|
Author: Open edX Project
|
|
@@ -58,6 +58,8 @@ Available Sinks
|
|
|
58
58
|
model and stores the user profile data in ClickHouse.
|
|
59
59
|
- `UserRetirementSink` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
|
|
60
60
|
remove the user PII information from ClickHouse.
|
|
61
|
+
- `CourseEnrollmentSink` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
|
|
62
|
+
the course enrollment data.
|
|
61
63
|
|
|
62
64
|
Commands
|
|
63
65
|
========
|
|
@@ -276,6 +278,23 @@ Change Log
|
|
|
276
278
|
Unreleased
|
|
277
279
|
**********
|
|
278
280
|
|
|
281
|
+
0.10.0 - 2024-06-17
|
|
282
|
+
*******************
|
|
283
|
+
|
|
284
|
+
Added
|
|
285
|
+
=====
|
|
286
|
+
|
|
287
|
+
* A sink for the course enrollment model.
|
|
288
|
+
|
|
289
|
+
0.9.7 - 2024-06-14
|
|
290
|
+
******************
|
|
291
|
+
|
|
292
|
+
Fixes
|
|
293
|
+
=====
|
|
294
|
+
|
|
295
|
+
* 0.9.6 introduced a bug in the CourseOverview sink that caused block sink to fail to import to ClickHouse, this fixes it.
|
|
296
|
+
|
|
297
|
+
|
|
279
298
|
0.9.6 - 2024-06-07
|
|
280
299
|
******************
|
|
281
300
|
|
|
@@ -23,6 +23,8 @@ Available Sinks
|
|
|
23
23
|
model and stores the user profile data in ClickHouse.
|
|
24
24
|
- `UserRetirementSink` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
|
|
25
25
|
remove the user PII information from ClickHouse.
|
|
26
|
+
- `CourseEnrollmentSink` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
|
|
27
|
+
the course enrollment data.
|
|
26
28
|
|
|
27
29
|
Commands
|
|
28
30
|
========
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/apps.py
RENAMED
|
@@ -49,7 +49,18 @@ class PlatformPluginAspectsConfig(AppConfig):
|
|
|
49
49
|
PluginSignals.SIGNAL_PATH: "xmodule.modulestore.django.COURSE_PUBLISHED",
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
|
-
}
|
|
52
|
+
},
|
|
53
|
+
"lms.djangoapp": {
|
|
54
|
+
# List of all plugin Signal receivers for this app and project type.
|
|
55
|
+
PluginSignals.RECEIVERS: [
|
|
56
|
+
{
|
|
57
|
+
# The name of the app's signal receiver function.
|
|
58
|
+
PluginSignals.RECEIVER_FUNC_NAME: "receive_course_enrollment_changed",
|
|
59
|
+
# The full path to the module where the signal is defined.
|
|
60
|
+
PluginSignals.SIGNAL_PATH: "common.djangoapps.student.signals.signals.ENROLL_STATUS_CHANGE",
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
},
|
|
53
64
|
},
|
|
54
65
|
}
|
|
55
66
|
|
|
@@ -82,6 +82,10 @@ def plugin_settings(settings):
|
|
|
82
82
|
"module": "openedx.core.djangoapps.external_user_ids.models",
|
|
83
83
|
"model": "ExternalId",
|
|
84
84
|
},
|
|
85
|
+
"course_enrollment": {
|
|
86
|
+
"module": "common.djangoapps.student.models",
|
|
87
|
+
"model": "CourseEnrollment",
|
|
88
|
+
},
|
|
85
89
|
"custom_course_edx": {
|
|
86
90
|
"module": "lms.djangoapps.ccx.models",
|
|
87
91
|
"model": "CustomCourseForEdX",
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/signals.py
RENAMED
|
@@ -7,6 +7,7 @@ from django.db.models.signals import post_save
|
|
|
7
7
|
from django.dispatch import Signal, receiver
|
|
8
8
|
|
|
9
9
|
from platform_plugin_aspects.sinks import (
|
|
10
|
+
CourseEnrollmentSink,
|
|
10
11
|
ExternalIdSink,
|
|
11
12
|
UserProfileSink,
|
|
12
13
|
UserRetirementSink,
|
|
@@ -34,6 +35,31 @@ def receive_course_publish( # pylint: disable=unused-argument # pragma: no cov
|
|
|
34
35
|
dump_course_to_clickhouse.delay(str(course_key))
|
|
35
36
|
|
|
36
37
|
|
|
38
|
+
def receive_course_enrollment_changed( # pylint: disable=unused-argument # pragma: no cover
|
|
39
|
+
sender, **kwargs
|
|
40
|
+
):
|
|
41
|
+
"""
|
|
42
|
+
Receives ENROLL_STATUS_CHANGE signal and queues the dump job.
|
|
43
|
+
"""
|
|
44
|
+
from platform_plugin_aspects.tasks import ( # pylint: disable=import-outside-toplevel
|
|
45
|
+
dump_data_to_clickhouse,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
user = kwargs.get("user")
|
|
49
|
+
course_id = kwargs.get("course_id")
|
|
50
|
+
|
|
51
|
+
CourseEnrollment = get_model("course_enrollment")
|
|
52
|
+
instance = CourseEnrollment.objects.get(user=user, course_id=course_id)
|
|
53
|
+
|
|
54
|
+
sink = CourseEnrollmentSink(None, None)
|
|
55
|
+
|
|
56
|
+
dump_data_to_clickhouse.delay(
|
|
57
|
+
sink_module=sink.__module__,
|
|
58
|
+
sink_name=sink.__class__.__name__,
|
|
59
|
+
object_id=instance.id,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
37
63
|
def on_user_profile_updated(instance):
|
|
38
64
|
"""
|
|
39
65
|
Queues the UserProfile dump job when the parent transaction is committed.
|
|
@@ -3,6 +3,7 @@ This module contains the sinks for the platform plugin aspects.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from .base_sink import BaseSink, ModelBaseSink
|
|
6
|
+
from .course_enrollment_sink import CourseEnrollmentSink
|
|
6
7
|
from .course_overview_sink import CourseOverviewSink, XBlockSink
|
|
7
8
|
from .external_id_sink import ExternalIdSink
|
|
8
9
|
from .user_profile_sink import UserProfileSink
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""User profile sink"""
|
|
2
|
+
|
|
3
|
+
from platform_plugin_aspects.sinks.base_sink import ModelBaseSink
|
|
4
|
+
from platform_plugin_aspects.sinks.serializers import CourseEnrollmentSerializer
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CourseEnrollmentSink(ModelBaseSink): # pylint: disable=abstract-method
|
|
8
|
+
"""
|
|
9
|
+
Sink for user CourseEnrollment model
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
model = "course_enrollment"
|
|
13
|
+
unique_key = "id"
|
|
14
|
+
clickhouse_table_name = "course_enrollment"
|
|
15
|
+
timestamp_field = "time_last_dumped"
|
|
16
|
+
name = "Course Enrollment"
|
|
17
|
+
serializer_class = CourseEnrollmentSerializer
|
|
18
|
+
|
|
19
|
+
def get_queryset(self, start_pk=None):
|
|
20
|
+
return super().get_queryset(start_pk).select_related("user")
|
|
@@ -184,6 +184,9 @@ class XBlockSink(ModelBaseSink):
|
|
|
184
184
|
"location": str(XBlockSink.strip_branch_and_version(item.location)),
|
|
185
185
|
"display_name": item.display_name_with_default.replace("'", "'"),
|
|
186
186
|
"xblock_data_json": json_data,
|
|
187
|
+
# We need to add this here so the key will be in the right place
|
|
188
|
+
# in the generated csv
|
|
189
|
+
"order": -1,
|
|
187
190
|
"edited_on": str(getattr(item, "edited_on", "")),
|
|
188
191
|
"dump_id": dump_id,
|
|
189
192
|
"time_last_dumped": time_last_dumped,
|
|
@@ -179,3 +179,30 @@ class CourseOverviewSerializer(BaseSinkSerializer, serializers.ModelSerializer):
|
|
|
179
179
|
def get_course_key(self, overview):
|
|
180
180
|
"""Return the course key as a string."""
|
|
181
181
|
return str(overview.id)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
class CourseEnrollmentSerializer(BaseSinkSerializer, serializers.ModelSerializer):
|
|
185
|
+
"""Serializer for the Course Enrollment model."""
|
|
186
|
+
|
|
187
|
+
course_key = serializers.SerializerMethodField()
|
|
188
|
+
username = serializers.CharField(source="user.username")
|
|
189
|
+
|
|
190
|
+
class Meta:
|
|
191
|
+
"""Meta class for the CourseEnrollmentSerializer"""
|
|
192
|
+
|
|
193
|
+
model = get_model("course_enrollment")
|
|
194
|
+
fields = [
|
|
195
|
+
"id",
|
|
196
|
+
"course_key",
|
|
197
|
+
"created",
|
|
198
|
+
"is_active",
|
|
199
|
+
"mode",
|
|
200
|
+
"username",
|
|
201
|
+
"user_id",
|
|
202
|
+
"dump_id",
|
|
203
|
+
"time_last_dumped",
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
def get_course_key(self, obj):
|
|
207
|
+
"""Return the course key as a string."""
|
|
208
|
+
return str(obj.course_id)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Aspects plugins for edx-platform
|
|
5
5
|
Home-page: https://github.com/openedx/platform-plugin-aspects
|
|
6
6
|
Author: Open edX Project
|
|
@@ -58,6 +58,8 @@ Available Sinks
|
|
|
58
58
|
model and stores the user profile data in ClickHouse.
|
|
59
59
|
- `UserRetirementSink` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
|
|
60
60
|
remove the user PII information from ClickHouse.
|
|
61
|
+
- `CourseEnrollmentSink` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
|
|
62
|
+
the course enrollment data.
|
|
61
63
|
|
|
62
64
|
Commands
|
|
63
65
|
========
|
|
@@ -276,6 +278,23 @@ Change Log
|
|
|
276
278
|
Unreleased
|
|
277
279
|
**********
|
|
278
280
|
|
|
281
|
+
0.10.0 - 2024-06-17
|
|
282
|
+
*******************
|
|
283
|
+
|
|
284
|
+
Added
|
|
285
|
+
=====
|
|
286
|
+
|
|
287
|
+
* A sink for the course enrollment model.
|
|
288
|
+
|
|
289
|
+
0.9.7 - 2024-06-14
|
|
290
|
+
******************
|
|
291
|
+
|
|
292
|
+
Fixes
|
|
293
|
+
=====
|
|
294
|
+
|
|
295
|
+
* 0.9.6 introduced a bug in the CourseOverview sink that caused block sink to fail to import to ClickHouse, this fixes it.
|
|
296
|
+
|
|
297
|
+
|
|
279
298
|
0.9.6 - 2024-06-07
|
|
280
299
|
******************
|
|
281
300
|
|
|
@@ -32,6 +32,7 @@ platform_plugin_aspects/settings/common.py
|
|
|
32
32
|
platform_plugin_aspects/settings/production.py
|
|
33
33
|
platform_plugin_aspects/sinks/__init__.py
|
|
34
34
|
platform_plugin_aspects/sinks/base_sink.py
|
|
35
|
+
platform_plugin_aspects/sinks/course_enrollment_sink.py
|
|
35
36
|
platform_plugin_aspects/sinks/course_overview_sink.py
|
|
36
37
|
platform_plugin_aspects/sinks/external_id_sink.py
|
|
37
38
|
platform_plugin_aspects/sinks/serializers.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/urls.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/utils.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/views.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/waffle.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/platform_plugin_aspects/xblock.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-0.9.6 → platform_plugin_aspects-0.10.0}/requirements/constraints.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|