Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-23858

Percentage is not calculating correctly when "Show totals excluding hidden items" is selected

    Details

    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      We have a site having the following issues with the gradebook:

      We are looking to calculate categories and totals that contain hidden items. Our default is currently to hide totals that contain hidden items. When we select "Show totals excluding hidden items" we run into calculation errors.

      The attached image is a screen shot of a test student's grades from the student's view.

      In the second category titled, "Homework", we have five grade items. All worth 10 points each. The fifth item is hidden and students have no grades for the grade item. The student has accumulated 27 points so far out of 40. However, the category total is still displaying the range out of 50 and is calculating the 27 out of 50 to get a category percent of 54%. With the grade item hidden, the category should show the range out of 40 and the percentage 67.5% (27/40).

      In addition, once choosing "Show totals excluding hidden items" in the gradebook settings, the course total is now being weighted instead of being the sum of grades like it says in the Categories and items page. The course total should have a range of 0-340 and should add the 257 from the "Test" category and the 27 from the "Homework" category to get a total of 284. 284 points out of 340 equals a 83.5% course total. Instead it is taking the 85.67% earned in "Tests" category and the 54% earned in "Homework" category, adding them together to get 139.67 and then dividing by 2 to get 69.83%. This means that it is weighting each category evenly. However, it should not be weighting at all because sum of grades is selected.

      To conclude, when we selected "Show totals excluding hidden items", it is not excluding the hidden items from the totals and it is weighting categories instead of sum of grades.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  12 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: