Examples
📄️ Course Formats
You can implement custom course formats using the CoreCourseFormatDelegate:
📄️ Course Modules
You can implement custom course modules using the CoreCourseModuleDelegate.
📄️ Forms
In this example, we are going to see how to display a form and send the data to a Web Service when it's submitted.
📄️ Groups Selector
If you have an activity that uses groups, you may want to implement a group selector to filter the rendered content. There are many ways to achieve this, and we're going to outline some of them in this example.
📄️ Link Handlers
You can create a link handler to intercept what happens when links are clicked using the CoreContentLinksDelegate.
📄️ Prefetch Handlers
CoreCourseModuleDelegate handlers allow you to define a list of offline functions to prefetch a module. However, you might want to create your own prefetch handler to determine what needs to be downloaded. For example, you might need to chain Web Service calls (passing the result of a Web Service request to another), and this cannot be done using offline functions.
📄️ Question Types
You can implement custom question types using the CoreQuestionDelegate:
📄️ Self Enrolment
Using CoreEnrolDelegate handlers you can support enrolment plugins in the app. In this example, we can see how to support a self enrol plugin. You'll need to register a handler in db/mobile.php and return the following JavaScript from the method implementation: