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

Grade condition is not computing the grades properly

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_29_STABLE

      Description

      While reviewing MDL-50894 I noticed that the method used to compute the percentage of the grades was not right in the availability condition grade.

      In get_cached_grade_score a few things are wrong:

      1. Assumption that min and max have different values, this is not the case in single item scales.
      2. Using grade_grade.rawgrademin/max, that is not reliable see MDL-46618
      3. Duplicates the code that generates the percentage (grade_format_gradevalue_percentage), which can be a problem as not everyone would assume that in the following example the percentage is 50%, and we might change that later:
        • grademin = 50
        • grademax = 100
        • finalgrade = 75

      The third point is the least important but it's good to consider it.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fred Frédéric Massart
                Participants:
                Component watchers:
                Sam Marshall, Jake Dallimore, Jun Pataleta, Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: