diff --git a/lib/grade/grade_category.php b/lib/grade/grade_category.php index 5ab5293d03d..70cc6fc9f60 100644 --- a/lib/grade/grade_category.php +++ b/lib/grade/grade_category.php @@ -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. diff --git a/lib/grade/grade_item.php b/lib/grade/grade_item.php index 31dade871e2..5d7b58c5057 100644 --- a/lib/grade/grade_item.php +++ b/lib/grade/grade_item.php @@ -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.