-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enrollment Metrics Rework #214
Conversation
This module processes data to provide course enrollment metrics. Course enrollment is a unique learner/course pair. See the source code in this commit for documentation
- Added `course_enrollments_for_course` - Added `student_modules_for_course_enrollment` This is to support the course progress pipeline performance improvement code restructuring. The purpose of adding these functions is to move forward with using `figures.sites` as the source of platform data. To note, there are a number of places in the code that do not follow this. As we rework Figures, we will refactor code to use `figures.sites` instead of directly querying the platform models. Note the function name change from the existing functions. We are moving away from using the `get_` prefix for the site functions.
…work - Updated figures.pipeline.course_daily_metrics loader to use the new enrollment pipeline code - Renamed `get_average_progress` to `get_average_progress_deprecated` and retained if needed to help debug the new enrollment metrics - Updated tests to support these changes
60ff839
to
3d82184
Compare
I need to look into this. Pylint seems to think that the queryset is a list https://travis-ci.org/github/appsembler/figures/jobs/686429867#L665 The code it complains about is this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @johnbaldwin. I need to take another look at it. It's not a tiny code, so I could use some hints from you in the Logic
section.
# Logic | ||
|
||
``` | ||
for each learner+course |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great section! Would you mind adding references in the logic to which function I should take a look at e.g.
for each learner+course | |
for each learner+course # see `main` function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
Edit: After trying this out, I decided to be sparse with referencing which functions get called and focused on readability
get newest lgcm record | ||
get newest sm record | ||
|
||
if not lcgm and not sm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not lcgm and not sm | |
if not lcgm and not sm # see `func_123` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnbaldwin I didn't have the time to review all the test, but I'm approving you since the logic changes makes total sense, and it's well documented.
Thanks! Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in a position to test this locally, but the logic here looks good. Hopefully this speeds up the nightly grade calculation.
… (no-member)" See: pylint-dev/pylint-django#165 Also updated documentation for enrollment metrics
975a341
to
d40dc78
Compare
Fixed the pylint failure. Looks like an issue with pylint-django: pylint-dev/pylint-django#165 |
Added new
figures.pipeline.enrollment_metrics
module to conditionally retrieve progress data from the platform depending on the states ofStudentModule
andLearnerCourseGradeMetrics
models for the givenCourseEnrollment
Running
CourseGradeFactory().read(..)
is costly and needed to retrieve dynamic grades when persistent grades is not enabled or supported (as is the case with Ginkgo). This PR addresses thisThe existing
get_average_progress
method is renamed toget_average_progress_deprecated
instead of just deleting it. This is so we have the code available in production to support troubleshooting and validationThe individual commits, commit messages and inline documentation should explain details for this PR