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

Public Member Functions

 extend_settings_navigation (settings_navigation $settingsnav, navigation_node $node=null)
 extend_navigation (global_navigation $navigation, navigation_node $node=null)
 update_definition (stdClass $newdefinition, $usermodified=null)
 update_or_check_rubric (stdClass $newdefinition, $usermodified=null, $doupdate=false)
 mark_for_regrade ()
 get_options ()
 get_definition_for_editing ($addemptycriterion=false)
 get_definition_copy (gradingform_controller $target)
 get_formatted_description ()
 get_renderer (moodle_page $page)
 render_preview (moodle_page $page)
 get_or_create_instance ($instanceid, $raterid, $itemid)
 render_grade ($page, $itemid, $gradinginfo, $defaultcontent, $cangrade)
 get_min_max_score ()

Static Public Member Functions

static get_default_options ()
static description_form_field_options ($context)
static sql_search_from_tables ($gdid)
static sql_search_where ($token)

Data Fields

const DISPLAY_EDIT_FULL = 1
const DISPLAY_EDIT_FROZEN = 2
const DISPLAY_PREVIEW = 3
const DISPLAY_PREVIEW_GRADED = 8
const DISPLAY_EVAL = 4
const DISPLAY_EVAL_FROZEN = 5
const DISPLAY_REVIEW = 6
const DISPLAY_VIEW = 7

Protected Member Functions

 load_definition ()
 delete_plugin_definition ()

Detailed Description

This controller encapsulates the rubric grading logic

Definition at line 34 of file lib.php.


Member Function Documentation

delete_plugin_definition ( ) [protected]

Deletes the rubric definition and all the associated information

Reimplemented from gradingform_controller.

Definition at line 524 of file lib.php.

static description_form_field_options ( context) [static]

Options for displaying the rubric description field in the form

Parameters:
object$context
Returns:
array options for the form description field

Definition at line 452 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

extend_navigation ( global_navigation navigation,
navigation_node node = null 
)

Extends the module navigation

This function is called when the context for the page is an activity module with the FEATURE_ADVANCED_GRADING and there is an area with the active grading method set to the given plugin.

Parameters:
global_navigation$navigationglobal_navigation
navigation_node$nodenavigation_node

Reimplemented from gradingform_controller.

Definition at line 78 of file lib.php.

Here is the call graph for this function:

extend_settings_navigation ( settings_navigation settingsnav,
navigation_node node = null 
)

Extends the module settings navigation with the rubric grading settings

This function is called when the context for the page is an activity module with the FEATURE_ADVANCED_GRADING, the user has the permission moodle/grade:managegradingforms and there is an area with the active grading method set to 'rubric'.

Parameters:
settings_navigation$settingsnavsettings_navigation
navigation_node$nodenavigation_node

Reimplemented from gradingform_controller.

Definition at line 63 of file lib.php.

Here is the call graph for this function:

static get_default_options ( ) [static]

Returns the default options for the rubric display

Returns:
array

Definition at line 353 of file lib.php.

Here is the caller graph for this function:

Returns the form definition suitable for cloning into another area

See also:
parent::get_definition_copy()
Parameters:
gradingform_controller$targetthe controller of the new copy
Returns:
stdClass definition structure to pass to the target's update_definition()

Reimplemented from gradingform_controller.

Definition at line 419 of file lib.php.

get_definition_for_editing ( addemptycriterion = false)

Converts the current definition into an object suitable for the editor form's set_data()

Parameters:
boolean$addemptycriterionwhether to add an empty criterion if the rubric is completely empty (just being created)
Returns:
stdClass

Definition at line 389 of file lib.php.

Here is the call graph for this function:

Formats the definition description for display on page

Returns:
string

Reimplemented from gradingform_controller.

Definition at line 466 of file lib.php.

Here is the call graph for this function:

Calculates and returns the possible minimum and maximum score (in points) for this rubric

Returns:
array

Definition at line 631 of file lib.php.

Gets the options of this rubric definition, fills the missing options with default values

Returns:
array

Definition at line 372 of file lib.php.

Here is the caller graph for this function:

get_or_create_instance ( instanceid,
raterid,
itemid 
)

If instanceid is specified and grading instance exists and it is created by this rater for this item, this instance is returned. If there exists a draft for this raterid+itemid, take this draft (this is the change from parent) Otherwise new instance is created for the specified rater and itemid

Parameters:
int$instanceid
int$raterid
int$itemid
Returns:
gradingform_instance

Reimplemented from gradingform_controller.

Definition at line 552 of file lib.php.

Returns the rubric plugin renderer

Parameters:
moodle_page$pagethe target page
Returns:
gradingform_rubric_renderer

Definition at line 491 of file lib.php.

Here is the call graph for this function:

load_definition ( ) [protected]

Loads the rubric form definition if it exists

There is a new array called 'rubric_criteria' appended to the list of parent's definition properties.

Reimplemented from gradingform_controller.

Definition at line 297 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Marks all instances filled with this rubric with the status INSTANCE_STATUS_NEEDUPDATE

Definition at line 283 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

render_grade ( page,
itemid,
gradinginfo,
defaultcontent,
cangrade 
)

Returns html code to be included in student's feedback.

Parameters:
moodle_page$page
int$itemid
array$gradinginforesult of function grade_get_grades
string$defaultcontentdefault string to be returned if no active grading is found
boolean$cangradewhether current user has capability to grade in this context
Returns:
string

Reimplemented from gradingform_controller.

Definition at line 582 of file lib.php.

Returns the HTML code displaying the preview of the grading form

Parameters:
moodle_page$pagethe target page
Returns:
string

Reimplemented from gradingform_controller.

Definition at line 501 of file lib.php.

Here is the call graph for this function:

static sql_search_from_tables ( gdid) [static]

Prepare the part of the search query to append to the FROM statement

Parameters:
string$gdidthe alias of grading_definitions.id column used by the caller
Returns:
string

Reimplemented from gradingform_controller.

Definition at line 594 of file lib.php.

static sql_search_where ( token) [static]

Prepare the parts of the SQL WHERE statement to search for the given token

The returned array cosists of the list of SQL comparions and the list of respective parameters for the comparisons. The returned chunks will be joined with other conditions using the OR operator.

Parameters:
string$tokentoken to search for
Returns:
array

Reimplemented from gradingform_controller.

Definition at line 609 of file lib.php.

update_definition ( stdClass $  newdefinition,
usermodified = null 
)

Saves the rubric definition into the database

See also:
parent::update_definition()
Parameters:
stdClass$newdefinitionrubric definition data as coming from gradingform_rubric_editrubric::get_data()
int | null$usermodifiedoptional userid of the author of the definition, defaults to the current user

Reimplemented from gradingform_controller.

Definition at line 97 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

update_or_check_rubric ( stdClass $  newdefinition,
usermodified = null,
doupdate = false 
)

Either saves the rubric definition into the database or check if it has been changed. Returns the level of changes: 0 - no changes 1 - only texts or criteria sortorders are changed, students probably do not require re-grading 2 - added levels but maximum score on rubric is the same, students still may not require re-grading 3 - removed criteria or added levels or changed number of points, students require re-grading but may be re-graded automatically 4 - removed levels - students require re-grading and not all students may be re-graded automatically 5 - added criteria - all students require manual re-grading

Parameters:
stdClass$newdefinitionrubric definition data as coming from gradingform_rubric_editrubric::get_data()
int | null$usermodifiedoptional userid of the author of the definition, defaults to the current user
boolean$doupdateif true actually updates DB, otherwise performs a check

Definition at line 119 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

Rubric display mode: Preview the rubric design with hidden fields

Definition at line 39 of file lib.php.

const DISPLAY_EDIT_FULL = 1

Rubric display mode: For editing (moderator or teacher creates a rubric)

Definition at line 37 of file lib.php.

const DISPLAY_EVAL = 4

Rubric display mode: For evaluation, enabled (teacher grades a student)

Definition at line 45 of file lib.php.

Rubric display mode: For evaluation, with hidden fields

Definition at line 47 of file lib.php.

const DISPLAY_PREVIEW = 3

Rubric display mode: Preview the rubric design (for person with manage permission)

Definition at line 41 of file lib.php.

Rubric display mode: Preview the rubric (for people being graded)

Definition at line 43 of file lib.php.

const DISPLAY_REVIEW = 6

Rubric display mode: Teacher reviews filled rubric

Definition at line 49 of file lib.php.

const DISPLAY_VIEW = 7

Rubric display mode: Dispaly filled rubric (i.e. students see their grades)

Definition at line 51 of file lib.php.


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