Skip to content

Commit

Permalink
fix: ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN config
Browse files Browse the repository at this point in the history
* changed default to True
* avoid overwriting existing OPEN_EDX_FILTERS_CONFIG
  • Loading branch information
pomegranited committed Mar 12, 2024
1 parent 082a6c4 commit 1d8bec1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions tutoraspects/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_PII_MODELS }}
ASPECTS_INSTRUCTOR_DASHBOARD_UUID = "{{ ASPECTS_INSTRUCTOR_DASHBOARD_UUID }}"
SUPERSET_EXTRA_FILTERS_FORMAT = {{ ASPECTS_SUPERSET_EXTRA_FILTERS_FORMAT }}
{% if ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN %}
OPEN_EDX_FILTERS_CONFIG = {
"org.openedx.learning.instructor.dashboard.render.started.v1": {
"fail_silently": False,
"pipeline": [
"platform_plugin_aspects.extensions.filters.AddSupersetTab",
]
},
}
try:
not OPEN_EDX_FILTERS_CONFIG
except NameError: # OPEN_EDX_FILTERS_CONFIG is not defined
OPEN_EDX_FILTERS_CONFIG = {}
if not OPEN_EDX_FILTERS_CONFIG.get("org.openedx.learning.instructor.dashboard.render.started.v1"):
OPEN_EDX_FILTERS_CONFIG["org.openedx.learning.instructor.dashboard.render.started.v1"] = {
"fail_silently": False,
"pipeline": [],
}
OPEN_EDX_FILTERS_CONFIG["org.openedx.learning.instructor.dashboard.render.started.v1"]["pipeline"].append("platform_plugin_aspects.extensions.filters.AddSupersetTab")
{% endif %}
2 changes: 1 addition & 1 deletion tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"reference/operator_reports.html)\\n"
"* [Superset Resources](https://github.com/apache/superset#resources)\\n",
),
("ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN", False),
("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"),
("ASPECTS_SUPERSET_EXTRA_FILTERS_FORMAT", []),
Expand Down

0 comments on commit 1d8bec1

Please sign in to comment.