Filters: Moodle App link

filter_applink
Maintained by Picture of Dani PalouDani Palou
With this plugin you can easily create links to open the Moodle App (or your custom app if you have one).
14 sites
32 downloads
1 fans
Moodle 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7

Introduction

With this plugin you can easily create links to open the Moodle App (or your custom app if you have one). You only need to specify the URL that you want to be opened (e.g. a course URL) and the filter will automatically create the URL to launch the app.

You can also specify if you want to use a certain username in the app.

This filter will be applied when the user navigates using a browser, but not when the user navigates using the app (the app is already open, you don't need to open it with a link).


To Install it manually

  • Unzip the plugin in the moodle .../filter/ directory.
  • Enable it from "Site Administration >> Plugins >> Filters >> Manage filters".


To Use it

You need to add the attribute "data-app-link" to the links that you want to convert to a link to open the app:

<a href="https://domain.com/course/view.php?id=2" data-app-link>Click me</a>

If no value is assigned to data-app-link, the default URL scheme will be used. The default scheme can be changed in "Site Administration >> Plugins >> Filters >> Moodle App link". Leaving this setting empty will use the official Moodle app scheme: "moodlemobile".

If you want to force a scheme only for a certain link you can do it like this:

<a href="https://domain.com/course/view.php?id=2" data-app-link="myscheme">Click me</a>


Add a username

By default, no username will be added to the URL. This means that, if there are several users from that site stored in the app, the app will use the one that's currently logged in. If there is no user currently logged in, the user will have to choose which account does he want to use to open the link.

You can specify a username so the app will force to use that user. If there are several users from that site stored in the app, the app will always use the user you specified. In case that user is not stored, the user will be sent to the credentials screen and the username will be prepopulated.

You can force to use a certain username, like this:

<a href="https://domain.com/course/view.php?id=2" data-app-link data-username="john.smith">Click me</a>

If data-username is left empty, the filter will automatically add the username of the user that's viewing the link:

<a href="https://domain.com/course/view.php?id=2" data-app-link data-username>Click me</a>

In the example above, the app will be opened with the same user I'm using in browser.


Atto plugin

There is another plugin to be able to apply this filter using an Atto button: Moodle App link Filter for Atto


See also

Open the Moodle app from another app

Sets

This plugin is part of set Moodle Mobile app.

Screenshots

Screenshot #0

Contributors

Picture of Dani Palou
Dani Palou (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
Please login to post comments