How to pre-populate and hide site URL entry page?

Re: How to pre-populate and hide site URL entry page?

by Juan Leyva -
Number of replies: 3
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

we are working in adding a new setting in the config.json file (prepopulatedurl) so the app can detect that and omit the first screen.

Is something we have in the short-term roadmap.

Regards, Juan

In reply to Juan Leyva

Re: How to pre-populate and hide site URL entry page?

by Aron Kondoro -

Hi,

I have a similar problem as indicated in this thread, but none of the solutions provided so far seem to work. Any help would be appreciated.

Thanks in advance.

In reply to Aron Kondoro

Re: How to pre-populate and hide site URL entry page?

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

if you fork using the latest master code (or synchronize your fork), now we support adding a fixed URL just adding a new setting in the config.json file:

siteurl: "https://yoursite.com"

The updated tutorial is linked from here:

https://docs.moodle.org/dev/Moodle_Mobile_custom_apps

Juan

In reply to Juan Leyva

Re: How to pre-populate and hide site URL entry page?

by Yezi Yang -

Dear Juan,

Thank you very much for your reply. I add “siteurl:”https://mysite.com”” in config.json file as well as remove the URL of “demo_sites”. However, after I convert the code from Phonegap Build, it still asks users to type in Moodle site URL.

What I do for the code is following:

1. Download the MM2.7 code released in from github in “iOS” branch (https://github.com/moodlehq/moodlemobile-phonegapbuild)

2. Add “siteurl:”https://mysite.com”” in config.json file, and remove the URL of “demo_sites”. The following is a screen shot of the config.json file after I do the changes. Also I use the Moodle official demo site as the pre-populated URL.
3. Then I convert the code in Phonegap Build, as I always do for Moodle mobile app 2.3 and 2.5. I convert the app for iOS device. But the app in both of the devices ask users to type in Moodle site URL.


4. According to the PPT you post online, I also need to replace ‘http://mymoodle.com’ with my Moodle site URL in www/core/components/login/main.js. However, when I open the code I download from Github, there is no ‘http://mymoodle.com’.

After do the changes above, I also open the app on Google Chromium browser. It also asks me to type in Moodle URL.


In addition, when checking in Google Chroium developer tool, it has an error, as showing below.



I really appreciate this new function you developed and hope it can work in the Moodle app in my institution. I really looking forward for your reply. Thank you for your support again.


Average of ratings: Useful (1)