Problems when creating custom webservice

Problems when creating custom webservice

by Ivan Aibar Romero -
Number of replies: 1

Hi,

I'm getting a lot of problems while creating my custom webservice.

The main problem I'm having is at the time I'm deleting the webservice folder (located on "local" folder as I read on the documentation) it seems that Moodle doesn't completely delete all files from my webservice and then affects all the other webservices with this problem: "Can not find file with external function implementation".

Is there any method to delete safely these custom webservices?

Also, Is there any way that I can update my function code of the custom and Moodle detects that update?

Sorry for my english.

Average of ratings: -
In reply to Ivan Aibar Romero

Re: Problems when creating custom webservice

by Jérôme Mouneyrac -

Hi Ivan,

try to delete the plugin properly from Admin > Plugins > Local plugins > Manage local plugins. I would expect the uninstall process to delete the web service functions from the database. However if uninstalling the plugin from the admin still cause the error then write a tracker issue, it's a bug.

If you just want to remove the web service functions from a plugin, then you must bump the version.php of your plugin. It will trigger the upgrade process that will update Moodle web service functions (i.e. delete your previously existing local web service functions from Moodle database).

Cheers,
Jerome