platform-plugin-aspects 1.2.0__tar.gz → 1.3.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-1.2.0/platform_plugin_aspects.egg-info → platform_plugin_aspects-1.3.0}/PKG-INFO +16 -1
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/README.rst +15 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/__init__.py +1 -1
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/extensions/filters.py +29 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/urls.py +5 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/views.py +61 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0/platform_plugin_aspects.egg-info}/PKG-INFO +16 -1
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/LICENSE +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/MANIFEST.in +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/apps.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/extensions/__init__.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/management/__init__.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/management/commands/__init__.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/management/commands/dump_data_to_clickhouse.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/management/commands/load_test_tracking_events.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/settings/__init__.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/settings/common.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/settings/production.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/signals.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/__init__.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/base_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/course_enrollment_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/course_overview_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/external_id_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/serializers.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/tag_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/user_profile_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/sinks/user_retire_sink.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/css/superset.css +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/html/superset.html +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/html/superset_student.html +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/js/embed_dashboard.js +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/js/install_required.js +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/static/js/superset.js +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/tasks.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/templates/instructor_dashboard/aspects.html +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/utils.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/waffle.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/xblock.py +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/SOURCES.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/dependency_links.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/entry_points.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/not-zip-safe +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/requires.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects.egg-info/top_level.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/requirements/base.in +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/requirements/constraints.txt +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/setup.cfg +0 -0
- {platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.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
|
|
@@ -176,6 +176,8 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
|
|
|
176
176
|
the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
|
|
177
177
|
superset pipeline into the filter as follows:
|
|
178
178
|
|
|
179
|
+
for legacy instructor dashboard:
|
|
180
|
+
|
|
179
181
|
.. code-block:: python
|
|
180
182
|
|
|
181
183
|
OPEN_EDX_FILTERS_CONFIG = {
|
|
@@ -187,6 +189,19 @@ superset pipeline into the filter as follows:
|
|
|
187
189
|
},
|
|
188
190
|
}
|
|
189
191
|
|
|
192
|
+
for new instructor dashboard:
|
|
193
|
+
|
|
194
|
+
.. code-block:: python
|
|
195
|
+
|
|
196
|
+
OPEN_EDX_FILTERS_CONFIG = {
|
|
197
|
+
"org.openedx.learning.instructor.dashboard.tabs.requested.v1": {
|
|
198
|
+
"fail_silently": False,
|
|
199
|
+
"pipeline": [
|
|
200
|
+
"platform_plugin_superset.extensions.filters.AddSupersetTabToInstructorDashboard",
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
}
|
|
204
|
+
|
|
190
205
|
- ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
|
|
191
206
|
The configuration is a dictionary that contains the following keys:
|
|
192
207
|
|
|
@@ -129,6 +129,8 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
|
|
|
129
129
|
the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
|
|
130
130
|
superset pipeline into the filter as follows:
|
|
131
131
|
|
|
132
|
+
for legacy instructor dashboard:
|
|
133
|
+
|
|
132
134
|
.. code-block:: python
|
|
133
135
|
|
|
134
136
|
OPEN_EDX_FILTERS_CONFIG = {
|
|
@@ -140,6 +142,19 @@ superset pipeline into the filter as follows:
|
|
|
140
142
|
},
|
|
141
143
|
}
|
|
142
144
|
|
|
145
|
+
for new instructor dashboard:
|
|
146
|
+
|
|
147
|
+
.. code-block:: python
|
|
148
|
+
|
|
149
|
+
OPEN_EDX_FILTERS_CONFIG = {
|
|
150
|
+
"org.openedx.learning.instructor.dashboard.tabs.requested.v1": {
|
|
151
|
+
"fail_silently": False,
|
|
152
|
+
"pipeline": [
|
|
153
|
+
"platform_plugin_superset.extensions.filters.AddSupersetTabToInstructorDashboard",
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
}
|
|
157
|
+
|
|
143
158
|
- ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
|
|
144
159
|
The configuration is a dictionary that contains the following keys:
|
|
145
160
|
|
|
@@ -77,3 +77,32 @@ class AddSupersetTab(PipelineStep):
|
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
return data
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class AddSupersetTabToInstructorDashboard(PipelineStep):
|
|
83
|
+
"""
|
|
84
|
+
Add superset tab to instructor dashboard app.
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
def run_filter(
|
|
88
|
+
self, tabs, user, course_key
|
|
89
|
+
): # pylint: disable=arguments-differ, unused-argument
|
|
90
|
+
"""Execute filter that modifies the instructor dashboard context.
|
|
91
|
+
Args:
|
|
92
|
+
tabs (list): the list of tabs for the instructor dashboard.
|
|
93
|
+
user (User): the current user.
|
|
94
|
+
course_key (str): the course key.
|
|
95
|
+
"""
|
|
96
|
+
modified_tabs = tabs.copy()
|
|
97
|
+
tab_id = "aspects"
|
|
98
|
+
course_id = str(course_key)
|
|
99
|
+
|
|
100
|
+
custom_tab = {
|
|
101
|
+
"tab_id": tab_id,
|
|
102
|
+
"title": _("Reports"),
|
|
103
|
+
"url": f"/instructor-dashboard/{course_id}/{tab_id}/",
|
|
104
|
+
"sort_order": 120,
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
modified_tabs.append(custom_tab)
|
|
108
|
+
return {"tabs": modified_tabs}
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/urls.py
RENAMED
|
@@ -25,6 +25,11 @@ app_url_patterns = (
|
|
|
25
25
|
views.SupersetInContextDashboardView.as_view(),
|
|
26
26
|
name="superset_in_context_dashboard",
|
|
27
27
|
),
|
|
28
|
+
re_path(
|
|
29
|
+
rf"superset_instructor_dashboard/{COURSE_ID_PATTERN}/?$",
|
|
30
|
+
views.SupersetInstructorDashboardView.as_view(),
|
|
31
|
+
name="superset_instructor_dashboard",
|
|
32
|
+
),
|
|
28
33
|
],
|
|
29
34
|
"platform_plugin_aspects",
|
|
30
35
|
)
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/views.py
RENAMED
|
@@ -20,6 +20,7 @@ from .utils import (
|
|
|
20
20
|
_,
|
|
21
21
|
build_filter,
|
|
22
22
|
generate_guest_token,
|
|
23
|
+
generate_superset_context,
|
|
23
24
|
get_localized_uuid,
|
|
24
25
|
get_model,
|
|
25
26
|
get_user_dashboard_locale,
|
|
@@ -248,3 +249,63 @@ class SupersetInContextDashboardView(GenericAPIView):
|
|
|
248
249
|
"defaultCourseRun": course_key.run,
|
|
249
250
|
}
|
|
250
251
|
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class SupersetInstructorDashboardView(GenericAPIView):
|
|
255
|
+
"""
|
|
256
|
+
Endpoint for instructor dashboard Superset configuration.
|
|
257
|
+
|
|
258
|
+
Returns the Superset context needed by the frontend app to embed
|
|
259
|
+
the instructor dashboards, including dashboard list, URLs, and
|
|
260
|
+
display settings.
|
|
261
|
+
"""
|
|
262
|
+
|
|
263
|
+
authentication_classes = (SessionAuthentication,)
|
|
264
|
+
permission_classes = (
|
|
265
|
+
permissions.IsAuthenticated,
|
|
266
|
+
IsStaffOrReadOnly | IsCourseStaffInstructor,
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
lookup_field = "course_id"
|
|
270
|
+
|
|
271
|
+
def get_object(self):
|
|
272
|
+
"""
|
|
273
|
+
Return a CourseKey for the requested course_id.
|
|
274
|
+
"""
|
|
275
|
+
course_id = self.kwargs.get(self.lookup_field, "")
|
|
276
|
+
try:
|
|
277
|
+
course_key = CourseKey.from_string(course_id)
|
|
278
|
+
except InvalidKeyError as exc:
|
|
279
|
+
raise NotFound(
|
|
280
|
+
_("Invalid course id: '{course_id}'").format(course_id=course_id)
|
|
281
|
+
) from exc
|
|
282
|
+
|
|
283
|
+
course = _get_course(course_key)
|
|
284
|
+
|
|
285
|
+
# May raise a permission denied
|
|
286
|
+
self.check_object_permissions(self.request, course)
|
|
287
|
+
|
|
288
|
+
return course_key
|
|
289
|
+
|
|
290
|
+
def get(self, request, *args, **kwargs):
|
|
291
|
+
"""
|
|
292
|
+
Return Superset context for embedding the instructor dashboards.
|
|
293
|
+
"""
|
|
294
|
+
course_key = self.get_object()
|
|
295
|
+
|
|
296
|
+
language = get_user_dashboard_locale(request.user)
|
|
297
|
+
context = {"course_id": str(course_key)}
|
|
298
|
+
context = generate_superset_context(
|
|
299
|
+
context,
|
|
300
|
+
dashboards=settings.ASPECTS_INSTRUCTOR_DASHBOARDS,
|
|
301
|
+
language=language,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
return Response(
|
|
305
|
+
{
|
|
306
|
+
"superset_dashboards": context["superset_dashboards"],
|
|
307
|
+
"superset_url": context["superset_url"],
|
|
308
|
+
"superset_guest_token_url": context["superset_guest_token_url"],
|
|
309
|
+
"show_dashboard_link": settings.SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK,
|
|
310
|
+
}
|
|
311
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.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
|
|
@@ -176,6 +176,8 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
|
|
|
176
176
|
the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
|
|
177
177
|
superset pipeline into the filter as follows:
|
|
178
178
|
|
|
179
|
+
for legacy instructor dashboard:
|
|
180
|
+
|
|
179
181
|
.. code-block:: python
|
|
180
182
|
|
|
181
183
|
OPEN_EDX_FILTERS_CONFIG = {
|
|
@@ -187,6 +189,19 @@ superset pipeline into the filter as follows:
|
|
|
187
189
|
},
|
|
188
190
|
}
|
|
189
191
|
|
|
192
|
+
for new instructor dashboard:
|
|
193
|
+
|
|
194
|
+
.. code-block:: python
|
|
195
|
+
|
|
196
|
+
OPEN_EDX_FILTERS_CONFIG = {
|
|
197
|
+
"org.openedx.learning.instructor.dashboard.tabs.requested.v1": {
|
|
198
|
+
"fail_silently": False,
|
|
199
|
+
"pipeline": [
|
|
200
|
+
"platform_plugin_superset.extensions.filters.AddSupersetTabToInstructorDashboard",
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
}
|
|
204
|
+
|
|
190
205
|
- ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
|
|
191
206
|
The configuration is a dictionary that contains the following keys:
|
|
192
207
|
|
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/apps.py
RENAMED
|
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-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/signals.py
RENAMED
|
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-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/utils.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/platform_plugin_aspects/waffle.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.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
|
|
File without changes
|
{platform_plugin_aspects-1.2.0 → platform_plugin_aspects-1.3.0}/requirements/constraints.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|