Find the courses a user has certs for up front.
Before this commit, we had to do a separate query for every course a user was enrolled in when determining whether a course was refundable (if you have a certificate, it isn't). Now the student dashboard will make a one-time query to grab all of a user's cert-issued courses. This is indexed, so it should be much faster than grabbing each one separately.
Showing
- common/djangoapps/student/models.py 25 additions, 5 deletionscommon/djangoapps/student/models.py
- common/djangoapps/student/tests/test_refunds.py 11 additions, 1 deletioncommon/djangoapps/student/tests/test_refunds.py
- common/djangoapps/student/views.py 7 additions, 2 deletionscommon/djangoapps/student/views.py
- lms/djangoapps/certificates/models.py 17 additions, 0 deletionslms/djangoapps/certificates/models.py
- lms/djangoapps/certificates/tests/tests.py 36 additions, 0 deletionslms/djangoapps/certificates/tests/tests.py
Loading
Please register or sign in to comment