]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10829 Added get_idnumber() for both category and item classes
authornicolasconnault <nicolasconnault>
Mon, 13 Aug 2007 18:34:57 +0000 (18:34 +0000)
committernicolasconnault <nicolasconnault>
Mon, 13 Aug 2007 18:34:57 +0000 (18:34 +0000)
lib/grade/grade_category.php
lib/grade/grade_item.php

index 5ab5293d03d61db49661e034456819e226120e54..70cc6fc9f602af68e803376a8073ad1123ec6145 100644 (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.
index 31dade871e24a4e8d4a920b88ee4afe1ca63ba0f..5d7b58c50572076a797837cba8c992b63218ccbb 100644 (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.