platform-plugin-aspects 0.7.4__tar.gz → 0.9.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.7.4 → platform_plugin_aspects-0.9.0}/CHANGELOG.rst +16 -1
- {platform_plugin_aspects-0.7.4/platform_plugin_aspects.egg-info → platform_plugin_aspects-0.9.0}/PKG-INFO +17 -2
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/__init__.py +1 -1
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/settings/common.py +21 -3
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/course_overview_sink.py +8 -1
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/serializers.py +2 -1
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/html/superset.html +1 -1
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/utils.py +44 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0/platform_plugin_aspects.egg-info}/PKG-INFO +17 -2
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/LICENSE +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/MANIFEST.in +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/README.rst +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/apps.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/extensions/__init__.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/extensions/filters.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/management/__init__.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/management/commands/__init__.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/management/commands/dump_data_to_clickhouse.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/management/commands/load_test_tracking_events.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/settings/__init__.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/settings/production.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/signals.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/__init__.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/base_sink.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/external_id_sink.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/user_profile_sink.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/sinks/user_retire_sink.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/css/superset.css +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/html/superset_student.html +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/js/embed_dashboard.js +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/js/install_required.js +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/static/js/superset.js +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/tasks.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/templates/instructor_dashboard/aspects.html +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/urls.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/views.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/waffle.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/xblock.py +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/SOURCES.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/dependency_links.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/entry_points.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/not-zip-safe +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/requires.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects.egg-info/top_level.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/requirements/base.in +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/requirements/constraints.txt +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/setup.cfg +0 -0
- {platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/setup.py +0 -0
|
@@ -14,7 +14,22 @@ Change Log
|
|
|
14
14
|
Unreleased
|
|
15
15
|
**********
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
0.9.0 - 2024-05-06
|
|
18
|
+
******************
|
|
19
|
+
|
|
20
|
+
Added
|
|
21
|
+
=====
|
|
22
|
+
|
|
23
|
+
* Allow embedded dashboard tab names to be localized
|
|
24
|
+
|
|
25
|
+
0.8.0 - 2024-05-06
|
|
26
|
+
******************
|
|
27
|
+
|
|
28
|
+
Added
|
|
29
|
+
=====
|
|
30
|
+
|
|
31
|
+
* Added tags to xblocks in course dump
|
|
32
|
+
|
|
18
33
|
|
|
19
34
|
0.7.4 - 2024-04-30
|
|
20
35
|
******************
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.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
|
|
@@ -276,7 +276,22 @@ Change Log
|
|
|
276
276
|
Unreleased
|
|
277
277
|
**********
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
0.9.0 - 2024-05-06
|
|
280
|
+
******************
|
|
281
|
+
|
|
282
|
+
Added
|
|
283
|
+
=====
|
|
284
|
+
|
|
285
|
+
* Allow embedded dashboard tab names to be localized
|
|
286
|
+
|
|
287
|
+
0.8.0 - 2024-05-06
|
|
288
|
+
******************
|
|
289
|
+
|
|
290
|
+
Added
|
|
291
|
+
=====
|
|
292
|
+
|
|
293
|
+
* Added tags to xblocks in course dump
|
|
294
|
+
|
|
280
295
|
|
|
281
296
|
0.7.4 - 2024-04-30
|
|
282
297
|
******************
|
|
@@ -9,6 +9,12 @@ https://docs.djangoproject.com/en/2.22/ref/settings/
|
|
|
9
9
|
from platform_plugin_aspects import ROOT_DIRECTORY
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
# Make '_' a no-op so we can scrape strings for translation, because
|
|
13
|
+
# `django.utils.translation.ugettext_noop` cannot be imported in this file
|
|
14
|
+
def _(text):
|
|
15
|
+
return text
|
|
16
|
+
|
|
17
|
+
|
|
12
18
|
def plugin_settings(settings):
|
|
13
19
|
"""
|
|
14
20
|
Set of plugin settings used by the Open Edx platform.
|
|
@@ -22,9 +28,21 @@ def plugin_settings(settings):
|
|
|
22
28
|
}
|
|
23
29
|
settings.ASPECTS_INSTRUCTOR_DASHBOARDS = [
|
|
24
30
|
{
|
|
25
|
-
"name": "
|
|
26
|
-
"slug": "
|
|
27
|
-
"uuid": "
|
|
31
|
+
"name": _("Course Dashboard"),
|
|
32
|
+
"slug": "course-dashboard-v1",
|
|
33
|
+
"uuid": "c0e64194-33d1-4d5a-8c10-4f51530c5ee9",
|
|
34
|
+
"allow_translations": True,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": _("Individual Learner Dashboard"),
|
|
38
|
+
"slug": "individual-learner",
|
|
39
|
+
"uuid": "abae8a25-1ba4-4653-81bd-d3937a162a11",
|
|
40
|
+
"allow_translations": True,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": _("At-Risk Learners Dashboard"),
|
|
44
|
+
"slug": "learner-groups",
|
|
45
|
+
"uuid": "8661d20c-cee6-4245-9fcc-610daea5fd24",
|
|
28
46
|
"allow_translations": True,
|
|
29
47
|
},
|
|
30
48
|
]
|
|
@@ -17,7 +17,11 @@ from opaque_keys.edx.keys import CourseKey
|
|
|
17
17
|
|
|
18
18
|
from platform_plugin_aspects.sinks.base_sink import ModelBaseSink
|
|
19
19
|
from platform_plugin_aspects.sinks.serializers import CourseOverviewSerializer
|
|
20
|
-
from platform_plugin_aspects.utils import
|
|
20
|
+
from platform_plugin_aspects.utils import (
|
|
21
|
+
get_detached_xblock_types,
|
|
22
|
+
get_modulestore,
|
|
23
|
+
get_tags_for_block,
|
|
24
|
+
)
|
|
21
25
|
|
|
22
26
|
# Defaults we want to ensure we fail early on bulk inserts
|
|
23
27
|
CLICKHOUSE_BULK_INSERT_PARAMS = {
|
|
@@ -86,6 +90,9 @@ class XBlockSink(ModelBaseSink):
|
|
|
86
90
|
fields["xblock_data_json"]["section"] = section_idx
|
|
87
91
|
fields["xblock_data_json"]["subsection"] = subsection_idx
|
|
88
92
|
fields["xblock_data_json"]["unit"] = unit_idx
|
|
93
|
+
fields["xblock_data_json"]["tags"] = get_tags_for_block(
|
|
94
|
+
fields["location"],
|
|
95
|
+
)
|
|
89
96
|
|
|
90
97
|
fields["xblock_data_json"] = json.dumps(fields["xblock_data_json"])
|
|
91
98
|
location_to_node[XBlockSink.strip_branch_and_version(block.location)] = (
|
|
@@ -6,7 +6,7 @@ import uuid
|
|
|
6
6
|
from django.utils import timezone
|
|
7
7
|
from rest_framework import serializers
|
|
8
8
|
|
|
9
|
-
from platform_plugin_aspects.utils import get_model
|
|
9
|
+
from platform_plugin_aspects.utils import get_model, get_tags_for_block
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class BaseSinkSerializer(serializers.Serializer): # pylint: disable=abstract-method
|
|
@@ -146,6 +146,7 @@ class CourseOverviewSerializer(BaseSinkSerializer, serializers.ModelSerializer):
|
|
|
146
146
|
"entrance_exam_enabled": getattr(overview, "entrance_exam_enabled", ""),
|
|
147
147
|
"external_id": getattr(overview, "external_id", ""),
|
|
148
148
|
"language": getattr(overview, "language", ""),
|
|
149
|
+
"tags": get_tags_for_block(overview.id),
|
|
149
150
|
}
|
|
150
151
|
return json.dumps(json_fields)
|
|
151
152
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{% else %}
|
|
22
22
|
<input type="radio" id="tab-{{forloop.counter}}" name="tab-group-1" />
|
|
23
23
|
{% endif %}
|
|
24
|
-
<label for="tab-{{forloop.counter}}">{
|
|
24
|
+
<label for="tab-{{forloop.counter}}">{% trans dashboard.name %}</label>
|
|
25
25
|
<div class="aspects-content superset-embedded-container" id="superset-embedded-container-{{dashboard.uuid}}"></div>
|
|
26
26
|
</div>
|
|
27
27
|
{% endfor %}
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/utils.py
RENAMED
|
@@ -278,3 +278,47 @@ def get_localized_uuid(base_uuid, language):
|
|
|
278
278
|
base_namespace = uuid.uuid5(base_uuid, "superset")
|
|
279
279
|
normalized_language = language.lower().replace("-", "_")
|
|
280
280
|
return str(uuid.uuid5(base_namespace, normalized_language))
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def _get_object_tags(usage_key): # pragma: no cover
|
|
284
|
+
"""
|
|
285
|
+
Wrap the Open edX tagging API method get_object_tags.
|
|
286
|
+
"""
|
|
287
|
+
try:
|
|
288
|
+
# pylint: disable=import-outside-toplevel
|
|
289
|
+
from openedx.core.djangoapps.content_tagging.api import get_object_tags
|
|
290
|
+
|
|
291
|
+
return get_object_tags(object_id=str(usage_key))
|
|
292
|
+
# Pre-Redwood versions of Open edX don't have this API
|
|
293
|
+
except ImportError:
|
|
294
|
+
return {}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def get_tags_for_block(usage_key) -> dict:
|
|
298
|
+
"""
|
|
299
|
+
Return all the tags (and their parent tags) applied to the given block.
|
|
300
|
+
|
|
301
|
+
Returns a dict of [taxonomy]: [tag, tag, tag]
|
|
302
|
+
"""
|
|
303
|
+
tags = _get_object_tags(usage_key)
|
|
304
|
+
serialized_tags = {}
|
|
305
|
+
|
|
306
|
+
for explicit_tag in tags:
|
|
307
|
+
_add_tag(explicit_tag, serialized_tags)
|
|
308
|
+
implicit_tag = explicit_tag.tag.parent
|
|
309
|
+
|
|
310
|
+
while implicit_tag:
|
|
311
|
+
_add_tag(implicit_tag, serialized_tags)
|
|
312
|
+
implicit_tag = implicit_tag.parent
|
|
313
|
+
|
|
314
|
+
return serialized_tags
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def _add_tag(tag, serialized_tags):
|
|
318
|
+
"""
|
|
319
|
+
Add a tag to our serialized list of tags.
|
|
320
|
+
"""
|
|
321
|
+
if tag.taxonomy.name not in serialized_tags:
|
|
322
|
+
serialized_tags[tag.taxonomy.name] = [tag.value]
|
|
323
|
+
else:
|
|
324
|
+
serialized_tags[tag.taxonomy.name].append(tag.value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: platform-plugin-aspects
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.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
|
|
@@ -276,7 +276,22 @@ Change Log
|
|
|
276
276
|
Unreleased
|
|
277
277
|
**********
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
0.9.0 - 2024-05-06
|
|
280
|
+
******************
|
|
281
|
+
|
|
282
|
+
Added
|
|
283
|
+
=====
|
|
284
|
+
|
|
285
|
+
* Allow embedded dashboard tab names to be localized
|
|
286
|
+
|
|
287
|
+
0.8.0 - 2024-05-06
|
|
288
|
+
******************
|
|
289
|
+
|
|
290
|
+
Added
|
|
291
|
+
=====
|
|
292
|
+
|
|
293
|
+
* Added tags to xblocks in course dump
|
|
294
|
+
|
|
280
295
|
|
|
281
296
|
0.7.4 - 2024-04-30
|
|
282
297
|
******************
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.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-0.7.4 → platform_plugin_aspects-0.9.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
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/tasks.py
RENAMED
|
File without changes
|
|
File without changes
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/urls.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/views.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.0}/platform_plugin_aspects/waffle.py
RENAMED
|
File without changes
|
{platform_plugin_aspects-0.7.4 → platform_plugin_aspects-0.9.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-0.7.4 → platform_plugin_aspects-0.9.0}/requirements/constraints.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|