diff --git a/admin/webservice/forms.php b/admin/webservice/forms.php index dab9a42f661..5185b9bf323 100644 --- a/admin/webservice/forms.php +++ b/admin/webservice/forms.php @@ -160,7 +160,7 @@ class external_service_functions_form extends moodleform { $functions[$functionid] = $function->name . ':' . $function->description; } - $mform->addElement('searchableselector', 'fid', get_string('name'), + $mform->addElement('searchableselector', 'fids', get_string('name'), $functions, array('multiple')); $mform->addElement('hidden', 'id'); diff --git a/admin/webservice/service_functions.php b/admin/webservice/service_functions.php index d4f7da8ac16..fc0e8869a24 100644 --- a/admin/webservice/service_functions.php +++ b/admin/webservice/service_functions.php @@ -67,7 +67,7 @@ switch ($action) { //add the function to the service then redirect to function list page if ($data = $mform->get_data()) { ignore_user_abort(true); // no interruption here! - foreach ($data->fid as $fid) { + foreach ($data->fids as $fid) { $function = $webservicemanager->get_external_function_by_id( $fid, MUST_EXIST); // make sure the function is not there yet