Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17258 Enable scales to be mapped to numerical grades
  3. MDL-46603

Improve grade_scale class to support mapping to/from points and menu generation.

    XMLWordPrintable

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.7.1
    • BACKEND
    • Gradebook
    • MOODLE_27_STABLE
    • 20

    Description

      The way scales are implemented currently (Moodle 2.7) is that the activity modules each re-implement the logic of retrieving a list of scale items for a given scale and creating a menu from it. The chosen item is then pushed to the gradebook via the "grade_update" method where the grade_item in the gradebook identifies the scale in use. It would be much better if there was a single function responsible for creating a form element that represents a scale. There are other bits of scales logic hard coded in modules such as getting the min and max for a scale, converting a scale item to a points value, getting a list of scale items, getting a normalized grade from a scale item and getting the closest scale item to a value specified in points.

      We should extend grade_scale from the "grade" api to encapsulate all this logic.

      This API needs unit tests.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              damyon Damyon Wiese
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: