Note:

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

Grade settings modules: Difference between revisions

From MoodleDocs
No edit summary
Line 5: Line 5:
== Executive Summary ==
== Executive Summary ==


Module grade settings should be provided and stored in a central location rather than being handled by each individual module.
Module grade settings should be provided and stored in a central location rather than being handled by each individual module. In the UI, grade settings should appear in their own section provided by grade library.


# '''Reduce duplicate code''' - Requiring each module to be aware of grading settings leads to unnecessary duplication of grading code.
# '''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.
# '''Allow centralized grading''' - Shifting all grade related settings into the grade tables makes it easier to provide a centralized marking UI.
==Interface==
[[Image:UpdatingAssignmentUI.gif]]


== Database structures ==
== Database structures ==

Revision as of 05:59, 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.


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. In the UI, grade settings should appear in their own section provided by grade library.

  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.

Interface

UpdatingAssignmentUI.gif

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

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.