Uploaded image for project: 'Contrib: Gradebook2'
  1. Contrib: Gradebook2
  2. GRBK-774

Calculation issues with equally weighted points based gradebooks

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.4.1, 1.1.5, 1.1.6, 1.2.0, 1.2.1, 1.3.0, 1.3.1
    • Fix Version/s: 1.4.0-a1
    • Component/s: Services
    • Labels:
      None

      Description

      Functional Description: Change the way that equally weighted items in a category are calculated so that they represent a true calculated average and avoid possible repeating fractions.

      Setup:

      Gradebook2 [Points, Weighted Categories]
      Category HW [Weight items equally]
      Grade Items [HW1, HW2, ..., HW6]

      Equal weight will assign an item weight of 1/6, which is a repeating fraction.

      Assign points 8.9995 to one grade item

      The course grade will be "B+ (89.99%)" instead of "A- (90.00%)"

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              mjwenk@ucdavis.edu Michael Wenk added a comment - - edited

              After much analysis and work, change how GB2 deals with equally weighted categories. Its now specific in the sense that equally weighted categories are handled with different code than the rest. Since equally weighted categories are a true average, that's what we do:

              Take the sum of the percent scores for each non EC item in the category and divide that sum by the total number of non EC/Non Excused items.

              We handle extra credit separately and depending on the situation.

              Situation 1 - Normal Category with EC item
              Handle the non EC items normally, and while looping thru the items, for an extra credit item, we calculate its score by taking the percent earned times the weight and adding that to a separate list. After we're done looping, we add the EC score to the non EC score for the total.

              Situation 2 - EC Category with Scaled EC.
              The score is handled the same as the normal case. We sum the graded items earned percentage and divide by the total number of graded items.

              Situation 3 - EC Category without Scaled EC.
              We sum the graded items earned percentage and divide by the total # of items (including non graded items.)

              Non Equally weighted categories are handled exactly like they were before.

              The old code didn't handle EC scaling with a non EC category, so I don't as well. Since it didn't handle this, I am not sure what to do, or if it even makes sense in that context.

              Show
              mjwenk@ucdavis.edu Michael Wenk added a comment - - edited After much analysis and work, change how GB2 deals with equally weighted categories. Its now specific in the sense that equally weighted categories are handled with different code than the rest. Since equally weighted categories are a true average, that's what we do: Take the sum of the percent scores for each non EC item in the category and divide that sum by the total number of non EC/Non Excused items. We handle extra credit separately and depending on the situation. Situation 1 - Normal Category with EC item Handle the non EC items normally, and while looping thru the items, for an extra credit item, we calculate its score by taking the percent earned times the weight and adding that to a separate list. After we're done looping, we add the EC score to the non EC score for the total. Situation 2 - EC Category with Scaled EC. The score is handled the same as the normal case. We sum the graded items earned percentage and divide by the total number of graded items. Situation 3 - EC Category without Scaled EC. We sum the graded items earned percentage and divide by the total # of items (including non graded items.) Non Equally weighted categories are handled exactly like they were before. The old code didn't handle EC scaling with a non EC category, so I don't as well. Since it didn't handle this, I am not sure what to do, or if it even makes sense in that context.
              Hide
              mjwenk@ucdavis.edu Michael Wenk added a comment -

              r71398

              Show
              mjwenk@ucdavis.edu Michael Wenk added a comment - r71398
              Hide
              mjwenk@ucdavis.edu Michael Wenk added a comment -

              r71411 - added some more unit tests

              Show
              mjwenk@ucdavis.edu Michael Wenk added a comment - r71411 - added some more unit tests
              Hide
              mjwenk@ucdavis.edu Michael Wenk added a comment - - edited

              This JIRA substantially changes the grade calculation for Weighted Categories without "Weight items by points" set.

              This JIRA has caused the system to branch depending on whether the UI option "Weight items equally" is set. If "Weight items equally" UI option is set, then it follows the new algorithm. If "Weight items equally" is not set, then it follows the old code.

              Therefore for testing, I would recommend that "Weight items equally" be functionally tested and when "Weight items equally" is not set be regression tested. Both in the case for Weighted Categories without "Weight items by points" set.

              Show
              mjwenk@ucdavis.edu Michael Wenk added a comment - - edited This JIRA substantially changes the grade calculation for Weighted Categories without "Weight items by points" set. This JIRA has caused the system to branch depending on whether the UI option "Weight items equally" is set. If "Weight items equally" UI option is set, then it follows the new algorithm. If "Weight items equally" is not set, then it follows the old code. Therefore for testing, I would recommend that "Weight items equally" be functionally tested and when "Weight items equally" is not set be regression tested. Both in the case for Weighted Categories without "Weight items by points" set.
              Hide
              tamsler Thomas Amsler added a comment -

              QA Testing:
              One gradebook sample setup is:

              • use points gradebook
              • use one category (HW) with equal weighting that has 6 grade items (HW1, ..., HW6)
              • each grade item is worth 10 points
              • For one student, enter 8.9995 for each grade item

              Expected result: Course grade for that student should be "A-"

              Show
              tamsler Thomas Amsler added a comment - QA Testing: One gradebook sample setup is: use points gradebook use one category (HW) with equal weighting that has 6 grade items (HW1, ..., HW6) each grade item is worth 10 points For one student, enter 8.9995 for each grade item Expected result: Course grade for that student should be "A-"
              Hide
              ncwilkison@ucdavis.edu Nancy Wilkison added a comment - - edited

              SmartSite@UCDavis - 2.6.4.2 - Sakai 2.6.2 - Server "ucddev1"
              gb2 ver v1.4.0-a4
              firefox, ie8

              TEST PLAN -
              as I understand it, it looks like x.994/x.9994 instances should round down and x.995/x.9995 (depending on decimal places needed) for items weighted by points or in a weighted category, items equally weighted.
              sites used CCC 123 123 w11 (weighted categories/ items weighted equally) and DDD 123 123 w11 (categories/items weighted by points)

              • tested a variety of scores on 10 and 100 point items, using default grade scale, to verify rounding down and up, based on .xx4, .xx5, .xx6, etc combinations
              • course grades altered as expected, dropping or elevating to the appropriate letter grade(2 decimal grade)

              RESULTS -
              if I tested correctly, it's a PASS

              Show
              ncwilkison@ucdavis.edu Nancy Wilkison added a comment - - edited SmartSite@UCDavis - 2.6.4.2 - Sakai 2.6.2 - Server "ucddev1" gb2 ver v1.4.0-a4 firefox, ie8 TEST PLAN - as I understand it, it looks like x.994/x.9994 instances should round down and x.995/x.9995 (depending on decimal places needed) for items weighted by points or in a weighted category, items equally weighted. sites used CCC 123 123 w11 (weighted categories/ items weighted equally) and DDD 123 123 w11 (categories/items weighted by points) tested a variety of scores on 10 and 100 point items, using default grade scale, to verify rounding down and up, based on .xx4, .xx5, .xx6, etc combinations course grades altered as expected, dropping or elevating to the appropriate letter grade(2 decimal grade) RESULTS - if I tested correctly, it's a PASS
              Hide
              tamsler Thomas Amsler added a comment -

              Based on your description, you have tested it correctly. What do others think?

              Show
              tamsler Thomas Amsler added a comment - Based on your description, you have tested it correctly. What do others think?
              Hide
              davwoods David L. Woods added a comment -

              I think this was tested correctly

              Show
              davwoods David L. Woods added a comment - I think this was tested correctly
              Hide
              ccjon Jon Gorrono added a comment -

              looks to me like Nancy's used some of the numbers we needed....

              Show
              ccjon Jon Gorrono added a comment - looks to me like Nancy's used some of the numbers we needed....

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  tamsler Thomas Amsler
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: