From 3e7074edf743b599fa2d0f1067f7c31298ce55b2 Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 15:30:57 -0400 Subject: [PATCH 01/11] add problem data to instructor reporting ' --- .../models/reporting/_reporting__models.yml | 28 +++++++ .../instructor_module_problems_report.sql | 78 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 src/ol_dbt/models/reporting/instructor_module_problems_report.sql diff --git a/src/ol_dbt/models/reporting/_reporting__models.yml b/src/ol_dbt/models/reporting/_reporting__models.yml index 6bb091fcb..7d36d3e48 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1370,3 +1370,31 @@ models: - name: user_latest_row_desc description: integer, row number indicating the latest row for each user based on application and course run dates + +- name: instructor_module_problems_report + description: A report showing learner problem data for later roll-up at the instructor level. + columns: + - name: user_email + description: string, email address of the user + - name: full_name + description: string, full name of the user + - name: courserun_readable_id + description: string, unique identifier for the course run formatted as course-v1:{org}+{course code}+{run_tag} + - name: section_title + description: string, title of the chapter (section) block within the course + - name: subsection_title + description: string, title of the sequential (subsection) block within the course + - name: problem_name + description: string, name of the problem + - name: attempt + description: int, number of attempt the user made on this problem + - name: success + description: int, whether the attempt was successful 1 or 0 + - name: grade + description: decimal, grade received for this attempt + - name: platform + description: string, name of the platform (e.g. MITx Online, edX.org, xPRO, etc.) + - name: course_title + description: string, title of the course + - name: organization_name + description: string, name of the organization \ No newline at end of file diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql new file mode 100644 index 000000000..2cb89d073 --- /dev/null +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -0,0 +1,78 @@ +with enrollment as ( + select * from {{ ref('tfact_enrollment') }} +) + +, user as ( + select * from {{ ref('dim_user') }} +) + +, course_run as ( + select * from {{ ref('dim_course_run') }} +) + +, problem as ( + select * from {{ ref('dim_problem') }} +) + +, problem_events as ( + select * from {{ ref('tfact_problem_events') }} +) + +, course_content as ( + select * from {{ ref('dim_course_content') }} +) + +, course as ( + select * from {{ ref('dim_course') }} +) + +, organization_courserun as ( + select * from {{ ref('bridge_organization_courserun') }} +) + +, organization as ( + select * from {{ ref('dim_organization') }} +) + +select + user.email as user_email + , user.full_name + , course_run.courserun_readable_id + , section.block_title as section_title + , subsection.block_title as subsection_title + , problem.problem_name + , problem_events.attempt + , problem_events.success + , problem_events.grade + , enrollment.platform + , course.course_title + , organization.organization_name +from enrollment +inner join user + on enrollment.user_fk = user.user_pk +inner join course_run + on enrollment.courserun_fk = course_run.courserun_pk +inner join problem + on course_run.courserun_readable_id = problem.courserun_readable_id +left join problem_events + on + problem.problem_block_pk = problem_events.problem_block_fk + and user.user_pk = problem_events.user_fk +left join course_content as content + on + problem.content_block_fk = content.content_block_pk + and content.is_latest = true +left join course_content as section + on + content.chapter_block_id = section.block_id + and section.is_latest = true +left join course_content as subsection + on + content.sequential_block_id = subsection.block_id + and subsection.is_latest = true +left join course + on course_run.course_fk = course.course_pk +left join organization_courserun + on course_run.courserun_pk = organization_courserun.courserun_fk +left join organization + on organization_courserun.organization_fk = organization.organization_pk From 615a0cc9e741125fc0ed48994eabaf1e8302e55f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:35:43 +0000 Subject: [PATCH 02/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/ol_dbt/models/reporting/_reporting__models.yml | 10 ++++++---- .../reporting/instructor_module_problems_report.sql | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ol_dbt/models/reporting/_reporting__models.yml b/src/ol_dbt/models/reporting/_reporting__models.yml index 7d36d3e48..990d30240 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1372,20 +1372,22 @@ models: on application and course run dates - name: instructor_module_problems_report - description: A report showing learner problem data for later roll-up at the instructor level. + description: A report showing learner problem data for later roll-up at the instructor + level. columns: - name: user_email description: string, email address of the user - name: full_name description: string, full name of the user - name: courserun_readable_id - description: string, unique identifier for the course run formatted as course-v1:{org}+{course code}+{run_tag} + description: string, unique identifier for the course run formatted as course-v1:{org}+{course + code}+{run_tag} - name: section_title description: string, title of the chapter (section) block within the course - name: subsection_title description: string, title of the sequential (subsection) block within the course - name: problem_name - description: string, name of the problem + description: string, name of the problem - name: attempt description: int, number of attempt the user made on this problem - name: success @@ -1397,4 +1399,4 @@ models: - name: course_title description: string, title of the course - name: organization_name - description: string, name of the organization \ No newline at end of file + description: string, name of the organization diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index 2cb89d073..5148a1ad6 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -34,7 +34,7 @@ with enrollment as ( select * from {{ ref('dim_organization') }} ) -select +select user.email as user_email , user.full_name , course_run.courserun_readable_id @@ -55,19 +55,19 @@ inner join course_run inner join problem on course_run.courserun_readable_id = problem.courserun_readable_id left join problem_events - on + on problem.problem_block_pk = problem_events.problem_block_fk and user.user_pk = problem_events.user_fk left join course_content as content - on + on problem.content_block_fk = content.content_block_pk and content.is_latest = true left join course_content as section - on + on content.chapter_block_id = section.block_id and section.is_latest = true left join course_content as subsection - on + on content.sequential_block_id = subsection.block_id and subsection.is_latest = true left join course From 782dcc59fdea9333a7cf3beed10d17d5ce035490 Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:19:03 -0400 Subject: [PATCH 03/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index 5148a1ad6..0871ff8f0 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -8,6 +8,7 @@ with enrollment as ( , course_run as ( select * from {{ ref('dim_course_run') }} + where is_current = true ) , problem as ( From 824a72619bf4b01f4305f279d9f83b1124fa257f Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:20:44 -0400 Subject: [PATCH 04/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index 0871ff8f0..c0e7dfcfd 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -25,6 +25,7 @@ with enrollment as ( , course as ( select * from {{ ref('dim_course') }} + where is_current = true ) , organization_courserun as ( From bf2ec1a61bf944f5e9412da5e0c9058640f6e7d0 Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:20:59 -0400 Subject: [PATCH 05/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index c0e7dfcfd..db5dbf73c 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -55,7 +55,9 @@ inner join user inner join course_run on enrollment.courserun_fk = course_run.courserun_pk inner join problem - on course_run.courserun_readable_id = problem.courserun_readable_id + on + course_run.courserun_readable_id = problem.courserun_readable_id + and course_run.platform = problem.platform left join problem_events on problem.problem_block_pk = problem_events.problem_block_fk From 097012ef47c4207b1288b2b0133e616e02009c94 Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:21:14 -0400 Subject: [PATCH 06/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index db5dbf73c..1085f844a 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -61,6 +61,8 @@ inner join problem left join problem_events on problem.problem_block_pk = problem_events.problem_block_fk + and problem.platform = problem_events.platform + and problem.courserun_readable_id = problem_events.courserun_readable_id and user.user_pk = problem_events.user_fk left join course_content as content on From dbcef010cb9585d68ac35fd5a9cb2d2f1d50727e Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:21:25 -0400 Subject: [PATCH 07/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index 1085f844a..751d283cb 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -71,6 +71,8 @@ left join course_content as content left join course_content as section on content.chapter_block_id = section.block_id + and content.platform = section.platform + and content.courserun_readable_id = section.courserun_readable_id and section.is_latest = true left join course_content as subsection on From 9849c6f6ef14c4185cc14054452ce9853f02790a Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:21:36 -0400 Subject: [PATCH 08/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../models/reporting/instructor_module_problems_report.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql index 751d283cb..68c0bfbe7 100644 --- a/src/ol_dbt/models/reporting/instructor_module_problems_report.sql +++ b/src/ol_dbt/models/reporting/instructor_module_problems_report.sql @@ -77,6 +77,8 @@ left join course_content as section left join course_content as subsection on content.sequential_block_id = subsection.block_id + and content.platform = subsection.platform + and content.courserun_readable_id = subsection.courserun_readable_id and subsection.is_latest = true left join course on course_run.course_fk = course.course_pk From 419479a5858ff7a51826cb061a6151bb78b52cd1 Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:21:46 -0400 Subject: [PATCH 09/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/ol_dbt/models/reporting/_reporting__models.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol_dbt/models/reporting/_reporting__models.yml b/src/ol_dbt/models/reporting/_reporting__models.yml index 990d30240..4544662b6 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1389,7 +1389,7 @@ models: - name: problem_name description: string, name of the problem - name: attempt - description: int, number of attempt the user made on this problem + description: int, attempt number for the user's submission - name: success description: int, whether the attempt was successful 1 or 0 - name: grade From 80b29602938ed55d0071164af8ff41b131101d9e Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:21:56 -0400 Subject: [PATCH 10/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/ol_dbt/models/reporting/_reporting__models.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol_dbt/models/reporting/_reporting__models.yml b/src/ol_dbt/models/reporting/_reporting__models.yml index 4544662b6..c9b8eeee0 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1391,9 +1391,9 @@ models: - name: attempt description: int, attempt number for the user's submission - name: success - description: int, whether the attempt was successful 1 or 0 + description: string, correctness of the attempt (e.g. 'correct' or 'incorrect') - name: grade - description: decimal, grade received for this attempt + description: number, grade received for this attempt - name: platform description: string, name of the platform (e.g. MITx Online, edX.org, xPRO, etc.) - name: course_title From a86ddb5117220420a3c3ee5deb4933c6ca4af76c Mon Sep 17 00:00:00 2001 From: Kate Delaney <134744245+KatelynGit@users.noreply.github.com> Date: Wed, 17 Jun 2026 19:22:03 -0400 Subject: [PATCH 11/11] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/ol_dbt/models/reporting/_reporting__models.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol_dbt/models/reporting/_reporting__models.yml b/src/ol_dbt/models/reporting/_reporting__models.yml index c9b8eeee0..f2b2865bc 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1395,7 +1395,7 @@ models: - name: grade description: number, grade received for this attempt - name: platform - description: string, name of the platform (e.g. MITx Online, edX.org, xPRO, etc.) + description: string, platform code (e.g. mitxonline, mitxpro, edxorg, residential) - name: course_title description: string, title of the course - name: organization_name