Hello, friends.
I have tried to make my module for mobile app. I don't want to rewrite a mobile app. So that the first of all, I thought to use mod_page for the base of my module to use page's external function. So that I changed the name of 'page' to 'mymod' and changed services.php below. The new module can work on PC, but external link was shown on the smart phone.
What did I miss or make an easy mistake ?
$functions = array(
'mod_mymod_view_mymod' => array(
'classname' => 'mod_page_external',
'methodname' => 'view_page',
'description' => 'Simulate the view.php web interface mymod: trigger events, completion, etc...',
'type' => 'write',
'capabilities' => 'mod/page:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),
'mod_mymod_get_mymods_by_courses' => array(
'classname' => 'mod_page_external',
'methodname' => 'get_pages_by_courses'
'description' => 'Returns a list of mymods in a provided list of courses, if no list is provided all mymods that the user
can view will be returned.',
'type' => 'read',
'capabilities' => 'mod/page:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
),
);