From 22bf0421c8222173e1720f0459958a16351a2138 Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Wed, 15 May 2024 14:24:03 -0400 Subject: [PATCH 1/4] fix: Performance enhancements for at-risk dashboards --- .../assets/datasets/dim_at_risk_learners.yaml | 3 +- .../assets/datasets/enrollment_status.yaml | 2 +- .../queries/dim_at_risk_learners.sql | 30 +++++ .../fact_at_risk_pageview_engagement.sql | 4 +- .../queries/fact_problem_engagement.sql | 112 +++++++++++++++++- 5 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/dim_at_risk_learners.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/dim_at_risk_learners.yaml index 8d049feb3..89da73e9c 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/dim_at_risk_learners.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/dim_at_risk_learners.yaml @@ -179,7 +179,8 @@ normalize_columns: true offset: 0 params: null schema: '{{ DBT_PROFILE_TARGET_DATABASE }}' -sql: null +sql: |- + {% filter indent(width=2) %}{% include 'openedx-assets/queries/dim_at_risk_learners.sql' %}{% endfilter %} table_name: dim_at_risk_learners template_params: {} uuid: 92eadc61-2931-577e-95b7-34adb1a8f515 diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/enrollment_status.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/enrollment_status.yaml index 0dc15357f..c64e2f30f 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/enrollment_status.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/enrollment_status.yaml @@ -136,7 +136,7 @@ metrics: normalize_columns: false offset: 0 params: null -schema: reporting +schema: '{{ DBT_PROFILE_TARGET_DATABASE }}' sql: |- SELECT fes.org, diff --git a/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql new file mode 100644 index 000000000..0f2066f11 --- /dev/null +++ b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql @@ -0,0 +1,30 @@ +with + page_visits as ( + select org, course_key, actor_id, max(emission_time) as last_visited + from {{ ASPECTS_XAPI_DATABASE }}.navigation_events + where + 1=1 + {% include 'openedx-assets/queries/common_filters.sql' %} + group by org, course_key, actor_id + ) + +select + learners.org as org, + learners.course_key as course_key, + learners.course_name as course_name, + learners.course_run as course_run, + learners.actor_id as actor_id, + learners.username as username, + learners.name as name, + learners.email as email, + learners.enrollment_mode as enrollment_mode, + learners.course_grade as course_grade, + learners.enrolled_at as enrolled_at, + learners.grade_bucket as grade_bucket, + page_visits.last_visited as last_visited +from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_student_status learners +join page_visits using (org, course_key, actor_id) +where + approving_state = 'failed' + and enrollment_status = 'registered' + and page_visits.last_visited < subtractDays(now(), 7) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql index b8d310f24..0bc8bfc44 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql @@ -1,5 +1,7 @@ select fact_pageview_engagement.* from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_pageview_engagement -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners +join ( + {% include 'openedx-assets/queries/dim_at_risk_learners.sql' %} +) as at_risk_learners using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql index 77c77130f..cf89641af 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql @@ -1,4 +1,108 @@ -select * -from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_problem_engagement -where 1=1 -{% include 'openedx-assets/queries/common_filters.sql' %} +with + subsection_counts as ( + select + org, + course_key, + course_run, + section_with_name, + subsection_with_name, + actor_id, + item_count, + count(distinct problem_id) as problems_attempted, + case + when problems_attempted = 0 + then 'No problems attempted yet' + when problems_attempted = item_count + then 'All problems attempted' + else 'At least one problem attempted' + end as engagement_level, + username, + name, + email + from {{ ref("fact_problem_engagement_per_subsection") }} + group by + org, + course_key, + course_run, + section_with_name, + subsection_with_name, + actor_id, + item_count, + username, + name, + email + where 1=1 + {% include 'openedx-assets/queries/common_filters.sql' %} + ), + section_counts as ( + select + org, + course_key, + course_run, + section_with_name, + actor_id, + sum(item_count) as item_count, + sum(problems_attempted) as problems_attempted, + case + when problems_attempted = 0 + then 'No problems attempted yet' + when problems_attempted = item_count + then 'All problems attempted' + else 'At least one problem attempted' + end as engagement_level, + username, + name, + email + from subsection_counts + where 1=1 + {% include 'openedx-assets/queries/common_filters.sql' %} + group by + org, + course_key, + course_run, + section_with_name, + actor_id, + username, + name, + email + ), + problem_engagement as ( + select + org, + course_key, + course_run, + subsection_with_name as section_subsection_name, + 'subsection' as content_level, + actor_id as actor_id, + engagement_level as section_subsection_problem_engagement, + username, + name, + email + from subsection_counts + union all + select + org, + course_key, + course_run, + section_with_name as section_subsection_name, + 'section' as content_level, + actor_id as actor_id, + engagement_level as section_subsection_problem_engagement, + username, + name, + email + from section_counts + ) + +select + pe.org as org, + pe.course_key as course_key, + pe.course_run as course_run, + pe.section_subsection_name as section_subsection_name, + pe.content_level as content_level, + pe.actor_id as actor_id, + pe.section_subsection_problem_engagement as section_subsection_problem_engagement, + pe.username as username, + pe.name as name, + pe.email as email +from problem_engagement pe From ee191a37e4d571029eec4631ddfbae166d89006f Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Wed, 22 May 2024 13:26:27 -0400 Subject: [PATCH 2/4] fix: Performance enhancements for at-risk dashboards --- tutoraspects/patches/openedx-common-settings | 1 + ...dx-dev-dockerfile-post-python-requirements | 2 +- ...penedx-dockerfile-post-python-requirements | 2 +- tutoraspects/plugin.py | 4 +- .../assets/charts/At-risk_learners.yaml | 41 +- .../Watched_Video_Segments_at-risk.yaml | 3 +- .../assets/dashboards/At-Risk_Learners.yaml | 742 ++++++++++-------- .../datasets/at_risk_problem_results.yaml | 76 +- .../fact_at_risk_pageview_engagement.yaml | 32 +- .../fact_at_risk_problem_engagement.yaml | 24 +- .../fact_at_risk_video_engagement.yaml | 32 +- .../datasets/fact_at_risk_video_plays.yaml | 32 +- .../fact_at_risk_watched_video_segments.yaml | 16 +- .../queries/at_risk_learner_filter.sql | 18 + .../queries/at_risk_problem_results.sql | 6 +- .../queries/dim_at_risk_learners.sql | 4 +- .../fact_at_risk_navigation_completion.sql | 6 +- .../fact_at_risk_pageview_engagement.sql | 8 +- .../fact_at_risk_problem_engagement.sql | 8 +- .../queries/fact_at_risk_video_engagement.sql | 4 +- .../queries/fact_at_risk_video_plays.sql | 6 +- .../queries/fact_at_risk_video_watches.sql | 6 +- .../fact_at_risk_watched_video_segments.sql | 6 +- .../queries/fact_problem_engagement.sql | 8 +- 24 files changed, 605 insertions(+), 482 deletions(-) create mode 100644 tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql diff --git a/tutoraspects/patches/openedx-common-settings b/tutoraspects/patches/openedx-common-settings index 1cf9044ab..e68a69457 100644 --- a/tutoraspects/patches/openedx-common-settings +++ b/tutoraspects/patches/openedx-common-settings @@ -15,6 +15,7 @@ EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_PII_MODELS }} ASPECTS_INSTRUCTOR_DASHBOARDS = {{ ASPECTS_INSTRUCTOR_DASHBOARDS }} SUPERSET_DASHBOARD_LOCALES = {{ SUPERSET_DASHBOARD_LOCALES }} +SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK = {{ SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK }} {% if ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN %} try: not OPEN_EDX_FILTERS_CONFIG diff --git a/tutoraspects/patches/openedx-dev-dockerfile-post-python-requirements b/tutoraspects/patches/openedx-dev-dockerfile-post-python-requirements index 2bd283bc7..8fd5d1271 100644 --- a/tutoraspects/patches/openedx-dev-dockerfile-post-python-requirements +++ b/tutoraspects/patches/openedx-dev-dockerfile-post-python-requirements @@ -1,5 +1,5 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ - pip install "platform-plugin-aspects==v0.9.2" + pip install "platform-plugin-aspects==v0.9.4" RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ pip install "edx-event-routing-backends==v9.0.1" diff --git a/tutoraspects/patches/openedx-dockerfile-post-python-requirements b/tutoraspects/patches/openedx-dockerfile-post-python-requirements index 2bd283bc7..8fd5d1271 100644 --- a/tutoraspects/patches/openedx-dockerfile-post-python-requirements +++ b/tutoraspects/patches/openedx-dockerfile-post-python-requirements @@ -1,5 +1,5 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ - pip install "platform-plugin-aspects==v0.9.2" + pip install "platform-plugin-aspects==v0.9.4" RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared \ pip install "edx-event-routing-backends==v9.0.1" diff --git a/tutoraspects/plugin.py b/tutoraspects/plugin.py index 349120495..0ce5b9066 100644 --- a/tutoraspects/plugin.py +++ b/tutoraspects/plugin.py @@ -86,6 +86,8 @@ "* [Superset Resources](https://github.com/apache/superset#resources)
", ), ("ASPECTS_ENABLE_INSTRUCTOR_DASHBOARD_PLUGIN", True), + # Whether to show the link to go to Superset in the instructor dashboard tab + ("SUPERSET_SHOW_INSTRUCTOR_DASHBOARD_LINK", True), # The following settings are used to configure the Superset dashboards # in the LMS Instructor Dashboard. ( @@ -346,7 +348,7 @@ # For now we are pulling this from github, which should allow maximum # flexibility for forking, running branches, specific versions, etc. ("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"), - ("DBT_BRANCH", "v3.24.0"), + ("DBT_BRANCH", "bmtcril/performance_tweaks"), ("DBT_SSH_KEY", ""), ("DBT_STATE_DIR", "/app/aspects/dbt_state/"), # This is the name of the database dbt will write to diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/At-risk_learners.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/At-risk_learners.yaml index 71236c00a..b8df7b306 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/At-risk_learners.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/At-risk_learners.yaml @@ -13,18 +13,55 @@ params: - name - username - email + - expressionType: SQL + label: Course Grade % + sqlExpression: round(course_grade*100, 2) + - last_visited order_by_cols: [] order_desc: true percent_metrics: [] query_mode: aggregate - row_limit: 1000 + row_limit: 5000 server_page_length: 10 show_cell_bars: true table_timestamp_format: smart_date temporal_columns_lookup: {} time_grain_sqla: P1D + timeseries_limit_metric: + aggregate: MAX + column: + advanced_data_type: null + certification_details: null + certified_by: null + column_name: course_grade + description: null + expression: null + filterable: true + groupby: true + id: 10990 + is_certified: false + is_dttm: false + python_date_format: null + type: Float64 + type_generic: 0 + verbose_name: Course Grade + warning_markdown: null + datasourceWarning: false + expressionType: SIMPLE + hasCustomLabel: false + label: MAX(Course Grade) + optionName: metric_0woj6b3chi2_ihsomqnfpk9 + sqlExpression: null viz_type: table -query_context: '{"datasource":{"id":1180,"type":"table"},"force":false,"queries":[{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["name","username","email"],"metrics":[],"orderby":[],"annotation_layers":[],"row_limit":1000,"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"1180__table","viz_type":"table","slice_id":2128,"query_mode":"aggregate","groupby":["name","username","email"],"time_grain_sqla":"P1D","temporal_columns_lookup":{},"all_columns":[],"percent_metrics":[],"adhoc_filters":[],"order_by_cols":[],"row_limit":1000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' +query_context: '{"datasource":{"id":991,"type":"table"},"force":false,"queries":[{"filters":[],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":["name","username","email",{"expressionType":"SQL","label":"Course + Grade %","sqlExpression":"round(course_grade*100, 2)"},"last_visited"],"metrics":[],"orderby":[[{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course + Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course + Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},false]],"annotation_layers":[],"row_limit":5000,"series_limit":0,"series_limit_metric":{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course + Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course + Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"post_processing":[]}],"form_data":{"datasource":"991__table","viz_type":"table","slice_id":4124,"query_mode":"aggregate","groupby":["name","username","email",{"expressionType":"SQL","label":"Course + Grade %","sqlExpression":"round(course_grade*100, 2)"},"last_visited"],"time_grain_sqla":"P1D","temporal_columns_lookup":{},"all_columns":[],"percent_metrics":[],"adhoc_filters":[],"timeseries_limit_metric":{"aggregate":"MAX","column":{"advanced_data_type":null,"certification_details":null,"certified_by":null,"column_name":"course_grade","description":null,"expression":null,"filterable":true,"groupby":true,"id":10990,"is_certified":false,"is_dttm":false,"python_date_format":null,"type":"Float64","type_generic":0,"verbose_name":"Course + Grade","warning_markdown":null},"datasourceWarning":false,"expressionType":"SIMPLE","hasCustomLabel":false,"label":"MAX(Course + Grade)","optionName":"metric_0woj6b3chi2_ihsomqnfpk9","sqlExpression":null},"order_by_cols":[],"row_limit":5000,"server_page_length":10,"order_desc":true,"table_timestamp_format":"smart_date","show_cell_bars":true,"color_pn":true,"extra_form_data":{},"dashboards":[5608],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' slice_name: At-risk learners uuid: 447a194b-dbed-4a82-a899-2df8e01e84b1 version: 1.0.0 diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/Watched_Video_Segments_at-risk.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/Watched_Video_Segments_at-risk.yaml index 65601dcb5..f021bed97 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/Watched_Video_Segments_at-risk.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/Watched_Video_Segments_at-risk.yaml @@ -54,7 +54,8 @@ params: y_axis_title_position: Left query_context: '{"datasource":{"id":1299,"type":"table"},"force":false,"queries":[{"filters":[{"col":"started_at","op":"TEMPORAL_RANGE","val":"No filter"}],"extras":{"time_grain_sqla":"P1D","having":"","where":""},"applied_time_extras":{},"columns":[{"timeGrain":"P1D","columnType":"BASE_AXIS","sqlExpression":"segment_start","label":"segment_start","expressionType":"SQL"}],"metrics":["unique_viewers","repeat_views"],"orderby":[["unique_viewers",false]],"annotation_layers":[],"row_limit":10000,"series_columns":[],"series_limit":0,"order_desc":true,"url_params":{},"custom_params":{},"custom_form_data":{},"time_offsets":[],"post_processing":[{"operation":"pivot","options":{"index":["segment_start"],"columns":[],"aggregates":{"unique_viewers":{"operator":"mean"},"repeat_views":{"operator":"mean"}},"drop_missing_columns":false}},{"operation":"flatten"}]}],"form_data":{"datasource":"1299__table","viz_type":"echarts_timeseries_bar","slice_id":2708,"x_axis":"segment_start","time_grain_sqla":"P1D","xAxisForceCategorical":true,"x_axis_sort_asc":true,"x_axis_sort_series":"name","x_axis_sort_series_ascending":true,"metrics":["unique_viewers","repeat_views"],"groupby":[],"adhoc_filters":[{"clause":"WHERE","comparator":"No - filter","expressionType":"SIMPLE","operator":"TEMPORAL_RANGE","subject":"started_at"}],"order_desc":true,"row_limit":10000,"truncate_metric":true,"show_empty_columns":true,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"orientation":"vertical","x_axis_title":"Video Timestamp (in seconds)","x_axis_title_margin":50,"y_axis_title":"Number of Views","y_axis_title_margin":30,"y_axis_title_position":"Left","sort_series_type":"sum","color_scheme":"supersetColors","only_total":true,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","xAxisLabelRotation":45,"y_axis_format":"SMART_NUMBER","truncateXAxis":true,"y_axis_bounds":[null,null],"rich_tooltip":true,"tooltipTimeFormat":"smart_date","extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' + filter","expressionType":"SIMPLE","operator":"TEMPORAL_RANGE","subject":"started_at"}],"order_desc":true,"row_limit":10000,"truncate_metric":true,"show_empty_columns":true,"comparison_type":"values","annotation_layers":[],"forecastPeriods":10,"forecastInterval":0.8,"orientation":"vertical","x_axis_title":"Video + Timestamp (in seconds)","x_axis_title_margin":50,"y_axis_title":"Number of Views","y_axis_title_margin":30,"y_axis_title_position":"Left","sort_series_type":"sum","color_scheme":"supersetColors","only_total":true,"show_legend":true,"legendType":"scroll","legendOrientation":"top","x_axis_time_format":"smart_date","xAxisLabelRotation":45,"y_axis_format":"SMART_NUMBER","truncateXAxis":true,"y_axis_bounds":[null,null],"rich_tooltip":true,"tooltipTimeFormat":"smart_date","extra_form_data":{},"dashboards":[6096],"force":false,"result_format":"json","result_type":"full"},"result_format":"json","result_type":"full"}' slice_name: Watched Video Segments (at-risk) uuid: a7947bdb-65a2-49ed-815e-850423bfeacc version: 1.0.0 diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/dashboards/At-Risk_Learners.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/dashboards/At-Risk_Learners.yaml index 17f18d577..439c99e7e 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/dashboards/At-Risk_Learners.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/dashboards/At-Risk_Learners.yaml @@ -8,363 +8,363 @@ dashboard_title: At-Risk Learners description: null metadata: chart_configuration: - '2108': + '3944': crossFilters: chartsInScope: - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2108 - '2128': + id: 3944 + '3964': crossFilters: chartsInScope: - - 2108 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2128 - '2148': + id: 3964 + '3984': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2148 - '2168': + id: 3984 + '4004': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2168 - '2188': + id: 4004 + '4024': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2188 - '2208': + id: 4024 + '4044': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2208 - '2209': + id: 4044 + '4064': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2209 - '2210': + id: 4064 + '4084': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2210 - '2211': + id: 4084 + '4104': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2211 - '2664': + id: 4104 + '4124': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2664 - '2665': + id: 4124 + '4144': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2665 - '2705': + id: 4144 + '4164': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2705 - '2706': + id: 4164 + '4184': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4204 + - 4224 + - 4244 + - 4264 scope: global - id: 2706 - '2707': + id: 4184 + '4204': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4224 + - 4244 + - 4264 scope: global - id: 2707 - '2708': + id: 4204 + '4224': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4244 + - 4264 scope: global - id: 2708 - '2785': + id: 4224 + '4244': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4264 scope: global - id: 2785 - '2805': + id: 4244 + '4264': crossFilters: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 scope: global - id: 2805 + id: 4264 color_scheme: supersetColors color_scheme_domain: - '#1FA8C9' @@ -392,23 +392,23 @@ metadata: expanded_slices: {} global_chart_configuration: chartsInScope: - - 2108 - - 2128 - - 2148 - - 2168 - - 2188 - - 2208 - - 2209 - - 2210 - - 2211 - - 2664 - - 2665 - - 2705 - - 2706 - - 2707 - - 2708 - - 2785 - - 2805 + - 3944 + - 3964 + - 3984 + - 4004 + - 4024 + - 4044 + - 4064 + - 4084 + - 4104 + - 4124 + - 4144 + - 4164 + - 4184 + - 4204 + - 4224 + - 4244 + - 4264 scope: excluded: [] rootPath: @@ -563,7 +563,7 @@ position: children: [] id: CHART-LmLX-39lXb meta: - chartId: 2706 + chartId: 4184 height: 72 sliceName: Partial and Full Views Per Video (at-risk) uuid: 2232c302-cd41-406f-a45d-0f674344166b @@ -581,7 +581,7 @@ position: children: [] id: CHART-NSSaeQX_nX meta: - chartId: 2705 + chartId: 3964 height: 50 sliceName: Video Views by Section/Subsection (at-risk) uuid: 8266ce91-d0b3-4c3b-aa3d-2be4d90e64a8 @@ -599,7 +599,7 @@ position: children: [] id: CHART-explore-2108-1 meta: - chartId: 2108 + chartId: 4204 height: 62 sliceName: Problems attempted per section/subsection (at-risk) uuid: 5015477d-d166-4823-868d-c7883d195bab @@ -617,11 +617,11 @@ position: children: [] id: CHART-explore-2128-1 meta: - chartId: 2128 + chartId: 4124 height: 50 sliceName: At-risk learners uuid: 447a194b-dbed-4a82-a899-2df8e01e84b1 - width: 6 + width: 12 parents: - ROOT_ID - GRID_ID @@ -633,11 +633,11 @@ position: children: [] id: CHART-explore-2148-1 meta: - chartId: 2148 + chartId: 4084 height: 50 sliceName: Last visit date uuid: 6c2b1008-96c9-426d-b2fe-68aa1de7b10d - width: 6 + width: 12 parents: - ROOT_ID - GRID_ID @@ -649,7 +649,7 @@ position: children: [] id: CHART-explore-2168-1 meta: - chartId: 2168 + chartId: 4224 height: 50 sliceName: At-risk Enrollees per Enrollment Track uuid: f8beeb8c-b35c-47fc-8370-96b493f9c1b8 @@ -665,7 +665,7 @@ position: children: [] id: CHART-explore-2188-1 meta: - chartId: 2188 + chartId: 4104 height: 63 sliceName: Page views per section/subsection (at-risk) uuid: 29a5cf7e-41cd-4b60-a63a-c921d6ebd997 @@ -683,7 +683,7 @@ position: children: [] id: CHART-explore-2208-1 meta: - chartId: 2208 + chartId: 3944 height: 50 sliceName: Section Summary (at-risk) uuid: eec3a432-153f-42bc-8d37-52b200a77acd @@ -701,7 +701,7 @@ position: children: [] id: CHART-explore-2209-1 meta: - chartId: 2209 + chartId: 4064 height: 50 sliceName: Cumulative Interactions (at-risk) uuid: 3a22091f-4686-4a1d-a66d-b36541844b36 @@ -719,7 +719,7 @@ position: children: [] id: CHART-explore-2210-1 meta: - chartId: 2210 + chartId: 3984 height: 50 sliceName: Subsection Summary (at-risk) uuid: f60f12f3-f4f1-41af-8b10-d2cf3cb94f69 @@ -737,7 +737,7 @@ position: children: [] id: CHART-explore-2211-1 meta: - chartId: 2211 + chartId: 4004 height: 50 sliceName: Evolution of Engagement (at-risk) uuid: ffa98e7f-7bed-4435-a1c1-472a46a4d269 @@ -755,7 +755,7 @@ position: children: [] id: CHART-explore-2664-1 meta: - chartId: 2664 + chartId: 4164 height: 50 sliceName: Problem Interactions (at-risk) uuid: d3b9fa1e-f0ab-41e5-9705-27c7c58e620c @@ -773,7 +773,7 @@ position: children: [] id: CHART-explore-2665-1 meta: - chartId: 2665 + chartId: 4264 height: 50 sliceName: Problem Results (at-risk) uuid: 003e60b9-907d-4002-bf2e-7d315225ec29 @@ -791,7 +791,7 @@ position: children: [] id: CHART-explore-2707-1 meta: - chartId: 2707 + chartId: 4144 height: 64 sliceName: Video Views per Section/Subsection (at-risk) uuid: 5d0329f4-2a4a-4cd4-8b4e-926568d1bbcc @@ -809,7 +809,7 @@ position: children: [] id: CHART-explore-2708-1 meta: - chartId: 2708 + chartId: 4044 height: 50 sliceName: Watched Video Segments (at-risk) uuid: a7947bdb-65a2-49ed-815e-850423bfeacc @@ -827,7 +827,7 @@ position: children: [] id: CHART-explore-2785-1 meta: - chartId: 2785 + chartId: 4244 height: 50 sliceName: At-risk Enrollment Dates uuid: ded61855-48ea-4705-9385-690bf7dba53b @@ -843,7 +843,7 @@ position: children: [] id: CHART-explore-2805-1 meta: - chartId: 2805 + chartId: 4024 height: 50 sliceName: Distribution of Course Grades uuid: cd3479d8-3574-4b77-9e1e-2ad176989b4d @@ -851,7 +851,9 @@ position: parents: - ROOT_ID - GRID_ID - - ROW-Xdfl_TeC-D + - TABS-7McownEo06 + - TAB-nWjLboV5Q + - ROW-l6jLJIdb1 type: CHART DASHBOARD_VERSION_KEY: v2 GRID_ID: @@ -866,6 +868,20 @@ position: meta: text: At-Risk Learners type: HEADER + MARKDOWN-mH--KD6qFl: + children: [] + id: MARKDOWN-mH--KD6qFl + meta: + code: "{{ASPECTS_LEARNER_GROUPS_HELP_MARKDOWN}}" + height: 50 + width: 12 + parents: + - ROOT_ID + - GRID_ID + - TABS-7McownEo06 + - TAB-1sC34gQvt + - ROW-duj4-KVlBB + type: MARKDOWN ROOT_ID: children: - GRID_ID @@ -956,6 +972,30 @@ position: - TABS-OsW2n-dsFI - TAB-GeKBNaKbHg type: ROW + ROW-_1cvZEW57f: + children: + - CHART-explore-2148-1 + id: ROW-_1cvZEW57f + meta: + background: BACKGROUND_TRANSPARENT + parents: + - ROOT_ID + - GRID_ID + - TABS-7McownEo06 + - TAB-s_n47Pk1I + type: ROW + ROW-duj4-KVlBB: + children: + - MARKDOWN-mH--KD6qFl + id: ROW-duj4-KVlBB + meta: + background: BACKGROUND_TRANSPARENT + parents: + - ROOT_ID + - GRID_ID + - TABS-7McownEo06 + - TAB-1sC34gQvt + type: ROW ROW-fYHQDhzd8: children: - CHART-explore-2108-1 @@ -1028,7 +1068,6 @@ position: ROW-vQrzBOW17: children: - CHART-explore-2128-1 - - CHART-explore-2148-1 id: ROW-vQrzBOW17 meta: background: BACKGROUND_TRANSPARENT @@ -1038,6 +1077,19 @@ position: - TABS-7McownEo06 - TAB-s_n47Pk1I type: ROW + TAB-1sC34gQvt: + children: + - ROW-duj4-KVlBB + id: TAB-1sC34gQvt + meta: + defaultText: Tab title + placeholder: Tab title + text: Help + parents: + - ROOT_ID + - GRID_ID + - TABS-7McownEo06 + type: TAB TAB-CRJ0LHIfEa: children: - ROW-D_nOy1UKS @@ -1131,6 +1183,7 @@ position: TAB-s_n47Pk1I: children: - ROW-vQrzBOW17 + - ROW-_1cvZEW57f id: TAB-s_n47Pk1I meta: defaultText: Tab title @@ -1147,6 +1200,7 @@ position: - TAB-CRJ0LHIfEa - TAB-T3nFxdINB - TAB-nWjLboV5Q + - TAB-1sC34gQvt id: TABS-7McownEo06 meta: {} parents: diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/at_risk_problem_results.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/at_risk_problem_results.yaml index 6aaded828..730875c55 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/at_risk_problem_results.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/at_risk_problem_results.yaml @@ -16,7 +16,7 @@ columns: type: null verbose_name: Result - advanced_data_type: null - column_name: attempts + column_name: problem_name_with_location description: null expression: '' extra: @@ -26,10 +26,10 @@ columns: is_active: true is_dttm: false python_date_format: null - type: Int16 - verbose_name: Attempts + type: String + verbose_name: Problem Name With Location - advanced_data_type: null - column_name: success + column_name: actor_id description: null expression: '' extra: @@ -39,10 +39,10 @@ columns: is_active: true is_dttm: false python_date_format: null - type: Bool - verbose_name: Success + type: String + verbose_name: Actor ID - advanced_data_type: null - column_name: emission_time + column_name: course_key description: null expression: '' extra: @@ -50,12 +50,12 @@ columns: filterable: true groupby: true is_active: true - is_dttm: true + is_dttm: false python_date_format: null - type: DateTime - verbose_name: Emission Time + type: String + verbose_name: Course Key - advanced_data_type: null - column_name: problem_name_with_location + column_name: course_name description: null expression: '' extra: @@ -66,9 +66,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Problem Name With Location + verbose_name: Course Name - advanced_data_type: null - column_name: problem_name + column_name: course_run description: null expression: '' extra: @@ -79,9 +79,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Problem Name + verbose_name: Course Run - advanced_data_type: null - column_name: actor_id + column_name: emission_time description: null expression: '' extra: @@ -89,12 +89,12 @@ columns: filterable: true groupby: true is_active: true - is_dttm: false + is_dttm: true python_date_format: null - type: String - verbose_name: Actor ID + type: DateTime + verbose_name: Emission Time - advanced_data_type: null - column_name: course_name + column_name: problem_id description: null expression: '' extra: @@ -105,9 +105,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Course Name + verbose_name: Problem ID - advanced_data_type: null - column_name: problem_id + column_name: problem_name description: null expression: '' extra: @@ -118,9 +118,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Problem ID + verbose_name: Problem Name - advanced_data_type: null - column_name: course_key + column_name: attempts description: null expression: '' extra: @@ -130,10 +130,10 @@ columns: is_active: true is_dttm: false python_date_format: null - type: String - verbose_name: Course Key + type: Int16 + verbose_name: Attempts - advanced_data_type: null - column_name: course_run + column_name: success description: null expression: '' extra: @@ -143,10 +143,10 @@ columns: is_active: true is_dttm: false python_date_format: null - type: String - verbose_name: Course Run + type: Bool + verbose_name: Success - advanced_data_type: null - column_name: responses + column_name: org description: null expression: '' extra: @@ -157,9 +157,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Responses + verbose_name: Org - advanced_data_type: null - column_name: org + column_name: responses description: null expression: '' extra: @@ -170,7 +170,7 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Org + verbose_name: Responses - advanced_data_type: null column_name: problem_link description: null @@ -184,7 +184,7 @@ columns: type: String verbose_name: Problem Link - advanced_data_type: null - column_name: graded + column_name: interaction_type description: null expression: null extra: null @@ -193,10 +193,10 @@ columns: is_active: true is_dttm: false python_date_format: null - type: Bool - verbose_name: Graded + type: String + verbose_name: Interaction Type - advanced_data_type: null - column_name: interaction_type + column_name: graded description: null expression: null extra: null @@ -205,8 +205,8 @@ columns: is_active: true is_dttm: false python_date_format: null - type: String - verbose_name: Interaction Type + type: Bool + verbose_name: Graded database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_pageview_engagement.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_pageview_engagement.yaml index d37c5fa62..6543a5691 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_pageview_engagement.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_pageview_engagement.yaml @@ -51,7 +51,7 @@ columns: type: String verbose_name: Course Key - advanced_data_type: null - column_name: course_run + column_name: content_level description: null expression: null extra: {} @@ -61,9 +61,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Course Run + verbose_name: Content Level - advanced_data_type: null - column_name: subsection_with_name + column_name: course_run description: null expression: null extra: {} @@ -73,9 +73,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Subsection Name + verbose_name: Course Run - advanced_data_type: null - column_name: section_with_name + column_name: subsection_with_name description: null expression: null extra: {} @@ -85,9 +85,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Section Name + verbose_name: Subsection Name - advanced_data_type: null - column_name: org + column_name: section_with_name description: null expression: null extra: {} @@ -97,9 +97,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Organization + verbose_name: Section Name - advanced_data_type: null - column_name: content_level + column_name: email description: null expression: null extra: {} @@ -109,9 +109,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Content Level + verbose_name: Email - advanced_data_type: null - column_name: username + column_name: name description: null expression: null extra: {} @@ -121,9 +121,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Username + verbose_name: Name - advanced_data_type: null - column_name: email + column_name: org description: null expression: null extra: {} @@ -133,9 +133,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Email + verbose_name: Organization - advanced_data_type: null - column_name: name + column_name: username description: null expression: null extra: {} @@ -145,7 +145,7 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Name + verbose_name: Username database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_problem_engagement.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_problem_engagement.yaml index b0b6099ae..bad6839b8 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_problem_engagement.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_problem_engagement.yaml @@ -51,7 +51,7 @@ columns: type: String verbose_name: Course Key - advanced_data_type: null - column_name: course_run + column_name: content_level description: null expression: null extra: {} @@ -61,9 +61,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Course Run + verbose_name: Content Level - advanced_data_type: null - column_name: org + column_name: course_run description: null expression: null extra: {} @@ -73,9 +73,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Organization + verbose_name: Course Run - advanced_data_type: null - column_name: content_level + column_name: email description: null expression: null extra: {} @@ -85,9 +85,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Content Level + verbose_name: Email - advanced_data_type: null - column_name: username + column_name: name description: null expression: null extra: {} @@ -97,9 +97,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Username + verbose_name: Name - advanced_data_type: null - column_name: email + column_name: org description: null expression: null extra: {} @@ -109,9 +109,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Email + verbose_name: Organization - advanced_data_type: null - column_name: name + column_name: username description: null expression: null extra: {} @@ -121,7 +121,7 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Name + verbose_name: Username database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_engagement.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_engagement.yaml index da9b10794..c592b56cc 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_engagement.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_engagement.yaml @@ -51,7 +51,7 @@ columns: type: String verbose_name: Course Key - advanced_data_type: null - column_name: course_run + column_name: content_level description: null expression: null extra: {} @@ -61,9 +61,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Course Run + verbose_name: Content Level - advanced_data_type: null - column_name: subsection_with_name + column_name: course_run description: null expression: null extra: {} @@ -73,9 +73,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Subsection Name + verbose_name: Course Run - advanced_data_type: null - column_name: section_with_name + column_name: subsection_with_name description: null expression: null extra: {} @@ -85,9 +85,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Section Name + verbose_name: Subsection Name - advanced_data_type: null - column_name: org + column_name: section_with_name description: null expression: null extra: {} @@ -97,9 +97,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Organization + verbose_name: Section Name - advanced_data_type: null - column_name: content_level + column_name: email description: null expression: null extra: {} @@ -109,9 +109,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Content Level + verbose_name: Email - advanced_data_type: null - column_name: username + column_name: name description: null expression: null extra: {} @@ -121,9 +121,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Username + verbose_name: Name - advanced_data_type: null - column_name: email + column_name: org description: null expression: null extra: {} @@ -133,9 +133,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Email + verbose_name: Organization - advanced_data_type: null - column_name: name + column_name: username description: null expression: null extra: {} @@ -145,7 +145,7 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Name + verbose_name: Username database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_plays.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_plays.yaml index 57809c59e..922b8432b 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_plays.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_video_plays.yaml @@ -159,19 +159,19 @@ columns: type: String verbose_name: Video Name - advanced_data_type: null - column_name: graded + column_name: video_link description: null expression: '' - extra: {} + extra: null filterable: true groupby: true is_active: true is_dttm: false python_date_format: null - type: Bool - verbose_name: Graded + type: String + verbose_name: Video Link - advanced_data_type: null - column_name: org + column_name: graded description: null expression: '' extra: {} @@ -180,22 +180,22 @@ columns: is_active: true is_dttm: false python_date_format: null - type: String - verbose_name: Organization + type: Bool + verbose_name: Graded - advanced_data_type: null - column_name: video_link + column_name: org description: null expression: '' - extra: null + extra: {} filterable: true groupby: true is_active: true is_dttm: false python_date_format: null type: String - verbose_name: Video Link + verbose_name: Organization - advanced_data_type: null - column_name: username + column_name: email description: null expression: '' extra: null @@ -205,9 +205,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Username + verbose_name: Email - advanced_data_type: null - column_name: email + column_name: name description: null expression: '' extra: null @@ -217,9 +217,9 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Email + verbose_name: Name - advanced_data_type: null - column_name: name + column_name: username description: null expression: '' extra: null @@ -229,7 +229,7 @@ columns: is_dttm: false python_date_format: null type: String - verbose_name: Name + verbose_name: Username database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_watched_video_segments.yaml b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_watched_video_segments.yaml index c4cff7257..f47808192 100644 --- a/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_watched_video_segments.yaml +++ b/tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/datasets/fact_at_risk_watched_video_segments.yaml @@ -99,29 +99,29 @@ columns: type: String verbose_name: Video Name - advanced_data_type: null - column_name: org + column_name: video_duration description: null expression: '' - extra: {} + extra: null filterable: true groupby: true is_active: true is_dttm: false python_date_format: null - type: String - verbose_name: Organization + type: Int64 + verbose_name: Video Duration - advanced_data_type: null - column_name: video_duration + column_name: org description: null expression: '' - extra: null + extra: {} filterable: true groupby: true is_active: true is_dttm: false python_date_format: null - type: Int64 - verbose_name: Video Duration + type: String + verbose_name: Organization database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 default_endpoint: null description: null diff --git a/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql b/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql new file mode 100644 index 000000000..cd0313490 --- /dev/null +++ b/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql @@ -0,0 +1,18 @@ +with + page_visits as ( + select org, course_key, actor_id, max(last_visited) + from {{ ASPECTS_XAPI_DATABASE }}.fact_learner_last_course_visit + where + 1=1 + {% include 'openedx-assets/queries/common_filters.sql' %} + and last_visited < subtractDays(now(), 7) + group by org, course_key, actor_id + ) + +select + org, course_key, learners.actor_id as actor_id +from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_student_status learners +join page_visits using (org, course_key, actor_id) +where + approving_state = 'failed' + and enrollment_status = 'registered' diff --git a/tutoraspects/templates/openedx-assets/queries/at_risk_problem_results.sql b/tutoraspects/templates/openedx-assets/queries/at_risk_problem_results.sql index df8e01f46..04ddb5e79 100644 --- a/tutoraspects/templates/openedx-assets/queries/at_risk_problem_results.sql +++ b/tutoraspects/templates/openedx-assets/queries/at_risk_problem_results.sql @@ -1,4 +1,6 @@ select results.* from {{ DBT_PROFILE_TARGET_DATABASE }}.int_problem_results results -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners - using (org, course_key, actor_id) +join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} +) as at_risk_learners +using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql index 0f2066f11..d1200cc9e 100644 --- a/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql +++ b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql @@ -1,7 +1,7 @@ with page_visits as ( - select org, course_key, actor_id, max(emission_time) as last_visited - from {{ ASPECTS_XAPI_DATABASE }}.navigation_events + select org, course_key, actor_id, max(last_visited) as last_visited + from {{ ASPECTS_XAPI_DATABASE }}.fact_learner_last_course_visit where 1=1 {% include 'openedx-assets/queries/common_filters.sql' %} diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_navigation_completion.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_navigation_completion.sql index fde2fa03a..dc8d2abe2 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_navigation_completion.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_navigation_completion.sql @@ -2,5 +2,7 @@ select fnc.* from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_navigation_completion fnc - join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners - using (org, course_key, actor_id) + join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} + ) as at_risk_learners + using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql index 0bc8bfc44..79abc290a 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_pageview_engagement.sql @@ -1,7 +1,7 @@ select fact_pageview_engagement.* from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_pageview_engagement -join ( - {% include 'openedx-assets/queries/dim_at_risk_learners.sql' %} -) as at_risk_learners -using (org, course_key, actor_id) + join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} + ) as at_risk_learners + using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_problem_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_problem_engagement.sql index 37b034358..cbe46d8e9 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_problem_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_problem_engagement.sql @@ -1,5 +1,5 @@ -select - fact_problem_engagement.* -from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_problem_engagement -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners +{% include 'openedx-assets/queries/fact_problem_engagement.sql' %} +join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} +) as at_risk_learners using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_engagement.sql index ab76f8c65..82ed79f9b 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_engagement.sql @@ -1,5 +1,7 @@ select fact_video_engagement.* from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_video_engagement -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners +join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} +) as at_risk_learners using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_plays.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_plays.sql index 1c3642367..60a192b00 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_plays.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_plays.sql @@ -4,5 +4,7 @@ with video_plays as ( select video_plays.* from video_plays -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners -using (org, course_key, actor_id) + join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} + ) as at_risk_learners + using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_watches.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_watches.sql index d47e2dae9..b0de479ad 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_watches.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_video_watches.sql @@ -4,5 +4,7 @@ with watches as ( select watches.* from watches -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners -using (org, course_key, actor_id) + join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} + ) as at_risk_learners + using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_watched_video_segments.sql b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_watched_video_segments.sql index cbb419c4c..b270585e6 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_at_risk_watched_video_segments.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_at_risk_watched_video_segments.sql @@ -4,5 +4,7 @@ with watches as ( select watches.* from watches -join {{ DBT_PROFILE_TARGET_DATABASE }}.dim_at_risk_learners -using (org, course_key, actor_id) + join ( + {% include 'openedx-assets/queries/at_risk_learner_filter.sql' %} + ) as at_risk_learners + using (org, course_key, actor_id) diff --git a/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql b/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql index cf89641af..98c779646 100644 --- a/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql +++ b/tutoraspects/templates/openedx-assets/queries/fact_problem_engagement.sql @@ -19,7 +19,9 @@ with username, name, email - from {{ ref("fact_problem_engagement_per_subsection") }} + from {{ DBT_PROFILE_TARGET_DATABASE }}.fact_problem_engagement_per_subsection + where 1=1 + {% include 'openedx-assets/queries/common_filters.sql' %} group by org, course_key, @@ -31,8 +33,6 @@ with username, name, email - where 1=1 - {% include 'openedx-assets/queries/common_filters.sql' %} ), section_counts as ( select @@ -54,8 +54,6 @@ with name, email from subsection_counts - where 1=1 - {% include 'openedx-assets/queries/common_filters.sql' %} group by org, course_key, From f68fea3ad64c3c5336c5ccf00ca03c39d4d686d7 Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Wed, 22 May 2024 16:55:13 -0400 Subject: [PATCH 3/4] feat: Add real version of aspects-dbt to include new model --- tutoraspects/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutoraspects/plugin.py b/tutoraspects/plugin.py index 0ce5b9066..0b40a512d 100644 --- a/tutoraspects/plugin.py +++ b/tutoraspects/plugin.py @@ -348,7 +348,7 @@ # For now we are pulling this from github, which should allow maximum # flexibility for forking, running branches, specific versions, etc. ("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"), - ("DBT_BRANCH", "bmtcril/performance_tweaks"), + ("DBT_BRANCH", "v3.25.0"), ("DBT_SSH_KEY", ""), ("DBT_STATE_DIR", "/app/aspects/dbt_state/"), # This is the name of the database dbt will write to From 416299b7ffccc0070fb12043ce03b691e70dbd4f Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Thu, 23 May 2024 09:10:19 -0400 Subject: [PATCH 4/4] fix: Use new column name for fact_learner_last_course_visit --- .../openedx-assets/queries/at_risk_learner_filter.sql | 4 ++-- .../templates/openedx-assets/queries/dim_at_risk_learners.sql | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql b/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql index cd0313490..04f3df425 100644 --- a/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql +++ b/tutoraspects/templates/openedx-assets/queries/at_risk_learner_filter.sql @@ -1,11 +1,11 @@ with page_visits as ( - select org, course_key, actor_id, max(last_visited) + select org, course_key, actor_id, max(emission_time) as last_visited from {{ ASPECTS_XAPI_DATABASE }}.fact_learner_last_course_visit where 1=1 {% include 'openedx-assets/queries/common_filters.sql' %} - and last_visited < subtractDays(now(), 7) + and emission_time < subtractDays(now(), 7) group by org, course_key, actor_id ) diff --git a/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql index d1200cc9e..863aeca5e 100644 --- a/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql +++ b/tutoraspects/templates/openedx-assets/queries/dim_at_risk_learners.sql @@ -1,10 +1,11 @@ with page_visits as ( - select org, course_key, actor_id, max(last_visited) as last_visited + select org, course_key, actor_id, max(emission_time) as last_visited from {{ ASPECTS_XAPI_DATABASE }}.fact_learner_last_course_visit where 1=1 {% include 'openedx-assets/queries/common_filters.sql' %} + and emission_time < subtractDays(now(), 7) group by org, course_key, actor_id )