AJAX marking block
This page outlines the internal architecture of the AJAX marking block and how to extend it for new types of assignment.
The main lib.php file acts as a base class which holds most of the useful functions. This is extended through inheritance when either ajax.php is accessed (each time an asynchronous request is sent) or html_list.php, providing an object which automatically collects submitted POST data and outputs the desired code once instantiated.
The block is designed to allow new assessment types to be added dynamically. Rach new type will need to provide two files: modulename_grading.php and modulename_grading.js, whic can be placed either in the /block/ajax_marking folder or in the /mod/modulename folder.
To see how these work, take the assignment_grading files as examples.
The php file will need the following functions as a minimum: