MDL-10829 Added get_idnumber() for both category and item classes

This commit is contained in:
nicolasconnault 2007-08-13 18:34:57 +00:00
parent 681666abe7
commit be7c069360
2 changed files with 19 additions and 0 deletions

View File

@ -939,6 +939,16 @@ class grade_category extends grade_object {
return $this->grade_item->get_sortorder();
}
/**
* Returns the idnumber of the associated grade_item. This method is also available in
* grade_item, for cases where the object type is not known.
* @return string idnumber
*/
function get_idnumber() {
$this->load_grade_item();
return $this->grade_item->get_idnumber();
}
/**
* Sets sortorder variable for this category.
* This method is also available in grade_item, for cases where the object type is not know.

View File

@ -1018,6 +1018,15 @@ class grade_item extends grade_object {
return $this->sortorder;
}
/**
* Returns the idnumber of this grade_item. This method is also available in
* grade_category, for cases where the object type is not know.
* @return string idnumber
*/
function get_idnumber() {
return $this->idnumber;
}
/**
* Sets the sortorder of this grade_item. This method is also available in
* grade_category, for cases where the object type is not know.