Moodle
  1. Moodle
  2. MDL-13827

Letter Grades are calculated using decimal numbers when 0 dec pl. have been specified. - resulting in conflicting values where rounding occurs.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a bug
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      9357

      Description

      Where 0 decimal places have been specified at the site level (this is not configurable at a course level?) and a letter grade is shown - the letter grade seems to be calculated from the underlying decimal value rather than the rounded number shown. This leads to erroneous letter grades being shown.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          hello,
          the grade calculation is similar to Excel - the calculations are always done with 5 decimals precision, the options for decimal places are there only for display (like in Excel).
          If you need any rounding of values you need to use calculation formula with round() function.

          Petr

          Show
          Petr Škoda added a comment - hello, the grade calculation is similar to Excel - the calculations are always done with 5 decimals precision, the options for decimal places are there only for display (like in Excel). If you need any rounding of values you need to use calculation formula with round() function. Petr
          Hide
          Helen Foster added a comment -

          Hi Lael,

          Thanks for raising this issue. To hopefully avoid confusion in future, it has been noted in the documentation:

          http://docs.moodle.org/en/Grade_letters
          http://docs.moodle.org/en/Grade_item_settings
          http://docs.moodle.org/en/Grade_items

          Show
          Helen Foster added a comment - Hi Lael, Thanks for raising this issue. To hopefully avoid confusion in future, it has been noted in the documentation: http://docs.moodle.org/en/Grade_letters http://docs.moodle.org/en/Grade_item_settings http://docs.moodle.org/en/Grade_items
          Hide
          Lael... added a comment -

          Thanks Helen and Peter,

          to clarify - that means creating a calculated item and rounding off the total to achieve the result?, then assigning that as the full weighted item for the parent category?

          I will have a go at this and see. I suspect most people don't really want letter grades calculated to five decimal places though? perhaps there might be a way to include another option for this in the gradebook setup? (to avoid everyone re-doing the same calculation and work-around?)

          Show
          Lael... added a comment - Thanks Helen and Peter, to clarify - that means creating a calculated item and rounding off the total to achieve the result?, then assigning that as the full weighted item for the parent category? I will have a go at this and see. I suspect most people don't really want letter grades calculated to five decimal places though? perhaps there might be a way to include another option for this in the gradebook setup? (to avoid everyone re-doing the same calculation and work-around?)
          Hide
          Petr Škoda added a comment -

          Unfortunately there is no easy way around this without adding new db field in grade_items table and making the rounding configurable for each item

          Show
          Petr Škoda added a comment - Unfortunately there is no easy way around this without adding new db field in grade_items table and making the rounding configurable for each item
          Hide
          Lael... added a comment -

          Hey,

          This is still an issue - but I just had an epiphany on this issue. If we could allow users to set a grade cut off as a decimal, then this ceases to be an issue (eg set it to 90.5 if you want a 90.6 to round up... which I suspect is how most people deal with such an issue).

          Possible?

          Show
          Lael... added a comment - Hey, This is still an issue - but I just had an epiphany on this issue. If we could allow users to set a grade cut off as a decimal, then this ceases to be an issue (eg set it to 90.5 if you want a 90.6 to round up... which I suspect is how most people deal with such an issue). Possible?

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: