Skip to content

Commit

Permalink
Merge pull request #666 from openedx/cag/multiple-dashboards
Browse files Browse the repository at this point in the history
chore: upgrade platform-plugin-aspects to v0.4.0
  • Loading branch information
Cristhian Garcia authored Mar 20, 2024
2 parents 85508c1 + ae0a990 commit 4f74b27
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tutoraspects/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SUPERSET_CONFIG = {
}
EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_PII_MODELS }}

ASPECTS_INSTRUCTOR_DASHBOARD_UUID = "{{ ASPECTS_INSTRUCTOR_DASHBOARD_UUID }}"
ASPECTS_INSTRUCTOR_DASHBOARDS = {{ ASPECTS_INSTRUCTOR_DASHBOARDS }}
SUPERSET_EXTRA_FILTERS_FORMAT = {{ ASPECTS_SUPERSET_EXTRA_FILTERS_FORMAT }}
{% if ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN %}
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "platform-plugin-aspects==0.3.1"
pip install "platform-plugin-aspects==0.4.0"
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \
pip install "edx-event-routing-backends==v8.1.1"
53 changes: 39 additions & 14 deletions tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,52 @@
# Newlines and double-quotes must be escaped.
(
"ASPECTS_INSTRUCTOR_HELP_MARKDOWN",
"## Help\\n"
"## Help<br>"
"* [Aspects Reference](https://docs.openedx.org/projects/openedx-aspects/page/"
"reference/instructor_reports.html)\\n"
"* [Superset Resources](https://github.com/apache/superset#resources)\\n",
"reference/instructor_reports.html)<br>"
"* [Superset Resources](https://github.com/apache/superset#resources)<br>",
),
(
"ASPECTS_OPERATOR_HELP_MARKDOWN",
"## Help\\n"
"## Help<br>"
"* [Aspects Reference](https://docs.openedx.org/projects/openedx-aspects/page/"
"reference/operator_reports.html)\\n"
"* [Superset Resources](https://github.com/apache/superset#resources)\\n",
"reference/operator_reports.html)<br>"
"* [Superset Resources](https://github.com/apache/superset#resources)<br>",
),
("ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN", True),
# Use the base Instructor Dashboard uuid by default. TODO use locale
("ASPECTS_INSTRUCTOR_DASHBOARD_UUID", "1d6bf904-f53f-47fd-b1c9-6cd7e284d286"),
# The following settings are used to configure the Superset dashboards
# in the LMS Instructor Dashboard.
(
"ASPECTS_INSTRUCTOR_DASHBOARDS",
[
{
"name": "Instructor Dashboard",
"slug": "instructor-dashboard",
"uuid": "1d6bf904-f53f-47fd-b1c9-6cd7e284d286",
},
{
"name": "Learner Groups Dashboard",
"slug": "learner-groups",
"uuid": "8661d20c-cee6-4245-9fcc-610daea5fd24",
},
{
"name": "Individual Learner Dashboard",
"slug": "individual-learner",
"uuid": "abae8a25-1ba4-4653-81bd-d3937a162a11",
},
],
),
# The following settings are used to configure the Superset dashboards
# that can be embedded. Keeping separate settings as these may not be
# directly used in the LMS Instructor Dashboard.
(
"SUPERSET_EMBEDDABLE_DASHBOARDS",
{
"instructor-dashboard": "1d6bf904-f53f-47fd-b1c9-6cd7e284d286",
"learner-groups": "8661d20c-cee6-4245-9fcc-610daea5fd24",
"individual-learner": "abae8a25-1ba4-4653-81bd-d3937a162a11",
},
),
("ASPECTS_SUPERSET_EXTRA_FILTERS_FORMAT", []),
# ClickHouse xAPI settings
("ASPECTS_XAPI_DATABASE", "xapi"),
Expand Down Expand Up @@ -235,12 +266,6 @@
"student": "Student",
},
),
(
"SUPERSET_EMBEDDABLE_DASHBOARDS",
{
"instructor-dashboard": "1d6bf904-f53f-47fd-b1c9-6cd7e284d286",
},
),
("SUPERSET_ADMIN_EMAIL", "[email protected]"),
("SUPERSET_LMS_EMAIL", "superset/[email protected]"),
("SUPERSET_OWNERS", []),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
_file_name: Individual_Learner_Reports.yaml
_roles:
- '{{ SUPERSET_ROLES_MAPPING.instructor }}'
css: ''
dashboard_title: Individual Learner Reports
description: null
metadata:
chart_configuration: {}
color_scheme: ''
color_scheme_domain: []
cross_filters_enabled: true
default_filters: '{}'
expanded_slices: {}
global_chart_configuration:
chartsInScope: []
scope:
excluded: []
rootPath:
- ROOT_ID
label_colors: {}
refresh_frequency: 0
shared_label_colors: {}
timed_refresh_immune_slices: []
position:
DASHBOARD_VERSION_KEY: v2
GRID_ID:
children: []
id: GRID_ID
parents:
- ROOT_ID
type: GRID
HEADER_ID:
id: HEADER_ID
meta:
text: Individual Learner Dashboard
type: HEADER
ROOT_ID:
children:
- GRID_ID
id: ROOT_ID
type: ROOT
slug: individual-learner
uuid: abae8a25-1ba4-4653-81bd-d3937a162a11
version: 1.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
_file_name: Learner_Groups_Reports.yaml
_roles:
- '{{ SUPERSET_ROLES_MAPPING.instructor }}'
css: ''
dashboard_title: Learner Groups Reports
description: null
metadata:
chart_configuration: {}
color_scheme: ''
color_scheme_domain: []
cross_filters_enabled: true
default_filters: '{}'
expanded_slices: {}
global_chart_configuration:
chartsInScope: []
scope:
excluded: []
rootPath:
- ROOT_ID
label_colors: {}
refresh_frequency: 0
shared_label_colors: {}
timed_refresh_immune_slices: []
position:
DASHBOARD_VERSION_KEY: v2
GRID_ID:
children: []
id: GRID_ID
parents:
- ROOT_ID
type: GRID
HEADER_ID:
id: HEADER_ID
meta:
text: Learner group dashboard
type: HEADER
ROOT_ID:
children:
- GRID_ID
id: ROOT_ID
type: ROOT
slug: learner-groups
uuid: 8661d20c-cee6-4245-9fcc-610daea5fd24
version: 1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,10 @@ position:
- TAB-EygpebMa1
- TAB-gvqU89mvT
- TAB-z7LunkNp63
# {% if ASPECTS_OPERATOR_HELP_MARKDOWN %}
- TAB-RtC9PHwXy
# {% endif %}
- TAB-nXpinnLEX
id: TABS-7nA6MwltSD
meta: {}
parents:
Expand Down

0 comments on commit 4f74b27

Please sign in to comment.