Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-9137 META: Rewrite the entire Gradebook system in Moodle 1.9
  3. MDL-9506

Write core API functions lib/gradelib.php and unit tests

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9
    • 1.8
    • Gradebook
    • None
    • MOODLE_18_STABLE
    • MOODLE_19_STABLE

      http://docs.moodle.org/en/Development:Grades#Core_API_functions

      grade_get_items()
      eg grade_get_items($courseid, $itemname=NULL, $itemtype=NULL, $itemmodule=NULL, $iteminstance=NULL, $itemnumber=NULL, $idnumber=NULL)
      For extracting all the information about what grading items are attached to something. For example, an assignment may want to retrieve all the grade_items for itself, and get three outcome scales in return. This will affect the grading interface.

      grade_create_item()
      To create a new grade_item in case it doesn't exist. This function would be called when a module is created or updated, for example, to ensure grade_item entries exist. It's not essential though - if grades are being added later and a matching grade_item doesn't exist yet, the gradebook will create them on the fly.

      grade_create_category()
      eg grade_create_category(fullname, array of items, aggregation, etc ...) For a given set of items, create a category to group them together (if one doesn't exist yet). Modules may want to do this when they are created. However, the ultimate control is in the gradebook interface itself.

      grade_is_locked($itemtype, $itemmodule, $itemteminstance, $userid=NULL)
      This function will tell a module whether a grade (or grade_item if $userid is not given) is currently locked or not. This is a combination of the actual settings in the grade tables and a check on moodle/course:editgradeswhenlocked. If it's locked to the current use then the module can print a nice message or prevent editing in the module.

            nicolasconnault Nicolas Connault
            dougiamas Martin Dougiamas
            Nobody Nobody
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.