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 36: Line 36:
=== Plugin Development ===
=== Plugin Development ===


See [[Moodle Mobile Plugins Development]] and [[Moodle_Mobile Developing a plugintutorial]]
See [[Moodle Mobile Plugins Development]] and [[Moodle Mobile Developing a plugin tutorial]]


For developing the plugin you need:
For developing the plugin you need:

Revision as of 13:07, 28 January 2013

Overview

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

Creating your custom application

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

Development environment

See Moodle_Mobile#Testing_and_developing

It is recommended that you have a local web server (app and moodle installation under localhost or the same local domain).

You will need:

  • A Moodle installation with Web Services (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

Web Services Development

In most cases your plugin/s will need Web Services to get data from your Moodle installation. It is recommended that you first develop the Web Services that you will need (see Web Services).

  • 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 -> Web Services) 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 and Moodle Mobile Developing a plugin tutorial

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 default lang file (es, ca, fr ...) (the language file must exists in the app's lang/ folder)
  • 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