I'm trying to add a simple addon to the mobile app (specifically, the moodlemobile2 project). I'm having trouble getting the addon registered, although I can see that it is being loaned into the minified JS asset and I have followed the docs as best as I am able to.
To give you an overview of what I'm trying to do, I'm adding a course content handler module for the mod_zoom feature in the Moodle PHP app. As an example, the "URL" addon under www/addons/mod/url works quite similarly to the one I am trying to add. This component handles displaying URLs under course content.
A few specific questions:
- How can I tell what key/ID the app is requesting when it load the Angular module? There is nothing in the logs to indicate what I should name my new module so that the Moodle system can pick it up. If a handler is not found it simply redirects to "mm_course-modcontent" and displays an error message, and nothing is logged.
- How do I force my new Angular module to be loaded? I noticed that there is a big static list of modules under the course factory in www/core/components/course/services/course.js. Do I need to add my module there?
Other details:
- I am developing on the "mm2" project (https://github.com/moodlehq/moodlemobile2.git)
Thanks in advance. I know this project is being reworked but I'm hoping to get this working in the meantime.