Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41158

Point values of gradebook items created from Tests & Quizzes can have precision errors

    Details

    • 19 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      Steps:

      1. Create a quiz with, say, 3 questions each worth 0.1 points
      2. Create a gradebook category that uses at least one of the drop highest / drop lowest / keep highest features
      3. Create an item in that gradebook category worth 0.3 points
      4. Edit the quiz's gradebook item, adding it to that category

      Symptom:
      The point value doesn't match the existing items, so you get a feedback message indicating the point value doesn't match the maximum of 0.3. Cause we all know that 
      0.1 + 0.1 + 0.1 = 0.30000000000000004
      it's basic arithmetic!

      Solution - when calculating the total point value of a quiz, use BigDecimal

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bbailla2 Brian Baillargeon
                Reporter:
                bbailla2 Brian Baillargeon
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code