Skip to content

in grading, if problem cannot be created, return score as none - #691

Merged
adampalay merged 1 commit into
masterfrom
fix/adam/progress-page
Aug 16, 2013
Merged

in grading, if problem cannot be created, return score as none#691
adampalay merged 1 commit into
masterfrom
fix/adam/progress-page

Conversation

@adampalay

Copy link
Copy Markdown
Contributor

fixes 500's appearing on progress page

https://edx-wiki.atlassian.net/browse/LMS-919

@cpennington

@chrisndodge

Copy link
Copy Markdown
Contributor

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.

@adampalay

Copy link
Copy Markdown
Contributor Author

@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

@adampalay

Copy link
Copy Markdown
Contributor Author

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

@cpennington

Copy link
Copy Markdown
Contributor

👍

@sarina

sarina commented Aug 16, 2013

Copy link
Copy Markdown
Contributor

👍

adampalay added a commit that referenced this pull request Aug 16, 2013
in grading, if problem cannot be created, return score as none
@adampalay
adampalay merged commit 321fc36 into master Aug 16, 2013
@adampalay
adampalay deleted the fix/adam/progress-page branch August 16, 2013 14:41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

chrisrossi pushed a commit to jazkarta/edx-platform that referenced this pull request Mar 31, 2014
jenkins-ks pushed a commit to nttks/edx-platform that referenced this pull request Apr 19, 2016
e-kolpakov referenced this pull request in open-craft/openedx-platform Jun 22, 2016
caesar2164 pushed a commit to caesar2164/edx-platform that referenced this pull request May 11, 2018
* edunext/dro/report_scores:
  Add flag for include grades of all graded sections
andrey-canon pushed a commit to eduNEXT/edx-platform that referenced this pull request May 30, 2018
…p-final-grade-if-zero

Proversity/fix stop final grade if zero
Sujeet1379 pushed a commit to chandrudev/edx-platform that referenced this pull request Nov 17, 2022
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants