]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11443 Added groups_get_grouping_name to match groups_get_group_name
authorsam_marshall <sam_marshall>
Tue, 25 Sep 2007 15:52:33 +0000 (15:52 +0000)
committersam_marshall <sam_marshall>
Tue, 25 Sep 2007 15:52:33 +0000 (15:52 +0000)
lib/grouplib.php

index 5adde3dd336859f143f69a1faeab18a612fa6fd4..5ac4902d843906618c107b2c73c3944bb599758f 100644 (file)
@@ -35,6 +35,15 @@ function groups_get_group_name($groupid) {
     return get_field('groups', 'name', 'id', $groupid);
 }
 
+/**
+ * Gets the name of a grouping with a specified id
+ * @param int $groupingid The id of the grouping
+ * @return string The name of the grouping
+ */
+function groups_get_grouping_name($groupingid) {
+    return get_field('groupings', 'name', 'id', $groupingid);
+}
+
 /**
  * Returns the groupid of a group with the name specified for the course.
  * Group names should be unique in course