Skip to content

Commit cb1d0bc

Browse files
author
Cristhian Garcia
authored
Merge pull request #771 from openedx/cag/course-dashboard
feat: import latest version of course dashboard
2 parents 61999e9 + b1fc366 commit cb1d0bc

24 files changed

+1312
-1138
lines changed

tutoraspects/asset_command_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ def omit_templated_vars(self, content: dict, existing: dict):
137137
else:
138138
content[key] = existing[key]
139139

140-
if isinstance(existing[key], dict):
140+
if isinstance(content[key], dict):
141141
self.omit_templated_vars(content[key], existing[key])
142142

143-
if isinstance(existing[key], list):
143+
if isinstance(content[key], list):
144144
for i, item in enumerate(content[key]):
145145
if isinstance(item, dict):
146146
try:

tutoraspects/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
[
8080
{
8181
"name": "Course Dashboard",
82-
"slug": "course-dashboard-v1",
82+
"slug": "course-dashboard",
8383
"uuid": "c0e64194-33d1-4d5a-8c10-4f51530c5ee9",
8484
"allow_translations": True,
8585
},
@@ -103,7 +103,7 @@
103103
(
104104
"SUPERSET_EMBEDDABLE_DASHBOARDS",
105105
{
106-
"course-dashboard-v1": "c0e64194-33d1-4d5a-8c10-4f51530c5ee9",
106+
"course-dashboard": "c0e64194-33d1-4d5a-8c10-4f51530c5ee9",
107107
"learner-groups": "8661d20c-cee6-4245-9fcc-610daea5fd24",
108108
"individual-learner": "abae8a25-1ba4-4653-81bd-d3937a162a11",
109109
},
@@ -332,7 +332,7 @@
332332
# For now we are pulling this from github, which should allow maximum
333333
# flexibility for forking, running branches, specific versions, etc.
334334
("DBT_REPOSITORY", "https://github.com/openedx/aspects-dbt"),
335-
("DBT_BRANCH", "v3.22.0"),
335+
("DBT_BRANCH", "v3.23.0"),
336336
("DBT_SSH_KEY", ""),
337337
("DBT_STATE_DIR", "/app/aspects/dbt_state/"),
338338
# This is the name of the database dbt will write to

tutoraspects/templates/aspects/build/aspects-superset/openedx-assets/assets/charts/Course_Information.yaml

Lines changed: 74 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ description: null
77
params:
88
adhoc_filters: []
99
all_columns: []
10-
annotation_layers: []
1110
color_pn: true
11+
column_config:
12+
Avg Course Grade:
13+
d3NumberFormat: ~g
14+
d3SmallNumberFormat: ~g
15+
Median Course Grade:
16+
d3NumberFormat: ~g
17+
d3SmallNumberFormat: ~g
1218
conditional_formatting:
1319
- colorScheme: '#ACE1C4'
1420
column: Graded Learners
@@ -17,29 +23,29 @@ params:
1723
- colorScheme: '#FDE380'
1824
column: Avg Course Grade
1925
operator: "\u2264 x \u2264"
20-
targetValueLeft: '0.5'
21-
targetValueRight: '0.7'
26+
targetValueLeft: '50'
27+
targetValueRight: '70'
2228
- colorScheme: '#EFA1AA'
2329
column: Avg Course Grade
2430
operator: <
25-
targetValue: 0.5
31+
targetValue: 50
2632
- colorScheme: '#ACE1C4'
2733
column: Avg Course Grade
2834
operator: "\u2265"
29-
targetValue: 0.7
35+
targetValue: 70
3036
- colorScheme: '#ACE1C4'
3137
column: Median Course Grade
3238
operator: "\u2265"
33-
targetValue: 0.7
39+
targetValue: 70
3440
- colorScheme: '#FDE380'
3541
column: Median Course Grade
3642
operator: "\u2264 x \u2264"
37-
targetValueLeft: '0.5'
38-
targetValueRight: '0.7'
43+
targetValueLeft: '50'
44+
targetValueRight: '70'
3945
- colorScheme: '#EFA1AA'
4046
column: Median Course Grade
4147
operator: <
42-
targetValue: 0.5
48+
targetValue: 50
4349
extra_form_data: {}
4450
groupby:
4551
- org
@@ -54,14 +60,14 @@ params:
5460
certified_by: null
5561
column_name: actor_id
5662
description: null
57-
expression: null
63+
expression: ''
5864
filterable: true
5965
groupby: true
60-
id: 457
66+
id: 538
6167
is_certified: false
6268
is_dttm: false
6369
python_date_format: null
64-
type: STRING
70+
type: String
6571
type_generic: 1
6672
verbose_name: null
6773
warning_markdown: null
@@ -71,38 +77,22 @@ params:
7177
label: Graded Learners
7278
optionName: metric_25t7qgbwxu5_a9fbiaboytw
7379
sqlExpression: null
74-
- aggregate: AVG
75-
column:
76-
advanced_data_type: null
77-
certification_details: null
78-
certified_by: null
79-
column_name: course_grade
80-
description: null
81-
expression: null
82-
filterable: true
83-
groupby: true
84-
id: 461
85-
is_certified: false
86-
is_dttm: false
87-
python_date_format: null
88-
type: FLOAT64
89-
type_generic: 0
90-
verbose_name: null
91-
warning_markdown: null
80+
- aggregate: null
81+
column: null
9282
datasourceWarning: false
93-
expressionType: SIMPLE
83+
expressionType: SQL
9484
hasCustomLabel: true
9585
label: Avg Course Grade
9686
optionName: metric_i5mlkxng7kb_5auir2yzvnx
97-
sqlExpression: null
87+
sqlExpression: round(AVG(course_grade),2) * 100
9888
- aggregate: null
9989
column: null
10090
datasourceWarning: false
10191
expressionType: SQL
10292
hasCustomLabel: true
10393
label: Median Course Grade
10494
optionName: metric_prd604bf33n_j3zxzos2g5
105-
sqlExpression: 'quantile(0.5)(course_grade) '
95+
sqlExpression: 'quantile(0.5)(round(course_grade,2) * 100) '
10696
order_by_cols: []
10797
order_desc: true
10898
percent_metrics: []
@@ -114,71 +104,66 @@ params:
114104
temporal_columns_lookup: {}
115105
time_grain_sqla: P1D
116106
viz_type: table
117-
query_context: "{\"datasource\":{\"id\":70,\"type\":\"table\"},\"force\":false,\"\
107+
query_context: "{\"datasource\":{\"id\":54,\"type\":\"table\"},\"force\":false,\"\
118108
queries\":[{\"filters\":[],\"extras\":{\"time_grain_sqla\":\"P1D\",\"having\":\"\
119109
\",\"where\":\"\"},\"applied_time_extras\":{},\"columns\":[\"org\",\"course_key\"\
120110
,\"course_name\",\"course_run\"],\"metrics\":[{\"aggregate\":\"COUNT_DISTINCT\"\
121111
,\"column\":{\"advanced_data_type\":null,\"certification_details\":null,\"certified_by\"\
122-
:null,\"column_name\":\"actor_id\",\"description\":null,\"expression\":null,\"filterable\"\
123-
:true,\"groupby\":true,\"id\":457,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\"\
124-
:null,\"type\":\"STRING\",\"type_generic\":1,\"verbose_name\":null,\"warning_markdown\"\
112+
:null,\"column_name\":\"actor_id\",\"description\":null,\"expression\":\"\",\"filterable\"\
113+
:true,\"groupby\":true,\"id\":538,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\"\
114+
:null,\"type\":\"String\",\"type_generic\":1,\"verbose_name\":null,\"warning_markdown\"\
125115
:null},\"datasourceWarning\":false,\"expressionType\":\"SIMPLE\",\"hasCustomLabel\"\
126116
:true,\"label\":\"Graded Learners\",\"optionName\":\"metric_25t7qgbwxu5_a9fbiaboytw\"\
127-
,\"sqlExpression\":null},{\"aggregate\":\"AVG\",\"column\":{\"advanced_data_type\"\
128-
:null,\"certification_details\":null,\"certified_by\":null,\"column_name\":\"course_grade\"\
129-
,\"description\":null,\"expression\":null,\"filterable\":true,\"groupby\":true,\"\
130-
id\":461,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\":null,\"\
131-
type\":\"FLOAT64\",\"type_generic\":0,\"verbose_name\":null,\"warning_markdown\"\
132-
:null},\"datasourceWarning\":false,\"expressionType\":\"SIMPLE\",\"hasCustomLabel\"\
133-
:true,\"label\":\"Avg Course Grade\",\"optionName\":\"metric_i5mlkxng7kb_5auir2yzvnx\"\
134-
,\"sqlExpression\":null},{\"aggregate\":null,\"column\":null,\"datasourceWarning\"\
135-
:false,\"expressionType\":\"SQL\",\"hasCustomLabel\":true,\"label\":\"Median Course\
136-
\ Grade\",\"optionName\":\"metric_prd604bf33n_j3zxzos2g5\",\"sqlExpression\":\"\
137-
quantile(0.5)(course_grade) \"}],\"orderby\":[[{\"aggregate\":\"COUNT_DISTINCT\"\
138-
,\"column\":{\"advanced_data_type\":null,\"certification_details\":null,\"certified_by\"\
139-
:null,\"column_name\":\"actor_id\",\"description\":null,\"expression\":null,\"filterable\"\
140-
:true,\"groupby\":true,\"id\":457,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\"\
141-
:null,\"type\":\"STRING\",\"type_generic\":1,\"verbose_name\":null,\"warning_markdown\"\
142-
:null},\"datasourceWarning\":false,\"expressionType\":\"SIMPLE\",\"hasCustomLabel\"\
143-
:true,\"label\":\"Graded Learners\",\"optionName\":\"metric_25t7qgbwxu5_a9fbiaboytw\"\
144-
,\"sqlExpression\":null},false]],\"annotation_layers\":[],\"row_limit\":1000,\"\
145-
series_limit\":0,\"order_desc\":true,\"url_params\":{},\"custom_params\":{},\"custom_form_data\"\
146-
:{},\"post_processing\":[]}],\"form_data\":{\"datasource\":\"70__table\",\"viz_type\"\
147-
:\"table\",\"slice_id\":186,\"query_mode\":\"aggregate\",\"groupby\":[\"org\",\"\
148-
course_key\",\"course_name\",\"course_run\"],\"time_grain_sqla\":\"P1D\",\"temporal_columns_lookup\"\
149-
:{},\"metrics\":[{\"aggregate\":\"COUNT_DISTINCT\",\"column\":{\"advanced_data_type\"\
150-
:null,\"certification_details\":null,\"certified_by\":null,\"column_name\":\"actor_id\"\
151-
,\"description\":null,\"expression\":null,\"filterable\":true,\"groupby\":true,\"\
152-
id\":457,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\":null,\"\
153-
type\":\"STRING\",\"type_generic\":1,\"verbose_name\":null,\"warning_markdown\"\
154-
:null},\"datasourceWarning\":false,\"expressionType\":\"SIMPLE\",\"hasCustomLabel\"\
155-
:true,\"label\":\"Graded Learners\",\"optionName\":\"metric_25t7qgbwxu5_a9fbiaboytw\"\
156-
,\"sqlExpression\":null},{\"aggregate\":\"AVG\",\"column\":{\"advanced_data_type\"\
157-
:null,\"certification_details\":null,\"certified_by\":null,\"column_name\":\"course_grade\"\
158-
,\"description\":null,\"expression\":null,\"filterable\":true,\"groupby\":true,\"\
159-
id\":461,\"is_certified\":false,\"is_dttm\":false,\"python_date_format\":null,\"\
160-
type\":\"FLOAT64\",\"type_generic\":0,\"verbose_name\":null,\"warning_markdown\"\
161-
:null},\"datasourceWarning\":false,\"expressionType\":\"SIMPLE\",\"hasCustomLabel\"\
162-
:true,\"label\":\"Avg Course Grade\",\"optionName\":\"metric_i5mlkxng7kb_5auir2yzvnx\"\
163117
,\"sqlExpression\":null},{\"aggregate\":null,\"column\":null,\"datasourceWarning\"\
118+
:false,\"expressionType\":\"SQL\",\"hasCustomLabel\":true,\"label\":\"Avg Course\
119+
\ Grade\",\"optionName\":\"metric_i5mlkxng7kb_5auir2yzvnx\",\"sqlExpression\":\"\
120+
round(AVG(course_grade),2) * 100\"},{\"aggregate\":null,\"column\":null,\"datasourceWarning\"\
164121
:false,\"expressionType\":\"SQL\",\"hasCustomLabel\":true,\"label\":\"Median Course\
165122
\ Grade\",\"optionName\":\"metric_prd604bf33n_j3zxzos2g5\",\"sqlExpression\":\"\
166-
quantile(0.5)(course_grade) \"}],\"all_columns\":[],\"percent_metrics\":[],\"adhoc_filters\"\
167-
:[],\"order_by_cols\":[],\"row_limit\":1000,\"server_page_length\":10,\"order_desc\"\
168-
:true,\"table_timestamp_format\":\"smart_date\",\"show_cell_bars\":true,\"color_pn\"\
169-
:true,\"conditional_formatting\":[{\"colorScheme\":\"#ACE1C4\",\"column\":\"Graded\
170-
\ Learners\",\"operator\":\">\",\"targetValue\":0},{\"colorScheme\":\"#FDE380\"\
171-
,\"column\":\"Avg Course Grade\",\"operator\":\"\u2264 x \u2264\",\"targetValueLeft\"\
172-
:\"0.5\",\"targetValueRight\":\"0.7\"},{\"colorScheme\":\"#EFA1AA\",\"column\":\"\
173-
Avg Course Grade\",\"operator\":\"<\",\"targetValue\":0.5},{\"colorScheme\":\"#ACE1C4\"\
174-
,\"column\":\"Avg Course Grade\",\"operator\":\"\u2265\",\"targetValue\":0.7},{\"\
175-
colorScheme\":\"#ACE1C4\",\"column\":\"Median Course Grade\",\"operator\":\"\u2265\
176-
\",\"targetValue\":0.7},{\"colorScheme\":\"#FDE380\",\"column\":\"Median Course\
177-
\ Grade\",\"operator\":\"\u2264 x \u2264\",\"targetValueLeft\":\"0.5\",\"targetValueRight\"\
178-
:\"0.7\"},{\"colorScheme\":\"#EFA1AA\",\"column\":\"Median Course Grade\",\"operator\"\
179-
:\"<\",\"targetValue\":0.5}],\"extra_form_data\":{},\"dashboards\":[16],\"force\"\
180-
:false,\"result_format\":\"json\",\"result_type\":\"full\"},\"result_format\":\"\
181-
json\",\"result_type\":\"full\"}"
123+
quantile(0.5)(round(course_grade,2) * 100) \"}],\"orderby\":[[{\"aggregate\":\"\
124+
COUNT_DISTINCT\",\"column\":{\"advanced_data_type\":null,\"certification_details\"\
125+
:null,\"certified_by\":null,\"column_name\":\"actor_id\",\"description\":null,\"\
126+
expression\":\"\",\"filterable\":true,\"groupby\":true,\"id\":538,\"is_certified\"\
127+
:false,\"is_dttm\":false,\"python_date_format\":null,\"type\":\"String\",\"type_generic\"\
128+
:1,\"verbose_name\":null,\"warning_markdown\":null},\"datasourceWarning\":false,\"\
129+
expressionType\":\"SIMPLE\",\"hasCustomLabel\":true,\"label\":\"Graded Learners\"\
130+
,\"optionName\":\"metric_25t7qgbwxu5_a9fbiaboytw\",\"sqlExpression\":null},false]],\"\
131+
annotation_layers\":[],\"row_limit\":1000,\"series_limit\":0,\"order_desc\":true,\"\
132+
url_params\":{},\"custom_params\":{},\"custom_form_data\":{},\"post_processing\"\
133+
:[]}],\"form_data\":{\"datasource\":\"54__table\",\"viz_type\":\"table\",\"slice_id\"\
134+
:128,\"query_mode\":\"aggregate\",\"groupby\":[\"org\",\"course_key\",\"course_name\"\
135+
,\"course_run\"],\"time_grain_sqla\":\"P1D\",\"temporal_columns_lookup\":{},\"metrics\"\
136+
:[{\"aggregate\":\"COUNT_DISTINCT\",\"column\":{\"advanced_data_type\":null,\"certification_details\"\
137+
:null,\"certified_by\":null,\"column_name\":\"actor_id\",\"description\":null,\"\
138+
expression\":\"\",\"filterable\":true,\"groupby\":true,\"id\":538,\"is_certified\"\
139+
:false,\"is_dttm\":false,\"python_date_format\":null,\"type\":\"String\",\"type_generic\"\
140+
:1,\"verbose_name\":null,\"warning_markdown\":null},\"datasourceWarning\":false,\"\
141+
expressionType\":\"SIMPLE\",\"hasCustomLabel\":true,\"label\":\"Graded Learners\"\
142+
,\"optionName\":\"metric_25t7qgbwxu5_a9fbiaboytw\",\"sqlExpression\":null},{\"aggregate\"\
143+
:null,\"column\":null,\"datasourceWarning\":false,\"expressionType\":\"SQL\",\"\
144+
hasCustomLabel\":true,\"label\":\"Avg Course Grade\",\"optionName\":\"metric_i5mlkxng7kb_5auir2yzvnx\"\
145+
,\"sqlExpression\":\"round(AVG(course_grade),2) * 100\"},{\"aggregate\":null,\"\
146+
column\":null,\"datasourceWarning\":false,\"expressionType\":\"SQL\",\"hasCustomLabel\"\
147+
:true,\"label\":\"Median Course Grade\",\"optionName\":\"metric_prd604bf33n_j3zxzos2g5\"\
148+
,\"sqlExpression\":\"quantile(0.5)(round(course_grade,2) * 100) \"}],\"all_columns\"\
149+
:[],\"percent_metrics\":[],\"adhoc_filters\":[],\"order_by_cols\":[],\"row_limit\"\
150+
:1000,\"server_page_length\":10,\"order_desc\":true,\"table_timestamp_format\":\"\
151+
smart_date\",\"show_cell_bars\":true,\"color_pn\":true,\"column_config\":{\"Avg\
152+
\ Course Grade\":{\"d3NumberFormat\":\"~g\",\"d3SmallNumberFormat\":\"~g\"},\"Median\
153+
\ Course Grade\":{\"d3NumberFormat\":\"~g\",\"d3SmallNumberFormat\":\"~g\"}},\"\
154+
conditional_formatting\":[{\"colorScheme\":\"#ACE1C4\",\"column\":\"Graded Learners\"\
155+
,\"operator\":\">\",\"targetValue\":0},{\"colorScheme\":\"#FDE380\",\"column\":\"\
156+
Avg Course Grade\",\"operator\":\"\u2264 x \u2264\",\"targetValueLeft\":\"50\",\"\
157+
targetValueRight\":\"70\"},{\"colorScheme\":\"#EFA1AA\",\"column\":\"Avg Course\
158+
\ Grade\",\"operator\":\"<\",\"targetValue\":50},{\"colorScheme\":\"#ACE1C4\",\"\
159+
column\":\"Avg Course Grade\",\"operator\":\"\u2265\",\"targetValue\":70},{\"colorScheme\"\
160+
:\"#ACE1C4\",\"column\":\"Median Course Grade\",\"operator\":\"\u2265\",\"targetValue\"\
161+
:70},{\"colorScheme\":\"#FDE380\",\"column\":\"Median Course Grade\",\"operator\"\
162+
:\"\u2264 x \u2264\",\"targetValueLeft\":\"50\",\"targetValueRight\":\"70\"},{\"\
163+
colorScheme\":\"#EFA1AA\",\"column\":\"Median Course Grade\",\"operator\":\"<\"\
164+
,\"targetValue\":50}],\"extra_form_data\":{},\"dashboards\":[9],\"force\":false,\"\
165+
result_format\":\"json\",\"result_type\":\"full\"},\"result_format\":\"json\",\"\
166+
result_type\":\"full\"}"
182167
slice_name: Course Information
183168
uuid: fa249dda-78da-4ccc-9ef3-39177e6aae0c
184169
version: 1.0.0

0 commit comments

Comments
 (0)