Note:

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

Moodle App Customisation: Difference between revisions

From MoodleDocs
m (Noeldemartin moved page Moodle Mobile Customization to Moodle App Customization: Consistency)
(Update migration status and path)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:Migrated|newDocId=/general/app/customisation}}
{{Moodle App (Ionic 5)}}
{{Moodle App (Ionic 5)}}


== Overview ==
The Moodle App can be customised in different ways:


Moodle Mobile can be customized in different ways:
* Changing the app appearance for your site.
* Changing the app appearance for your site.
* Adding support in your plugin for the mobile app.
* Adding support in your plugin for the mobile app.
* Configuring how the app should work via Moodle site settings.
* Configuring how the app should work via Moodle site settings.
* Creating a custom application (with your custom name and icon) based on the Moodle Mobile code.
* Creating a custom application (with your custom name and icon) based on the open source code.




With the first three options, you are not required to compile or build your custom application. With the last one, you are required to compile and publish your custom app in the stores.
With the first three options, you are not required to work with the source code and your users can use the standard app.
 
The fourth option involves building your own application, and it is not covered in this documentation. You can learn more about that in the [[Custom Moodle Apps]] page.


== Changing the app appearance for your site ==
== Changing the app appearance for your site ==


The Mobile app can retrieve your custom styles from your Moodle site. Since it is an HTML5 app, you can safely apply CSS3 styles.
The app can retrieve your custom styles from your Moodle site. Since it is an HTML5 app, you can safely apply CSS3 styles.
 
In your Moodle installation, go to Plugins / Web services / Mobile and enter in the mobilecssurl field a valid URL pointing to a CSS file containing your custom styles (theme).
 
The CSS should be placed inside your Moodle installation (in your custom theme or inside a local plugin)
 
Once the user is logged in to the app, there is a periodical process that retrieves your remote CSS files for applying your custom styles into the app.
 
Notice that the first time a user opens the app, he will see the default "orange" style. Your custom styles will be applied once the user has added a site in the app.
 
Notice that styles come from a site; thus, there is no way to change the initial Add site / Manage account pages styles.
 
See [[Moodle Mobile Themes]] for additional information.
 
== Mobile support for plugins ==


You can create Moodle plugins to change how the app works. See [[Mobile support for plugins]] for complete information.
In your Moodle installation, go to "Plugins > Web services > Mobile" and enter in the <code>mobilecssurl</code> field a valid URL pointing to a CSS file containing your custom styles (theme). The CSS should be placed inside your Moodle installation (in your custom theme or inside a local plugin).


== Creating a custom application ==
Once the user is logged in to the app, there is a periodical process that retrieves your remote CSS files for applying your custom styles into the app. So if you don't see the styles right away, try removing the site from the app and adding it again.


See [[Moodle Mobile custom apps]] or [https://moodle.com/branded-app/ The Branded Moodle Mobile App service] by Moodle HQ
Notice that the first time a user opens the app, they will see the default styles. Your custom styles will be applied once the user has added a site in the app. Given that styles come from a site, there is no way to change the initial "Add site / Manage account" pages styles.


=== Building ===
You can learn more about this in the [[Moodle App Remote Themes]] page.


To build the app you should check use Ionic CLI tools, see: http://ionicframework.com/docs/cli/run.html
== Adding support in your plugin for the mobile app ==


[http://build.phonegap.com Phonegap Build] service was discontinued October, 1 2020.
You can create Moodle plugins to change how the app works. You can learn about this in the [[Moodle App Plugins Development Guide]] page.


== Configuring how the app should work via Moodle site settings ==
== Configuring how the app should work via Moodle site settings ==


The app can be configured via Moodle site settings. You can disable features, rename strings, add new elements to the main menu or change how log out works in the app. This requires Moodle 3.3 or the [[https://docs.moodle.org/en/Moodle_Mobile_additional_features Moodle Mobile additional features plugin]].
The app can be configured via Moodle site settings. You can disable features, rename strings, add new elements to the main menu, or change how log out works in the app. This requires Moodle 3.3 or the [https://docs.moodle.org/en/Moodle_Mobile_additional_features Moodle Mobile additional features plugin].


Please refer to the Configuring the app from your site section on this page: https://docs.moodle.org/en/Moodle_Mobile_guide_for_admins
You can learn about all the configuration options in [https://docs.moodle.org/311/en/Moodle_app_guide_for_admins#Configuring_the_app_from_your_site the user guide].


== Testing and developing ==
== Testing and developing ==


=== Chromium or Google Chrome browser ===
You can test your changes using any Chromium-based browser, but you should launch it with some security features disabled. You can learn more about that in the [[Using the Moodle App in a browser]] page.


See [[Moodle Mobile development using Chrome or Chromium]]
Also, keep in mind that the usage of Remote Themes and Moodle settings could be limited depending on your [https://apps.moodle.com Moodle App plan].


== See also ==
== See also ==


[https://moodle.com/branded-app/ Branded Moodle Mobile app service by Moodle HQ]
* [https://moodle.com/branded-app/ Branded Moodle Apps service by Moodle HQ]

Latest revision as of 13:03, 14 July 2022

Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!


The Moodle App can be customised in different ways:

  • Changing the app appearance for your site.
  • Adding support in your plugin for the mobile app.
  • Configuring how the app should work via Moodle site settings.
  • Creating a custom application (with your custom name and icon) based on the open source code.


With the first three options, you are not required to work with the source code and your users can use the standard app.

The fourth option involves building your own application, and it is not covered in this documentation. You can learn more about that in the Custom Moodle Apps page.

Changing the app appearance for your site

The app can retrieve your custom styles from your Moodle site. Since it is an HTML5 app, you can safely apply CSS3 styles.

In your Moodle installation, go to "Plugins > Web services > Mobile" and enter in the mobilecssurl field a valid URL pointing to a CSS file containing your custom styles (theme). The CSS should be placed inside your Moodle installation (in your custom theme or inside a local plugin).

Once the user is logged in to the app, there is a periodical process that retrieves your remote CSS files for applying your custom styles into the app. So if you don't see the styles right away, try removing the site from the app and adding it again.

Notice that the first time a user opens the app, they will see the default styles. Your custom styles will be applied once the user has added a site in the app. Given that styles come from a site, there is no way to change the initial "Add site / Manage account" pages styles.

You can learn more about this in the Moodle App Remote Themes page.

Adding support in your plugin for the mobile app

You can create Moodle plugins to change how the app works. You can learn about this in the Moodle App Plugins Development Guide page.

Configuring how the app should work via Moodle site settings

The app can be configured via Moodle site settings. You can disable features, rename strings, add new elements to the main menu, or change how log out works in the app. This requires Moodle 3.3 or the Moodle Mobile additional features plugin.

You can learn about all the configuration options in the user guide.

Testing and developing

You can test your changes using any Chromium-based browser, but you should launch it with some security features disabled. You can learn more about that in the Using the Moodle App in a browser page.

Also, keep in mind that the usage of Remote Themes and Moodle settings could be limited depending on your Moodle App plan.

See also