Moodle Mobile Custom App Site URL

Moodle Mobile Custom App Site URL

di Bhai Sesay -
Numero di risposte: 25

I am building a custom app and I've followed the instructions given at http://es.slideshare.net/juanleyva/creating-a-custom-moodle-mobile-app-moodle-moot-spain-2014. I was able to use phonegap to compile the .apk file, but I am having problems...

The "Add" button on the home page of the app is not responding when I enter a Site URL.. Please advice

Media dei voti: -
In riposta a Bhai Sesay

Re: Moodle Mobile Custom App Site URL

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine Testers

Hi,

can you share your github repository (where the app is cloned) so I can check what is happening

Cheers, Juan

In riposta a Juan Leyva

Re: Moodle Mobile Custom App Site URL

di Bhai Sesay -

Thanks Juan,

...was away for a few days. Please find it here: https://github.com/bsesay/moodlemobile


In riposta a Bhai Sesay

Re: Moodle Mobile Custom App Site URL

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine Testers

Hi,

your config.json file has some errors, try with this one:


{
"app_id" : "com.leoneconnect.emobile",
"versioncode" : "385",
"versionname" : "1.11",
"cache_expiration_time" : 300000,
"plugins" : ["notifications", "messages", "upload", "events", "myfiles", "contents", "participants", "grades","addcontact", "addnote", "sendmessage", "forum", "label", "url", "page", "resource"],
"wsservice" : "moodle_mobile_app",
"wsextservice" : "local_mobile",
"presets" : {"url": "http://leoneconnect.net/elearning", "username": "bsesay"},
"sync_ws_on" : true,
"sync_css_on" : true,
"sync_cron": 300000,
"log_length" : 100,
"dev_debug": false,
"extra_js": [],
"demo_sites": [],
"notifications_enabled": true,
"gcmpn": "694767596569"
}

In riposta a Juan Leyva

Re: Moodle Mobile Custom App Site URL

di Bhai Sesay -

Thanks Juan,

It worked, but I had to add the Language setting, since it was giving a lang error. Version 1.12 works too. I am now working on the UI.

In riposta a Juan Leyva

Re: Moodle Mobile Custom App Site URL

di Mustafa Ameen -

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 riposta a Mustafa Ameen

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Joel Freire

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

di Joel Freire -

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

In riposta a Joel Freire

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Joel Freire

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Manjunath Moodle

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Joel Freire

Re: Moodle Mobile Custom App Site URL

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine 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 riposta a Juan Leyva

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Benjamin Gomez

Re: Moodle Mobile Custom App Site URL

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine 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 riposta a Juan Leyva

Re: Moodle Mobile Custom App Site URL

di 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 riposta a Deepak B S

Re: Moodle Mobile Custom App Site URL

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine 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

In riposta a Juan Leyva

Svar: Re: Moodle Mobile Custom App Site URL

di 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 riposta a Patrik Lindqvist

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

di Juan Leyva -
Immagine Core developers Immagine Moodle HQ Immagine Plugin developers Immagine 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

In riposta a Bhai Sesay

Re: Moodle Mobile Custom App Site URL (Solved)

di Augusto Santos -

Enter the link of your site in the file

build/mm.bundle.js

Is at the end of the file, are the same lines as the file config.json