Moodle for mobile

$mmSite: WS function 'bat_grades_overview' is not available, even in compatibility mode.

 
Picture of Daniel Romero
$mmSite: WS function 'bat_grades_overview' is not available, even in compatibility mode.
 

Hello, I am obtaining the following error : $mmSite: WS function 'bat_grades_overview' is not available, even in compatibility mode. while trying to call that webservice which I injected into the MOODLE_OFFICIAL_MOBILE_SERVICE. It used to work before but the only thing I changed was to add the Moodle Additional Features plugin (https://moodle.org/plugins/pluginversions.php?plugin=local_mobile) -> Version 3.2.321


Here is my code from my services.php file of my plugin

<?php
$services = array(
'bat_overview_service' => array( //the name of the web service
'functions' => array ('bat_grades_overview', 'bat_grades_details'), //web service functions of this service
'requiredcapability' => '', //if set, the web service user need this capability to access
//any function of this service. For example: 'some/capability:specified'
'restrictedusers' =>0, //if enabled, the Moodle administrator must link some user to this service
//into the administration
'enabled'=>1, //if enabled, the service can be reachable on a default installation
)
);

$functions = array(
'bat_grades_overview' => array(
'classname' => 'gradereport_batoverview_external',
'methodname' => 'get_grades',
'classpath' => 'grade/report/batoverview/externallib.php',
'description' => 'Get the user/s report grades table for a course',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE, 'bat_overview_service')
),
'bat_grades_details' => array(
'classname' => 'gradereport_batoverview_external',
'methodname' => 'get_grades_details',
'classpath' => 'grade/report/batoverview/externallib.php',
'description' => 'Get the users detailed report',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE, 'bat_overview_service')
)
);

Also, I bumped the version of my plugin in the version.php file and as you can see, my custom 'bat_grades_overview' is second on the list of the official moodle mobile services. 

Would anyone know why I am getting this error? Any help would be appreciated


Edit : I even made a curl request to my web service and got a response.



 
Average of ratings: -
Picture of Daniel Romero
Re: $mmSite: WS function 'bat_grades_overview' is not available, even in compatibility mode.
 

I have fixed the problem. It turned out that there was somehow duplicate functions of 'bat_grades_overview' in the mdl_external_services_functions table in the DB. Deleting the duplicate brought everything back to normal.

 
Average of ratings: -