]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12886 updating groups external API
authorskodak <skodak>
Thu, 1 Oct 2009 21:53:58 +0000 (21:53 +0000)
committerskodak <skodak>
Thu, 1 Oct 2009 21:53:58 +0000 (21:53 +0000)
group/externallib.php

index d287af37f5e5bae19b1c3d4f53dae6bc021b2abd..57ba8d90a4f8b353a4c2292391e2311172cd4805 100644 (file)
@@ -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() {