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

Public Member Functions

 cancel ()
 copy ($raterid, $itemid)
 validate_grading_element ($elementvalue)
 get_rubric_filling ($force=false)
 update ($data)
 get_grade ()
 render_grading_element ($page, $gradingformelement)

Protected Attributes

 $rubric

Detailed Description

Class to manage one rubric grading instance. Stores information and performs actions like update, copy, validate, submit, etc.

Definition at line 655 of file lib.php.


Member Function Documentation

cancel ( )

Deletes this (INCOMPLETE) instance from database.

Reimplemented from gradingform_instance.

Definition at line 662 of file lib.php.

Here is the call graph for this function:

copy ( raterid,
itemid 
)

Duplicates the instance before editing (optionally substitutes raterid and/or itemid with the specified values)

Parameters:
int$rateridvalue for raterid in the duplicate
int$itemidvalue for itemid in the duplicate
Returns:
int id of the new instance

Reimplemented from gradingform_instance.

Definition at line 676 of file lib.php.

Here is the call graph for this function:

get_grade ( )

Calculates the grade to be pushed to the gradebook

Returns:
int the valid grade from $this->get_controller()->get_grade_range()

Reimplemented from gradingform_instance.

Definition at line 770 of file lib.php.

Here is the call graph for this function:

get_rubric_filling ( force = false)

Retrieves from DB and returns the data how this rubric was filled

Parameters:
boolean$forcewhether to force DB query even if the data is cached
Returns:
array

Definition at line 714 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

render_grading_element ( page,
gradingformelement 
)

Returns html for form element of type 'grading'.

Parameters:
moodle_page$page
MoodleQuickForm_grading$formelement
Returns:
string

Reimplemented from gradingform_instance.

Definition at line 800 of file lib.php.

Here is the call graph for this function:

update ( data)

Updates the instance with the data received from grading form. This function may be called via AJAX when grading is not yet completed, so it does not change the status of the instance.

Parameters:
array$data

Reimplemented from gradingform_instance.

Definition at line 733 of file lib.php.

Here is the call graph for this function:

validate_grading_element ( elementvalue)

Validates that rubric is fully completed and contains valid grade on each criterion

Parameters:
array$elementvaluevalue of element as came in form submit
Returns:
boolean true if the form data is validated and contains no errors

Reimplemented from gradingform_instance.

Definition at line 694 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$rubric [protected]

Definition at line 657 of file lib.php.


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