webservice MDL-17135 display function descriptions into the function form

This commit is contained in:
jerome mouneyrac 2009-11-09 06:30:01 +00:00
parent cd7a789181
commit 44610991bf

View 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');