Moodle for mobile

Moodle Mobile

 
 
Picture of edem Koami
Moodle Mobile
 

Hi, I am a final year student working on a mobile version of Moodle as my final year project. I would like to know how which service i have to use to retrieve information from my school Moodle database. Please i need help and if possible a data flow diagram that explains how it works.

 
Average of ratings: -
Picture of Juan Leyva
Re: Moodle Mobile
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Edem,

here you have information about how to create a web service client:

http://docs.moodle.org/dev/Creating_a_web_service_client

And the list of availavable webservices can be consulted here (by version):

http://docs.moodle.org/dev/Web_services_Roadmap

Here you have also sample code in different languages:

https://github.com/moodlehq/sample-ws-clients

Regards

 
Average of ratings: -
Picture of Edem Agbenyo
Token is invalid
 

I have read the link you provided and i have found them very useful to the progress of my project. Now i have been able to set up a moodle site. i have also set up the moodle mobile and have been able to connect it to the site. 

Now i want to be able to use the plugin that allow student to get their grades on the mobile application. I have set it up using the information on this page:http://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial

But everytime a user try to get his grade, i receive the warning: we lost connection, you need to reconnect. Your token is now invalid.

Please What is wrong with my installation? How do i make a token available for all the plugin that i am using. Hope to get a reply soon. Thank you

 
Average of ratings: -
Picture of Juan Leyva
Re: Token is invalid
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Are you still having that issue?

 
Average of ratings: -
Picture of y h
Re: Token is invalid
 

I have the same issue, "everytime a user try to get his grade, i receive the warning: we lost connection, you need to reconnect". Can you please tell me how you solved the problem?

Thanks in advance.

 
Average of ratings: -
Picture of Aleksandra Markovic
Re: Moodle Mobile
 

I have  error when i create service. I have in browser json when i test ,i have this msg on mobile devices "we lost connection, you need to reconnect. Your token is now invalid."

 
Average of ratings: -
Khyam Shahzad
Re: Moodle Mobile
 

I am also getting the same error message with Moodle Mobile 1.4 custom web services. Moodle version is 2.6.3. 

 
Average of ratings: -
Picture of Isaac Marco Blancas
Re: Moodle Mobile
 

The same problem here when following the http://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial

Mi moodle versión is 2.6.2+ with the Moodle Mobile 1.4.2

The test with the client works OK (/local/custommm/client/client.php)

I can login the app, I open a course and I click "Grades". All the activities are loaded but when I click one I get the message:

we lost connection, you need to reconnect. Your token is now invalid.

and after two seconds it goes to a black page with a pop-up:

Uncaught TypeError: Cannot read property 'id' of null

File: http://192.168.1.38/moodlemobile/lib/mm.cache.js
Line: 50

 
Average of ratings: -
Picture of Isaac Marco Blancas
shortname with null value in mdl_external_services table
 

I was able to solve my "we lost connection, you need to reconnect. Your token is now invalid" problem. There was several questions...

  • I was not changing the wsservice paran in the config.json
  • I just added one function (local_custommm_get_grades) in the new "custommm" external service and is required to add all the functions Moodle include in the prebuilt "Moodle mobile web service" because we are not going to use this one.
  • Finally the column shortname is been inserted with a null value when I create a new Custom External Webservice. Moodle does not display this value and it is required to know it to update the "wssservice" (config.json) param. Now you can solve it updating the column on the database.
    update mdl_external_services set shortname='custommm' where name='custommm';
    I think the last problem is a bug but I don't find nothing related on the bug trucker. Can you reproduce it?
 
Average of ratings: -
Picture of Juan Leyva
Re: shortname with null value in mdl_external_services table
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi,

yes, this is all explained here:

http://docs.moodle.org/dev/Moodle_Mobile_Developing_a_plugin_tutorial

I will update the FAQs anyway to point to that problem

Regards

 
Average of ratings: -
Picture of Isaac Marco Blancas
Re: shortname with null value in mdl_external_services table
 

Hello Juan. If you wish I could make some modifications in this tutorial. It was the tutorial I followed and know it is fresh in my memory.

By other hand... Do you think it is a BUG the problem with the shortname when creating a new webservice? Should I open an issue?

 
Average of ratings: -
Picture of Juan Leyva
Re: shortname with null value in mdl_external_services table
 
Average of ratings: -
Picture of Isaac Marco Blancas
Re: shortname with null value in mdl_external_services table
 

Thank you Juan. Now I see it.

 
Average of ratings: -