How to determine if a resource is accessed using the Moodle Mobile App or not

How to determine if a resource is accessed using the Moodle Mobile App or not

by Renaat Debleu -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I'm the developper of the restriction by language plugin.

This restriction decides if a resource is shown or not depending on:

  • the course language
  • the language in the user profile

It should be great if this plugin knows the language selected in the Moodle Mobile app to restrict resouces.  Is there a way to know in php

  • if a resource is accessed by the Moodle Mobile App or using php?
  • what the selected Moodle Mobile App language is?
Average of ratings: Useful (1)
In reply to Renaat Debleu

Re: How to determine if a resource is accessed using the Moodle Mobile App or not

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello Renaat and thankyou for your useful restriction by language plugin smile 

I'm sure there must be a way to see if a resource is accessed using the Mobile app or not because, as I am sure you will have seen, Juan our mobile developer has made a mobile app availability condition plugin to show or hide resources depending on whether they are accessed from a desktop or the mobile app. So hopefully he will be able to answer this to help you improve your plugin.