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.
Moodle for mobile
here you have information about how to create a web service client:
And the list of availavable webservices can be consulted here (by version):
Here you have also sample code in different languages:
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
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."
I am also getting the same error message with Moodle Mobile 1.4 custom web services. Moodle version is 2.6.3.
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
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?
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?