appsembler / figures

Reporting and data retrieval app for Open edX
MIT License
44 stars 37 forks source link

Enrollment Metrics Rework #214

Closed johnbaldwin closed 4 years ago

johnbaldwin commented 4 years ago

Added new figures.pipeline.enrollment_metrics module to conditionally retrieve progress data from the platform depending on the states of StudentModule and LearnerCourseGradeMetrics models for the given CourseEnrollment

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 this

The existing get_average_progress method is renamed to get_average_progress_deprecated instead of just deleting it. This is so we have the code available in production to support troubleshooting and validation

The individual commits, commit messages and inline documentation should explain details for this PR

johnbaldwin commented 4 years ago

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:


    most_recent_lcgm = LearnerCourseGradeMetrics.objects.filter(
        user=course_enrollment.user,
        course_id=str(course_enrollment.course_id)).order_by('date_for').last()
johnbaldwin commented 4 years ago

Fixed the pylint failure. Looks like an issue with pylint-django: https://github.com/PyCQA/pylint-django/issues/165