]> git.mjollnir.org Git - moodle.git/commitdiff
webservice MDL-17135 display function descriptions into the function form
authorjerome mouneyrac <jerome@moodle.com>
Mon, 9 Nov 2009 06:30:01 +0000 (06:30 +0000)
committerjerome mouneyrac <jerome@moodle.com>
Mon, 9 Nov 2009 06:30:01 +0000 (06:30 +0000)
admin/webservice/forms.php

index 03d206f6d954d8794975b9dedd09dd3a24cd347a..cd386b881c8769a478f3ac557c81a7f452365f3f 100644 (file)
@@ -110,6 +110,12 @@ class external_service_functions_form extends moodleform {
 
         $functions = $DB->get_records_select_menu('external_functions', $select, array('sid'=>$data['id']), 'name', 'id, name');
 
+        //we add the descriptions to the functions
+        foreach ($functions as $functionid => $functionname) {
+            $function = external_function_info($functionname); //retrieve full function information (including the description)
+            $functions[$functionid] = $function->name.':'.$function->description;
+        }
+
         $mform->addElement('searchableselector', 'fid', get_string('name'), $functions);
 
         $mform->addElement('hidden', 'id');