Moodle Mobile Custom App Site URL

Re: Moodle Mobile Custom App Site URL

by Mustafa Ameen -
Number of replies: 15

Hi Juan,

The same problem is happening with my customisation. The URL is not picked up when logging in and the default language is not activated. Can you please help and check what is wrong?

My repo is at https://github.com/mustafaameen/moodlemobile-alamthal.git, (android) branch

Thank you.

Mustafa

In reply to Mustafa Ameen

Re: Moodle Mobile Custom App Site URL

by Joel Freire -
Two difficulties:

1 - In the tutorial tells me to change the "value widget ID (com.moodle.mooblemobile) But I do not know where you get this personal ID.
2 - I put the SiteURL in the configuration file, but the app keeps asking to enter URL to open.



In reply to Joel Freire

Re: Moodle Mobile Custom App Site URL

by Manjunath Moodle -

Hi Joel,

 1. widget id in config.xml is same as app_id in config.json. In your case - com.leoneconnect.emobile

 2. You can make site url entry in config.json like this (You can insert it after presets item). Change moodle site url as required.

     "siteurl": "http://leoneconnect.net/elearning",

  Hope it helps.

In reply to Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

by Joel Freire -

What is this widget id? I'm making one, do not know where I get it!

In reply to Joel Freire

Re: Moodle Mobile Custom App Site URL

by Manjunath Moodle -

Joel,

  This is just a unique namespace for your app (like package names in java).  Normal practice is to use the reverse of your lms website domain name.  

In reply to Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

by Joel Freire -
I understand, but how would my ID, if the address of my moodle is www.institutowallon.com.br/ead?


What I really need is that my app go straight to the university page. And do not ask the user to enter the url

In reply to Joel Freire

Re: Moodle Mobile Custom App Site URL

by Manjunath Moodle -

I am sorry if I confused you. Widget ID & site url are separate things & there is no relation between them.

I see your widget id(in your repo) as 'com.institutowallon.moodlemobile".  This is fine.  Based on the lms url you have given, it can be 'br.com.institutowallon.moodlemobile'.  With the former, issue of conflict may come when someone who owns this institutowallon.com website develops app with same widget id as yours.


As per the site url, you can specify it like this in config.json file.  This will bypass site url prompt screen

"siteurl": "http://institutowallon.com.br/ead/",

In reply to Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

by Joel Freire -

Manjunath Moodle friend, I like you guided me, but the app continues to enter the first screen asking inform site url. I need to open the app, it already go straight to the moodle login screen.


I appreciate the help you have given me!

In reply to Joel Freire

Re: Moodle Mobile Custom App Site URL

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

Hi Joe,

are you using ionic serve to view the app in the browser?, Changes in the config.json file are processed via the gulp task.

Juan

In reply to Juan Leyva

Re: Moodle Mobile Custom App Site URL

by Benjamin Gomez -

Hi Juan,


Can you give me more details to change the config.json to process via the gulp task?


I have the same problem to change the default site.


thanks

In reply to Benjamin Gomez

Re: Moodle Mobile Custom App Site URL

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

Hi,

I think everything required is explained here:

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

what's your exact problem?

Regards, Juan

In reply to Juan Leyva

Re: Moodle Mobile Custom App Site URL

by Deepak B S -

Hi Juan,

I have made the customization according to the directions given. The Logo, Screen and Name has changed. Now i have a requirement which i cant figure out: -  to change the page which asks for site url. I want the app to directly land at the login page of the moodle site.

I have edited the config,json

Here is the Code.

================================

    "app_id" : "com.moodle.elms",

    "appname": "ELMS",

    "versioncode" : "2017",

    "versionname" : "3.2.0",

    "cache_expiration_time" : 300000,

    "default_lang" : "en",

    "languages": {"ar": "عربي", "bg": "Български", "ca": "Català", "cs": "Čeština", "da": "Dansk", "de": "Deutsch","en": "English", "es": "Español", "es-mx": "Español - México", "eu": "Euskara", "fa": "فارسی", "fr" : "Français", "he" : "עברית", "hu": "magyar", "it": "Italiano", "ja": "日本語","nl": "Nederlands", "pl": "Polski", "pt-br": "Português - Brasil", "pt": "Português - Portugal", "ro": "Română", "ru": "Русский", "sv": "Svenska", "tr" : "Türkçe", "zh-cn" : "简体中文", "zh-tw" : "正體中文"},

    "wsservice" : "moodle_mobile_app",

    "wsextservice" : "local_mobile",

    "gcmpn": "694767596569",

    "customurlscheme": "moodlemobile",

"presets" : {"url": "http://elms.mysite.in/moodle/login/index.php", "username": ""},

    "siteurl": "http://elms.mysite.in/moodle/login/index.php",

"skipssoconfirmation": "false",

    "forcedefaultlanguage": "false"

======================================

Can u guide me on what changes to make to automatically redirect to the login page.

Please Guide.

In reply to Deepak B S

Re: Moodle Mobile Custom App Site URL

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

Hi,

your config file seems to be fine, the siteurl is the only thing you need to force a site URL.

Maybe you are not rebuilding correctly the project? check that you don't see any errors when you run ionic serve (or when you execute gulp)

Juan

Average of ratings: Useful (1)
In reply to Juan Leyva

Svar: Re: Moodle Mobile Custom App Site URL

by Patrik Lindqvist -

Hi Juan

I'm having the same problem. When the app is rebuilt (no errors) and tested I get to the first page where to put in the url for the site instead of straight to the login. I use the same code as Deepak. Is this a common problem or is there some sort of solution? Please advice how to proceed.

{
"app_id" : "com.fotokurs-online.mobile",
"appname": "Fotokurs by Mästerfoto",
"versioncode" : "20170",
"versionname" : "1.0",
"cache_expiration_time" : 300000,
"default_lang" : "sv",
"languages": {"ar": "عربي", "bg": "Български", "ca": "Català", "cs": "Čeština", "da": "Dansk", "de": "Deutsch","en": "English", "es": "Español", "es-mx": "Español - México", "eu": "Euskara", "fa": "فارسی", "fr" : "Français", "he" : "עברית", "hu": "magyar", "it": "Italiano", "ja": "日本語","nl": "Nederlands", "pl": "Polski", "pt-br": "Português - Brasil", "pt": "Português - Portugal", "ro": "Română", "ru": "Русский", "sv": "Svenska", "tr" : "Türkçe", "zh-cn" : "简体中文", "zh-tw" : "正體中文"},
"wsservice" : "moodle_mobile_app",
"wsextservice" : "local_mobile",
"gcmpn": "694767596569",
"customurlscheme": "moodlemobile",
"presets" : {"url": "http://www.fotokurs-online.se/login/index.php", "username": ""},
"siteurl": "http://www.fotokurs-online.se/login/index.php",
"skipssoconfirmation": "false",
"forcedefaultlanguage": "false",
"privacypolicy": "https://moodle.org/mod/page/view.php?id=8148"

}

Regards, Patrik

In reply to Patrik Lindqvist

Re: Svar: Re: Moodle Mobile Custom App Site URL

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

Hi,

Unfortunately our core team do not have the resources here to help people use the open source code version to build custom apps. We provide a service where we can customise the app for anyone who needs it including the Push notifications (Airnotifier) service management. This service helps fund the improvement of the app in general: https://moodle.com/mobileapp/

I’d recommend you to check the documentation links that are available in the Forum main page or hopefully somebody else in this forum will be able to help you.

Juan