external functions

Re: external functions

de David Mudrák -
Número de respuestas: 1
Imagen de Core developers Imagen de Documentation writers Imagen de Moodle HQ Imagen de Particularly helpful Moodlers Imagen de Peer reviewers Imagen de Plugin developers Imagen de Plugins guardians Imagen de Testers Imagen de Translators

It took me a while to figure out that in the database the field is 'methodname' not 'name' and the search fails.

There are both "name" and "methodname" fields in that table.

  • The "name" holds the name of your external function. That is the one that is used as a key in the $functions array in the db/services.php file in your plugin.
  • The "methodname" is also defined in that file and it defines the name of the method in the class (defined via the "classname" field) to call to execute this external function.

Please note, there are certain rules / guidelines for naming the external functions - https://docs.moodle.org/dev/Web_service_API_functions#Naming_convention. Your function should have your plugin component name as a prefix - for example something like mod_mywebinar_create_host

En respuesta a David Mudrák

Esta publicación en el foro ha sido borrada

El contenido de esta publicación en el foro ha sido borrado y ya no puede accederse a él.