Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 51 additions & 8 deletions general/app/development/link-handling/app-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,36 @@ tags:
When a user presses a link in the Moodle app, the behaviour changes depending on whether the URL is supported by the app or not:

- If the URL belongs to the same site and it's supported by the app, then the app will try to open the corresponding page. For example if the user presses a link to an assignment, then the assignment will be opened inside the app rather than opening a browser.
- If it's a URL pointing to an external site or it's a URL not supported by the app, then it will be opened in an external browser. This can also be configured to [open in an embedded browser](#opening-links-in-an-embedded-browser). For example admin settings aren't supported by the app, so clicking a link to an admin settings page will open the page in an external browser.
- If it's a URL pointing to an external site or it's a URL not supported by the app, then it will be opened in an external browser. This can also be configured to [open in an embedded browser](#opening-links-in-an-embedded-browser-or-in-an-iframe). For example admin settings aren't supported by the app, so clicking a link to an admin settings page will open the page in an external browser.
- If it's a URL pointing to a local file it will be opened with an external app in Android, and an embedded viewer in iOS. For example opening a PDF within a SCORM package would open a PDF reader in Android or and embedded PDF viewer in iOS.
- If the link is inside an iframe (and is not pointing to a local file), it will be opened within the same iframe. This behaviour can be changed by setting the link's `target` attribute to anything other than `_self`, in which case the URL will be opened in an external browser. For example, clicking a link with a `target="_blank"` attribute would open the URL in an external browser.

## Extending the list of supported URLs {/* #extending-the-list-of-supported-urls */}

The app has a defined list of supported URLs. If you have a plugin adapted to work in the app and you want to support links to your plugin you will need to create a Link Handler. For more information and examples about this, please see the [CoreContentLinksDelegate](../plugins-development-guide/api-reference.md#corecontentlinksdelegate) documentation.

## Opening links in an embedded browser {/* #opening-links-in-an-embedded-browser */}
## Opening links in an embedded browser or in an iframe {/* #opening-links-in-an-embedded-browser-or-in-an-iframe */}
Comment thread
dpalou marked this conversation as resolved.

To open a link in an embedded browser instead of an external browser you can use the `data-open-in` attribute:
To change how links are opened in the app you can use the `data-app-open-in` attribute:

```html
<a href="https://domain.com" data-open-in="app">
<a href="https://domain.com" data-app-open-in="inappbrowser">
```

Possible values are:

- `inappbrowser`: Opens the link in an embedded browser instead of external browser.
- `embedded`: Displays the site inside the app, using an iframe. Only works in Moodle app 5.2 or later.
- Any other value: Opens the link in external browser (e.g. Chrome or Safari).

:::note[Notice]
Please notice that students cannot add data attributes to HTML elements when using the Moodle editor, only teachers and users with the right permissions are able to add them.
:::

:::note[Notice]
Please notice that the `data-app-open-in` name will only work in Moodle app 5.2 or later. In previous versions, the name was `data-open-in`, which is deprecated.
:::

## Adding links to any HTML element {/* #adding-links-to-any-html-element */}

Using the `data-app-url` attribute you can also add a link to any HTML element. This link will only be used when the element is clicked in the app, it won't affect the behaviour when using a browser.
Expand All @@ -55,16 +65,16 @@ When the link above is clicked in browser it will open `https://domain.com`, but

The behaviour can be customised with the following data attributes:

- `data-open-in`: Set it to "app" to open the page in an embedded browser instead of the system browser.
- `data-app-url-confirm`: A confirmation message to be displayed before opening the browser.
- `data-app-url-resume-action`: Set it to "refresh" to update the course page when the user goes back to the app. Right now this only works in the course page, but in the future it might be added to other pages.
- `data-app-open-in`: To change how the link is opened in the app. Please see [Opening links in an embedded browser or in an iframe](#opening-links-in-an-embedded-browser-or-in-an-iframe) to view the possible values.
- `data-app-url-confirm`: A confirmation message to be displayed before opening the link.
- `data-app-url-resume-action`: Set it to "refresh" to update the course page when the user goes back to the app. Right now this only works in the course page, but in the future it might be added to other pages. It only works for embedded browser or system browser, it doesn't work if `data-app-open-in="embedded"`.

An example using all the attributes:

```html
<button
data-app-url="https://anotherdomain.com"
data-open-in="app"
data-app-open-in="inappbrowser"
data-app-url-confirm="You need to enrol to the course in the browser."
data-app-url-resume-action="refresh"
>
Expand All @@ -75,3 +85,36 @@ An example using all the attributes:
:::note[Notice]
Please notice that students cannot add data attributes to HTML elements when using the Moodle editor, only teachers and users with the right permissions are able to add them.
:::

## Display alternative content in the app {/* #display-alternative-content-in-the-app */}

In some cases, content that works perfectly in a web browser (Moodle LMS) might not work as intended within the Moodle app. For example, certain iframes or complex embeds. Since the Moodle app version 5.1, you can now provide alternative text or links specifically for app users using two HTML attributes.

To do so, you can use the following attributes:

- `data-app-alt-msg`: The text to display inside the element. If not present, only `data-app-alt-url` will be displayed.
- `data-app-alt-url`: A clickable URL that appears after the message text.

This `data-app-alt-url` attribute can be combined with any data attribute explained in [Adding links to any HTML element](#adding-links-to-any-html-element): `data-app-open-in`, `data-app-url-confirm` and `data-app-url-resume-action`.

Since Moodle app 5.2 you can also use the following attributes:

- `data-app-alt-url-type`: Set it to "button" to display a button instead of a link.
- `data-app-alt-url-label`: The text to display in the button or the link. If not set, the URL will be displayed.

An example using several attributes:

```html
<div
data-app-alt-url="https://videourl.com"
data-app-alt-msg="This video is not compatible with the app. Please click the button to open it in a browser."
data-app-alt-url-type="button"
data-app-alt-url-label="Watch video"
>
<iframe src="https://videonotappcompatible.com"></iframe>
</div>
```

:::note[Notice]
Please notice that students cannot add data attributes to HTML elements when using the Moodle editor, only teachers and users with the right permissions are able to add them.
:::
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ If you want to see some real examples, you can find plugins with mobile support
- [ForumNG module](https://github.com/moodleou/moodle-mod_forumng)
- [News block](https://github.com/moodleou/moodle-block_news)

See [the complete list](https://moodle.org/plugins/browse.php?list=award&id=6) to find more, but keep in mind that it may contain some outdated plugins.
See [the complete list](https://docs.moodle.org/en/Plugins_with_mobile_app_support) to find more, but keep in mind that it may contain some outdated plugins.

### Mobile app support award {/* #mobile-app-support-award */}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ Each field in `otherdata` must be a string, number or boolean; it cannot be an o
```

The app will parse the string and it will be available as an array or object.

## I want to display embedded content that requires the Moodle site as referer {/* #i-want-to-display-embedded-content-that-requires-the-moodle-site-as-referer */}

In Moodle 5.2 ([MDL-87082](https://moodle.atlassian.net/browse/MDL-87082)), a new script was added to support embedding content in the app using the Moodle site as the referer. Moodle App 5.2 and later support this script.

To use it in your plugin, there are two different approaches:

1. If you're rendering HTML content using `core-format-text`, the iframe elements that need a referer should have `data-app-site-referer="true"`.

2. If your plugin renders the iframe directly, use `core-iframe` with `addSiteReferer` set to true:

```html ng2
<core-iframe src="<% src %>" [addSiteReferer]="true"></core-iframe>
```
2 changes: 2 additions & 0 deletions general/app_releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ tags:

| **Version name** | **Date** |
|---|---|
| [Moodle App 5.2.1](./app_releases/v5/v5.2.1) | 10 July 2026 |
| [Moodle App 5.2.0](./app_releases/v5/v5.2.0) | 29 May 2026 |
| [Moodle App 5.1.0](./app_releases/v5/v5.1.0) | 9 January 2026 |
| [Moodle App 5.0.0](./app_releases/v5/v5.0.0) | 27 June 2025 |

Expand Down
86 changes: 86 additions & 0 deletions general/app_releases/v5/v5.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: Moodle App 5.2.0 release notes
sidebar_label: Moodle App 5.2.0
tags:
- Moodle App
- Release notes
---

Release date: 29 May 2026

### New Feature {/* #new-feature */}

- [MOBILE-5018](https://moodle.atlassian.net/browse/MOBILE-5018) - Allow adding extra items in the developer settings page to open new pages
- [MOBILE-5005](https://moodle.atlassian.net/browse/MOBILE-5005) - Support new routes added in Moodle 5.2
- [MOBILE-4999](https://moodle.atlassian.net/browse/MOBILE-4999) - Support new Site home and My courses visibility settings
- [MOBILE-4982](https://moodle.atlassian.net/browse/MOBILE-4982) - Allow launching deep link URLs in the webapp using a parameter
- [MOBILE-4919](https://moodle.atlassian.net/browse/MOBILE-4919) - Allow overriding Web Service responses via app configuration
- [MOBILE-4911](https://moodle.atlassian.net/browse/MOBILE-4911) - Allow site plugins to not only add menu items (in the more menu, user menu, user profile) but also HTML content
- [MOBILE-4910](https://moodle.atlassian.net/browse/MOBILE-4910) - Support custom user menu items
- [MOBILE-4874](https://moodle.atlassian.net/browse/MOBILE-4874) - Support the new assign multiple marking

### Task {/* #task */}

- [MOBILE-5030](https://moodle.atlassian.net/browse/MOBILE-5030) - Investigate SQLite storage alternatives for browser testing
- [MOBILE-4979](https://moodle.atlassian.net/browse/MOBILE-4979) - Rename singletons to static classes when appropriate
- [MOBILE-4974](https://moodle.atlassian.net/browse/MOBILE-4974) - Release Moodle App version 5.2.0

### Improvement {/* #improvement */}

- [MOBILE-5054](https://moodle.atlassian.net/browse/MOBILE-5054) - Update to Node 24+ and npm 11+, and add security settings like minimumReleaseAge
- [MOBILE-5033](https://moodle.atlassian.net/browse/MOBILE-5033) - Apply the redirect script solution in videos displayed inside downloaded iframes (e.g. SCORM or H5P)
- [MOBILE-5026](https://moodle.atlassian.net/browse/MOBILE-5026) - Update H5P library to 1.28 in the app
- [MOBILE-5019](https://moodle.atlassian.net/browse/MOBILE-5019) - Open and close dates are displayed twice in BBB in the app
- [MOBILE-5014](https://moodle.atlassian.net/browse/MOBILE-5014) - Add the possibility to add a footer message on the storage manager courses page
- [MOBILE-5013](https://moodle.atlassian.net/browse/MOBILE-5013) - Don't display errors when saving H5P state and statements
- [MOBILE-5011](https://moodle.atlassian.net/browse/MOBILE-5011) - When handling a site url, add a button to add an account on the site chooser modal
- [MOBILE-5010](https://moodle.atlassian.net/browse/MOBILE-5010) - Allow selections that aren't strings in core-combobox
- [MOBILE-5006](https://moodle.atlassian.net/browse/MOBILE-5006) - Add customisations for custom menu items and settings handler
- [MOBILE-5004](https://moodle.atlassian.net/browse/MOBILE-5004) - Add context to copilot reviews
- [MOBILE-5002](https://moodle.atlassian.net/browse/MOBILE-5002) - Create a new alert card component
- [MOBILE-4996](https://moodle.atlassian.net/browse/MOBILE-4996) - Improve unit tests to reduce complexity and improve types
- [MOBILE-4988](https://moodle.atlassian.net/browse/MOBILE-4988) - Create a new CoreCoursePrefetch service
- [MOBILE-4983](https://moodle.atlassian.net/browse/MOBILE-4983) - Detect admin and manager roles
- [MOBILE-4977](https://moodle.atlassian.net/browse/MOBILE-4977) - Remove some overrides for eslint recommended rules
- [MOBILE-4971](https://moodle.atlassian.net/browse/MOBILE-4971) - Provide a way to stop the app from grouping Web Services requests to facilitate debugging
- [MOBILE-4967](https://moodle.atlassian.net/browse/MOBILE-4967) - Add some functions to override features for Workplace app 5.1
- [MOBILE-4961](https://moodle.atlassian.net/browse/MOBILE-4961) - Remove the "Welcome to Moodle" screen that ask if the user is a teacher or student
- [MOBILE-4959](https://moodle.atlassian.net/browse/MOBILE-4959) - Apply consistency to user generated data attributes
- [MOBILE-4948](https://moodle.atlassian.net/browse/MOBILE-4948) - Listen language changes on pipes (specially coreFormatDate)
- [MOBILE-4945](https://moodle.atlassian.net/browse/MOBILE-4945) - Stop closing the app when opening the browser for SSO login
- [MOBILE-4939](https://moodle.atlassian.net/browse/MOBILE-4939) - Support the new can display property returned by core_course_get_course_contents
- [MOBILE-4931](https://moodle.atlassian.net/browse/MOBILE-4931) - Disable collapsible header when there is an active split view
- [MOBILE-4927](https://moodle.atlassian.net/browse/MOBILE-4927) - Replace calls to lib/ajax/service.php with the no-login version
- [MOBILE-4925](https://moodle.atlassian.net/browse/MOBILE-4925) - Use the new redirection script on Moodle LMS to support embedding content that requires a Moodle LMS site referer
- [MOBILE-4920](https://moodle.atlassian.net/browse/MOBILE-4920) - Use new WebService mod_quiz_get_user_quiz_attempts
- [MOBILE-4917](https://moodle.atlassian.net/browse/MOBILE-4917) - Allow to inject remote JavaScript scripts via Moodle LMS settings
- [MOBILE-4912](https://moodle.atlassian.net/browse/MOBILE-4912) - Allow to indicate the order preference for the different elements in the main bottom tabs menu
- [MOBILE-4901](https://moodle.atlassian.net/browse/MOBILE-4901) - Update @ngx-translate to version 17
- [MOBILE-4876](https://moodle.atlassian.net/browse/MOBILE-4876) - If a block is rendered in the app before site plugins are registered, site plugins blocks won't be displayed
- [MOBILE-4875](https://moodle.atlassian.net/browse/MOBILE-4875) - Improve print_behat_tags script to avoid using @app
- [MOBILE-4731](https://moodle.atlassian.net/browse/MOBILE-4731) - Optional address field visibility
- [MOBILE-4332](https://moodle.atlassian.net/browse/MOBILE-4332) - Refresh contact requests automatically when push is received
- [MOBILE-3890](https://moodle.atlassian.net/browse/MOBILE-3890) - Support course forced language in the app interface

### Bug {/* #bug */}

{/* <!-- cspell:disable --> */}

- [MOBILE-5060](https://moodle.atlassian.net/browse/MOBILE-5060) - YouTube videos sometimes not working in iOS 18 or older
- [MOBILE-5058](https://moodle.atlassian.net/browse/MOBILE-5058) - H5P addons are not properly parsed and loaded
- [MOBILE-5024](https://moodle.atlassian.net/browse/MOBILE-5024) - App crashes when the Mobile CSS URL includes plain text data in url function
- [MOBILE-5022](https://moodle.atlassian.net/browse/MOBILE-5022) - Site calendar events are not syncing as expected when site events are deleted but they were previously scheduled on the app
- [MOBILE-5015](https://moodle.atlassian.net/browse/MOBILE-5015) - Angular v20.3.16 causes problems with our core-loading animations
- [MOBILE-4998](https://moodle.atlassian.net/browse/MOBILE-4998) - Site pugin blocks are not re-fetching content when PTR is done
- [MOBILE-4990](https://moodle.atlassian.net/browse/MOBILE-4990) - Quiz - Highest grade issues
- [MOBILE-4987](https://moodle.atlassian.net/browse/MOBILE-4987) - Show completion manual rules in details for teachers
- [MOBILE-4980](https://moodle.atlassian.net/browse/MOBILE-4980) - Don't allow viewing user profile if cannot view it due to moodle/user:viewdetails capability
- [MOBILE-4969](https://moodle.atlassian.net/browse/MOBILE-4969) - Web Service token and private token might be logged on the app if the auto-login WebService fails
- [MOBILE-4966](https://moodle.atlassian.net/browse/MOBILE-4966) - ESLint sometimes crashes with an out of memory error
- [MOBILE-4964](https://moodle.atlassian.net/browse/MOBILE-4964) - Courses list block (course_list) is not behaving consistently with the web version
- [MOBILE-4958](https://moodle.atlassian.net/browse/MOBILE-4958) - The cordova-plugin-advanced-http plugin completely ignores Android network_security_config.xml configuration
- [MOBILE-4941](https://moodle.atlassian.net/browse/MOBILE-4941) - When reading HTTP headers, the app should be case insensitive
- [MOBILE-4923](https://moodle.atlassian.net/browse/MOBILE-4923) - Inserting records in wasm sqlite (webapp) doesn't return the new ID
- [MOBILE-4915](https://moodle.atlassian.net/browse/MOBILE-4915) - Quiz overall feedback not displayed on the app when Marks review option is disabled
- [MOBILE-4907](https://moodle.atlassian.net/browse/MOBILE-4907) - BBB students don't get notified or are automatically let in when the moderator joins a meeting so they get stuck on the app
- [MOBILE-4904](https://moodle.atlassian.net/browse/MOBILE-4904) - Choice module is not displaying the student choice when configured to show anonymous results
13 changes: 13 additions & 0 deletions general/app_releases/v5/v5.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Moodle App 5.2.1 release notes
sidebar_label: Moodle App 5.2.1
tags:
- Moodle App
- Release notes
---

Release date: 10 July 2026

### Security fix {/* #security-fix */}

- [MOBILE-5071](https://moodle.atlassian.net/browse/MOBILE-5071) - Site plugin can read web service tokens from other stored sites
Loading