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

Setting a gradebook grade of 16384 throws an exception

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 12.3
    • Fix Version/s: 12.4, 19.0
    • Component/s: Gradebook
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      To reproduce:

      1. Create a Gradebook in a site with some students and add some assessments
      2. Give a student a grade of 16384.  It should throw an exception (and you may need to correct the score using the old Gradebook or directly against the DB)

      The attached pull request should correct this: entering 16384 should work as expected, and any existing broken Gradebooks should be automatically fixed too.

      Show
      To reproduce: Create a Gradebook in a site with some students and add some assessments Give a student a grade of 16384.  It should throw an exception (and you may need to correct the score using the old Gradebook or directly against the DB) The attached pull request should correct this: entering 16384 should work as expected, and any existing broken Gradebooks should be automatically fixed too.

      Description

      While reviewing SAK-40432, we noticed an edge case that causes an exception when you enter a grade of 16384 into the Gradebook.  The presence of large grades causes a switch in the way the serialization works, but there's an off-by-one error in the code that performs the check.  When this happens, you'll get a "Grade too large" runtime exception.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                heather.valli@duke.edu Heather Valli
                Reporter:
                marktriggs Mark Triggs
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code