Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle Mobile 2 (Ionic 1) Customization: Difference between revisions

From MoodleDocs
Line 12: Line 12:
See [[Moodle_Mobile#Testing_and_developing]]
See [[Moodle_Mobile#Testing_and_developing]]


My recomendation is the local web server.
My recomendation is having a local web server (app and moodle installation under localhost or the same local domain).


You need:
You will need:


* A Moodle installation with WebServices (REST) enabled, see [[Web services]] documentation
* A Moodle installation with WebServices (REST) enabled, see [[Web services]] documentation

Revision as of 16:19, 8 November 2012

Moodle 2.4

Overview

In this document are described the general steps for building your custom Mobile app.

Creating your custom application

Remember that if you want to only change the global styles of the app, you can use an extra CSS file in your Moodle installation without need to compile again the app.

Development environment

See Moodle_Mobile#Testing_and_developing

My recomendation is having a local web server (app and moodle installation under localhost or the same local domain).

You will need:

  • A Moodle installation with WebServices (REST) enabled, see Web services documentation
    • Administration -> Plugins -> Web Services -> External Services -> Enable mobile web service
    • Administration -> Plugins -> Web Services -> Protocols -> Enable REST
    • Administration -> Users -> Permission -> Define roles -> Edit the Authenticated user role -> Allow webservice/rest:use
  • A local copy of the Mobile HTML5 App with the Debugging options Enabled

WebServices Development

In most cases your plugin/s will need WebServices to get data from your Moodle installation, my recommendation is develop first the Web Services you'd need (see WebServices)

  • Create a local plugin in Moodle for adding the extra Web Services you need and also your plugin's lang files
  • Create a new External Service in your Moodle installation, adding a services.php file in your new local plugin or creating manually the service in your Moodle installation.(Plugins -> WebServices) See External_services_description for more info. Remember the key name of the service, because you will need it later.

Plugin Development

See Moodle Mobile Plugins Development

For developing the plugin you need:

  • Edit the /config.json file to:
    • Add the extra plugins you implement
    • Indicate the WS service name you are going to use in your Moodle installation (Remember, that you need to create a WS Service indicating the functions available for your custom app)
    • Add your custom lang file (es, ca, fr ...)
    • Change the app login form presets
  • Add your own css files, custom images, etc..

Building

  • Build again the app using the SDK for Android and/or iOS