How to open a link in Moodle App directly on a phone

How to open a link in Moodle App directly on a phone

by Mahesh Kumar -
Number of replies: 2

Hello, 

We are looking forward to implement Moodle App with our students. However, I would like a way in which when students get an email on their phones with a course link, it directly opens in the Moodle App instead of the device browser.

I have been trying method mention in this link: https://docs.moodle.org/dev/Open_the_Moodle_app_from_another_app 

The sample given in the above link says that this is the format: 


moodlemobile://https://username@domain.com?token=TOKEN&privatetoken=PRIVATETOKEN&redirect=http://domain.com/course/view.php?id=2


And we only need to replace our domain name with our base URL of moodle. But this seems not to work as it does not convert to a link when I hyperlink it with a course link.

Our Moodle version is 3.8 and I am testing this on the latest version of Moodle App.

Average of ratings: -
In reply to Mahesh Kumar

Re: How to open a link in Moodle App directly on a phone

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Mahesh,

I don't understand exactly your problem.

If the problem is that Moodle editor doesn't convert it automatically to a link, that is because it uses a non-standard protocol and it includes links inside it, you will need to make it a link yourself using the anchor HTML tag. That is, you will need to put HTML code like this:

<a href="moodlemobile://https://username@domain.com?token=TOKEN&privatetoken=PRIVATETOKEN&redirect=http://domain.com/course/view.php?id=2">Open the course in the Moodle App</a>

If you're generating that code from PHP then I'm not sure how it's done, but I guess there's a function to create a link.

Cheers,

Dani

In reply to Mahesh Kumar

Ang: How to open a link in Moodle App directly on a phone

by Kenneth Hansen -
Hi Mahesh,

Did you ever find a solution?
I have the same problem. In the notification mails, its asks to open the link in a browser. However, we would also like to be able to redirect to open the link in the Moodle App. This dosen't happen. The link is by the way generated by Moodle, so I guess it does use a standard protocol.

- Kenneth