Skip to content

Commit

Permalink
create studentmodulehistoryextended under external/irx models
Browse files Browse the repository at this point in the history
  • Loading branch information
rachellougee committed Feb 6, 2025
1 parent daeca36 commit f43c936
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/ol_dbt/models/external/irx/mitx/_irx_mitx__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,32 @@ models:
description: int, display_tag_filter_strategy
- name: consecutive_days_visit_count
description: int, consecutive_days_visit_count

- name: irx__mitx__openedx__mysql__courseware_studentmodulehistoryextended
description: history of studentmodule in Residential MITx open edx platform
config:
grants:
select: ['mit_irx']
columns:
- name: user_id
description: int, reference user id in auth_user
- name: course_id
description: str, Open edX Course ID in the format course-v1:{org}+{course code}+{run_tag}
- name: module_id
description: str, block ID for a distinct piece of content in a course, referencing
course_structure
- name: module_type
description: str, category/type of the block, referencing course_structure.
- name: state_data
description: str, JSON text indicating the learner's state for the corresponding
module such as course, chapter, problemset, sequential, videosequence, etc.
- name: grade
description: str, floating point value indicating the total unweighted grade for
this problem that the learner has scored. e.g. how many responses they got right
within the problem.
- name: max_grade
description: str, floating point value indicating the total possible unweighted
grade for this problem, or basically the number of responses that are in this
problem.
- name: created
description: timestamp, datetime when this row was created
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
with studentmodulehistoryextended as (
select * from {{ ref('stg__mitxresidential__openedx__courseware_studentmodulehistoryextended') }}
)

, studentmodule as (
select * from {{ ref('stg__mitxresidential__openedx__courseware_studentmodule') }}
)

select
studentmodule.courserun_readable_id as course_id
, studentmodule.user_id
, studentmodule.coursestructure_block_id as module_id
, studentmodule.coursestructure_block_category as module_type
, studentmodulehistoryextended.studentmodule_state_data as state_data
, studentmodulehistoryextended.studentmodule_problem_grade as grade
, studentmodulehistoryextended.studentmodule_problem_max_grade as max_grade
, studentmodulehistoryextended.studentmodule_created_on as created
from studentmodulehistoryextended
inner join studentmodule on studentmodulehistoryextended.studentmodule_id = studentmodule.studentmodule_id

0 comments on commit f43c936

Please sign in to comment.