From 8c772ad78fde839e451a632d49ab5ba07ac78d95 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 1 Oct 2009 21:53:58 +0000 Subject: [PATCH] MDL-12886 updating groups external API --- group/externallib.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/group/externallib.php b/group/externallib.php index d287af37f5..57ba8d90a4 100644 --- a/group/externallib.php +++ b/group/externallib.php @@ -80,7 +80,17 @@ class moodle_group_external extends external_api { } public static function get_groups_parameters() { - //TODO + return new external_function_parameters( + array( + 'groups' => new external_multiple_structure( + new external_single_structure( + array( + 'groupid' => new external_param(PARAM_INT, 'Group ID') + ) + ) + ) + ) + ); } /** @@ -112,7 +122,16 @@ class moodle_group_external extends external_api { } public static function get_groups_returns() { - //TODO + return new external_multiple_structure( + new external_single_structure( + array( + 'id' => new external_param(PARAM_INT, 'some group id'), + 'name' => new external_param(PARAM_TEXT, 'multilang compatible name, course unique'), + 'description' => new external_param(PARAM_RAW, 'just some text'), + 'enrolmentkey' => new external_param(PARAM_RAW, 'group enrol secret phrase') + ) + ) + ); } public static function delete_groups_parameters() { -- 2.39.5