echo $OUTPUT->heading($service->name); $mform->display(); echo $OUTPUT->footer(); die; } break; case 'delete': $PAGE->navbar->add(get_string('removefunction', 'webservice')); /// Delete function operation if (confirm_sesskey() and $service and empty($service->component)) { //check that the function to remove exists $function = $webservicemanager->get_external_function_by_id($functionid, MUST_EXIST); //display confirmation page if (!$confirm) { echo $OUTPUT->header(); echo $renderer->admin_remove_service_function_confirmation($function, $service); echo $OUTPUT->footer(); die; } //or remove the function from the service, then redirect to the function list $webservicemanager->remove_external_function_from_service($function->name, $service->id); redirect($functionlisturl); } break; } /// OUTPUT function list page echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('addservicefunction', 'webservice', $service->name)); $functions = $webservicemanager->get_external_functions(array($service->id)); echo $renderer->admin_service_function_list($functions, $service); echo $OUTPUT->footer();