in grading, if problem cannot be created, return score as none - #691
Conversation
|
Not to complicate the fix, but do we know why the problem cannot be created? I'm concerned were going to introduce code which "fails silently" and we won't know that there's a courseware problem. |
|
@cdodge , grades.py:get_score handles problems with the always_recalculate_grades field (peergrading, foldit) separately than it handles problems with that field set to False. It runs create_module on both of their problem_descriptors, which calls module_renders' get_module_for descriptor, which then calls get_module_for_descriptor_internal, which will return None if a student shouldn't have access to it. Now, for problems where always_recalculate_grades is set to False--which is most problems--we check to see if create_module returns None, and if so, we return (None, None). For problems where always_recalculate_grades is set to True, don't catch that case. Because these problems are much rarer, it explains why we may not have noticed things earlier. For problems that do not have the always_recalculate_grades field, if module_creator(problem_descriptor) return s |
|
For context, we were seeing these errors on peergrading questions that were public but not to be released until like 2020. Peergrading has always_recalculate_grades set to True |
|
👍 |
|
👍 |
in grading, if problem cannot be created, return score as none
There was a problem hiding this comment.
Is it worth at least logging a WARNING level in our app logs here? Is module_createor() returning None a common case or an exception case?
Thanks for your explanation earlier, but I'm still not sure how often we should expect this to be None...
Feature/victor/anon deep links
Bulk course delete management command
* edunext/dro/report_scores: Add flag for include grades of all graded sections
…p-final-grade-if-zero Proversity/fix stop final grade if zero
Co-authored-by: Renovate Bot <bot@renovateapp.com>
fixes 500's appearing on progress page
https://edx-wiki.atlassian.net/browse/LMS-919
@cpennington