From: sam_marshall Date: Tue, 25 Sep 2007 15:52:33 +0000 (+0000) Subject: MDL-11443 Added groups_get_grouping_name to match groups_get_group_name X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4d8e34071516aeabcf4212a5b9007cbcb1f499f2;p=moodle.git MDL-11443 Added groups_get_grouping_name to match groups_get_group_name --- diff --git a/lib/grouplib.php b/lib/grouplib.php index 5adde3dd33..5ac4902d84 100644 --- a/lib/grouplib.php +++ b/lib/grouplib.php @@ -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