How to access local plugin functions from moodle mobile without copying all functions from moodle_mobile_app to a custom service

How to access local plugin functions from moodle mobile without copying all functions from moodle_mobile_app to a custom service

by Faramarz Salehpour -
Number of replies: 0
Hi

I am developing a simple plugin for moodle mobile (MM) app. The plugin needs to access a function provided by a local moodle plugin.

I know that I can't add functions to moodle_mobile_app service and I know that I can create my own custom service (let's call it custom_service) with the functions I need and config the mobile app to use custom_service instead of moodle_mobile_app but

  1. Do I need to add all the functions already listed in moodle_mobile_app to custom_service? Is there a way to avoid this redundancy?
  2. AFAIK I cannot set more than a single value for "wsservice” in MM's config.json, or can I?
  3. What are the best practices in cases like this, in general?
I appreciate if someone could please shed some light on my doubts.

Thanks
Average of ratings: -