Skip to main content

90 docs tagged with "Moodle App"

View All Tags

Acceptance testing for the Moodle App

In order to run tests that carry out automated functionality testing for the Moodle App, you can write Acceptance tests. This can be useful if you want to test plugins that are compatible with the app, or you're contributing to the app core. Behat tests for the app work the same way as tests for Moodle core, but they are not run as part of a normal Behat execution and there are some differences that we'll go through in this page.

Continuous Integration for the Moodle App

Tests can be useful during development, but a good test suite really shines with CI processes in place. Running tests and other checks on a regular basis can be helpful to maintain good quality assurance, and catch regressions as early as possible.

Course Formats

You can implement custom course formats using the CoreCourseFormatDelegate:

Course Modules

You can implement custom course modules using the CoreCourseModuleDelegate.

Custom Moodle Apps

Unfortunately, the core team does not have the resources to help people use the open source code to build custom apps.

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.

Moodle App

Welcome to the Moodle App developer documentation!

Moodle App Development Guide

This document contains information that developers should know before starting to code on the Mobile App. If you are only interested in developing a site plugin, you should read the Moodle App Plugins development guide instead.

Moodle App Docker Images

Moodle HQ provides a couple of Docker images that contain the Moodle App ready for use. You can search all the available versions in Docker Hub.

Moodle App Overview

The Moodle App is a mobile application that helps users make the best of their Moodle sites on handheld devices. It has some additional features like offline access, and a dedicated interface adapted to mobile. It's focused on student functionality, so you won't find all the features you have on the web for teachers and admins. You can learn more about the features available in the user documentation.

Moodle App Plugins Development Guide

If you want add mobile support to your plugins, you only need to write PHP code. You can also use JavaScript for advanced functionality, but mobile plugins are written the same way as any other Moodle plugin: using PHP and Mustache templates.

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:

Unit testing for the Moodle App

Unit tests are written in JavaScript using Jest. If you want to create a new one, Jest is already configured and you only need to create a file ending with .test.ts within the project. If you're going to do so, remember to follow the file location conventions.

Using the Moodle App in a browser

Browsers are not officially supported by the application in production, but you can use a Chromium-based browser for development if you don't need any native functionality.