From 2e93dfe051bc68a8a0f0a0e37a5dd5a52cb7d5e8 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 c145848c5..2afa5d7cb 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1369,3 +1369,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 85e85a18098306cd3e82aea857e8b5ed5bc0f482 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 2afa5d7cb..235840955 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1371,20 +1371,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 @@ -1396,4 +1398,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 9aaa59f3a0a09f91a9608a68ba93ea16084a7b6e 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 5ab251632b0fb7e1bfb116a8a11b20053389b03c 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 435bb328c9e63a41c82248f82ddf48172349aaf2 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 725f9703fec4f6e14cf6019128ddd3b364bbac9c 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 7ccaceb9e51d72fe17d529ac86b30a55dddc32bd 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 2568e22db578721f5ed0cd61e67476a8231e77f8 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 2da39d07afa6bfea51384dd7bae1e11a3249a1a3 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 235840955..7508e6f75 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1388,7 +1388,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 d40104a8284320e63f3b5865bf3a2a0b2f90a1e6 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 7508e6f75..3c9c4f179 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1390,9 +1390,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 c8e560a9936bd58cebcb9a163217dc5ac8abc8cd 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 3c9c4f179..f861fb46b 100644 --- a/src/ol_dbt/models/reporting/_reporting__models.yml +++ b/src/ol_dbt/models/reporting/_reporting__models.yml @@ -1394,7 +1394,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