Part of PLAT-2436, this is an attempt to discover where the StudentModule model and table are read/written, for the purpose of crafting a solution to update its primary key from a signed int to an unsigned bigint.
Direct access to the StudentModule model:
Selects:
- The class dashboard aggregates or selects across many StudentModule rows in single queries in these places:
- https://github.com/edx/edx-platform/blob/master/lms/djangoapps/class_dashboard/dashboard_data.py#L37
- https://github.com/edx/edx-platform/blob/master/lms/djangoapps/class_dashboard/dashboard_data.py#L80
- https://github.com/edx/edx-platform/blob/master/lms/djangoapps/class_dashboard/dashboard_data.py#L109
- https://github.com/edx/edx-platform/blob/master/lms/djangoapps/class_dashboard/dashboard_data.py#L430
- https://github.com/edx/edx-platform/blob/master/lms/djangoapps/class_dashboard/dashboard_data.py#L494
- Direct aggregate SELECT SQL executed here:
- https://github.com/edx/edx-platform/blob/master/openedx/core/lib/xblock_utils/__init__.py#L271
- Comment: "Print out a histogram of grades on a given problem in staff member debug info."
- CourseBlocks
- Gets a single user/course/block row: https://github.com/edx/edx-platform/blob/master/lms/djangoapps/course_blocks/utils.py#L25
- ScoresClient
- Gets multiple user/course/block rows: https://github.com/edx/edx-platform/blob/master/lms/djangoapps/courseware/model_data.py#L952
- Courseware
- The admin site
Writes:
- Instructor enrollment:
- Resets the number of attempts on a problem via
save()
: https://github.com/edx/edx-platform/blob/master/lms/djangoapps/instructor/enrollment.py#L324
- Resets the number of attempts on a problem via
- CourseBlocks
- Courseware
- get_or_create for an individual row, plus a get, plus an update: https://github.com/edx/edx-platform/blob/master/lms/djangoapps/courseware/model_data.py#L993
- The admin site
Deletes:
- The admin site
Caches:
- FieldDataCache: https://github.com/edx/edx-platform/blob/master/lms/djangoapps/courseware/model_data.py#L680
Indirect access to StudentModule:
- LTI forces a publish of a user's score on a problem in these two places, which claims to eventually write to StudentModule:
Special cases:
- Tests that rely on StudentModuleFactory (many)
- BokChoy tests use a cached schema that may need to be taken into consideration:
- Tests that check query counts on these tables: