Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Grade settings modules

From MoodleDocs
Revision as of 05:07, 22 January 2010 by Andrew Davis (talk | contribs)

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.


Moodle 2.0


Executive Summary

Module grade settings should be provided and stored in a central location rather than being handled by each individual module.

  1. Reduce duplicate code - Requiring each module to be aware of grading settings leads to unnecessary duplication of grading code.
  1. Allow centralized grading - Shifting all grade related settings into the grade tables makes it easier to provide a centralized marking UI.

Database structures

New tables to be created

blah

description

table of table columns

The following columns need to be migrated to the new system then removed.

  1. assignment - grade
  1. quiz - grademethod

Grades API

class moodleform_mod()

in course/moodleform_mod.php

the following new method will be added

standard_coursemodule_grading_elements()

Similar to standard_coursemodule_elements(). Adds elements to a private instance of moodle form. A new method is being added rather than adding grading elements to those already output by standard_coursemodule_elements() to allow the grading elements to appear near the top, just below the General section, rather than at the bottom of the settings with the other standard elements. The assignment and quiz modules in 1.9 have their grade settings at the top and shifting them to the bottom would be unexpected and inconvenient for users.