Skip to content

Commit

Permalink
Merge pull request sakaiproject#808 from lorenamgUMU/SAM-2567
Browse files Browse the repository at this point in the history
SAM-2567 Stack trace when exporting assessment results which have unanswered calculated questions
  • Loading branch information
ottenhoff committed Jul 6, 2015
2 parents e969fcc + 7343750 commit e8e3f72
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ private void getCalculatedQuestionScores(List<ItemGradingData> scores, Histogram
results.put(INCORRECT, Integer.valueOf(0));

for (ItemGradingData score : scores) {
if (score.getAutoScore() > 0) {
if (score.getAutoScore() != null && score.getAutoScore() > 0) {
Integer value = results.get(CORRECT);
results.put(CORRECT, ++value);
} else {
Expand Down Expand Up @@ -1866,7 +1866,7 @@ private void getCalculatedQuestionScores(List<ItemGradingData> scores, Histogram
// us a count of assessmnets that had an incorrect answer
Set<Long> assessmentQuestionIncorrect = new HashSet<Long>();
for (ItemGradingData score : scores) {
if (score.getAutoScore() == 0) {
if (score.getAutoScore() == null || score.getAutoScore() == 0) {
assessmentQuestionIncorrect.add(score.getAssessmentGradingId());
}
}
Expand Down

0 comments on commit e8e3f72

Please sign in to comment.