Development:Grade settings modules: Difference between revisions
Andrew Davis (talk | contribs) No edit summary |
Andrew Davis (talk | contribs) |
||
Line 32: | Line 32: | ||
the following new method will be added | the following new method will be added | ||
==== | ====coursemodule_grading_elements($show_grade=true, $show_grademethod=false)==== | ||
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 | 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 of page, just below the General section. Standard elements are usually added at the bottom of the settings. The assignment and quiz modules in 1.9 have their grade settings at the top and shifting them to the bottom would be unexpected. |
Revision as of 05:36, 22 January 2010
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.
Executive Summary
Module grade settings should be provided and stored in a central location rather than being handled by each individual module.
- Reduce duplicate code - Requiring each module to be aware of grading settings leads to unnecessary duplication of grading code.
- 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.
- assignment - grade
- quiz - grademethod
Grades API
class moodleform_mod()
in course/moodleform_mod.php
the following new method will be added
coursemodule_grading_elements($show_grade=true, $show_grademethod=false)
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 of page, just below the General section. Standard elements are usually added at the bottom of the settings. The assignment and quiz modules in 1.9 have their grade settings at the top and shifting them to the bottom would be unexpected.