Moodle  2.2.1
http://www.collinsharper.com
moodle1_gradebook_handler Class Reference
Inheritance diagram for moodle1_gradebook_handler:
Collaboration diagram for moodle1_gradebook_handler:

Public Member Functions

 get_paths ()
 on_gradebook_start ()
 process_gradebook_grade_letter (array $data, array $raw)
 process_gradebook_grade_category (array $data, array $raw)
 process_gradebook_grade_item (array $data, array $raw)
 on_gradebook_grade_item_grades_start ()
 on_gradebook_end ()

Protected Member Functions

 process_mod_grade_item (array $data, array $raw)
 process_nonmod_grade_item (array $data, array $raw)
 write_grade_categories ()
 calculate_category_path ($categoryid)
 write_grade_items ()
 write_grade_letters ()

Protected Attributes

 $categoryparent = array()

Detailed Description

Handles the conversion of the gradebook structures in the moodle.xml file

Definition at line 1468 of file handlerlib.php.


Member Function Documentation

calculate_category_path ( categoryid) [protected]

Calculates the path to the grade_category

Moodle 1.9 backup does not store the grade_category's depth and path. This method is used to repopulate this information using the $this->categoryparent values.

Parameters:
int$categoryid
Returns:
array of ids including the categoryid

Definition at line 1615 of file handlerlib.php.

Here is the caller graph for this function:

get_paths ( )

Registers paths

Definition at line 1476 of file handlerlib.php.

Writes the collected information into gradebook.xml

Definition at line 1579 of file handlerlib.php.

Here is the call graph for this function:

Initializes the in-memory structures

This should not be needed actually as the moodle.xml contains just one GRADEBOOK element. But who knows - maybe someone will want to write a mass conversion tool in the future (not me definitely ;-)

Definition at line 1500 of file handlerlib.php.

process_gradebook_grade_category ( array data,
array raw 
)

Processes one GRADE_CATEGORY data

Definition at line 1517 of file handlerlib.php.

process_gradebook_grade_item ( array data,
array raw 
)

Processes one GRADE_ITEM data

Definition at line 1525 of file handlerlib.php.

Here is the call graph for this function:

process_gradebook_grade_letter ( array data,
array raw 
)

Processes one GRADE_LETTER data

In Moodle 1.9, all grade_letters are from course context only. Therefore we put them here.

Definition at line 1510 of file handlerlib.php.

process_mod_grade_item ( array data,
array raw 
) [protected]

Processes one GRADE_ITEM of the type 'mod'

Definition at line 1544 of file handlerlib.php.

Here is the caller graph for this function:

process_nonmod_grade_item ( array data,
array raw 
) [protected]

Processes one GRADE_ITEM of te type 'manual' or 'course' or 'category'

Definition at line 1561 of file handlerlib.php.

Here is the caller graph for this function:

write_grade_categories ( ) [protected]

Writes grade_categories

Definition at line 1593 of file handlerlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

write_grade_items ( ) [protected]

Writes grade_items

Definition at line 1637 of file handlerlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

write_grade_letters ( ) [protected]

Writes grade_letters

Definition at line 1650 of file handlerlib.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$categoryparent = array() [protected]

Definition at line 1471 of file handlerlib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations