Skip to content

Commit

Permalink
SAK-33713 - BigDemical divide can result in ArithmeticException: Non-…
Browse files Browse the repository at this point in the history
…terminating decimal expansion (sakaiproject#5105)
  • Loading branch information
jonespm authored and ottenhoff committed Dec 11, 2017
1 parent 7abd753 commit 5e4ee34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3710,7 +3710,7 @@ private void convertGradePointsForUpdatedTotalPoints(final Gradebook gradebook,
for (AssignmentGradeRecord gr : gradeRecords) {
if (gr.getPointsEarned() != null) {
final BigDecimal scoreAsPercentage = (new BigDecimal(gr.getPointsEarned())
.divide(new BigDecimal(originalPointsPossible)))
.divide(new BigDecimal(originalPointsPossible), GradebookService.MATH_CONTEXT))
.multiply(new BigDecimal(100));

final Double scaledScore = calculateEquivalentPointValueForPercent(
Expand Down

0 comments on commit 5e4ee34

Please sign in to comment.