Note:

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

Moodle Desktop: Difference between revisions

From MoodleDocs
No edit summary
m (Text replacement - "</code>" to "</syntaxhighlight>")
(7 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Moodle Mobile}}
{{Moodle App (Ionic 3)}}
 
<p class="note">Note: [https://moodle.org/mod/forum/discuss.php?d=413350 Moodle Desktop is discontinued] since 1 May 2021.</p>
Moodle Desktop is build using the popular framework [http://electron.atom.io/ Electron].
[http://download.moodle.org/desktop/ Moodle Desktop] is build using the popular framework [http://electron.atom.io/ Electron].


Electron is a very popular cross-platform for building desktop apps with JavaScript, HTML, and CSS.
Electron is a very popular cross-platform for building desktop apps with JavaScript, HTML, and CSS.
Line 12: Line 12:
* The Linux version may require a Linux distribution (depending on the selected target).
* The Linux version may require a Linux distribution (depending on the selected target).


Note also that if you want to publish your custom versions in the Windows or Apple stores, you will need to sign-un for a developer account (they cost money).  
Note also that if you want to publish your custom versions in the Windows or Apple stores, you will need to sign-up for a developer account (it costs money).  


Moodle HQ provides a branding service of Moodle Desktop via the [https://moodle.com/mobileapp/ The Branded Moodle Mobile App]. This service includes publishing in the stores and code signing.
Moodle HQ provides a branding service of Moodle Desktop via the [https://moodle.com/mobileapp/ The Branded Moodle Mobile App]. This service includes publishing in the stores and code signing.
== I'm feeling lucky ==
If you are already familiar with Electron (or simply want to get your feet wet before diving deeper), you can get started easily. But first, you'll have to grab a copy of [https://github.com/moodlehq/moodlemobile2 Moodle Mobile 2] from Github. See our docs [https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2#Clone_the_app_base_code here] if you need help.
Once you have a copy, you'll see that there is a folder named ''desktop'' located in the root directory.
This is where the Electron configuration file for the desktop app is located (aptly named "electron.js").
When we build our app, the distribution files will also be placed in this folder.
The "electron.js" file defines the configuration for the desktop app with sane defaults.
You can modify it if you want to (you don't really have to though) and use either of these scripts to build the desktop app :
<syntaxhighlight lang="php">npm run desktop.pack</syntaxhighlight> (only generates the package directory without really packaging it. This is useful for testing purposes)
<syntaxhighlight lang="php">npm run desktop.dist</syntaxhighlight> (to package in a distributable format (e.g. dmg, windows installer, deb package))
== Troubleshooting ==
=== Deleting the profile ===
Sometimes the app can get into a bad state and you might want to delete its data. When using the desktop environment, you need to delete the contents of the profile folder.
* On Windows this can sometimes be found at C:\Users\ (your username) \AppData\Roaming\moodlemobile
Just quit the app, delete all the files in this folder, and open it again; you'll start with a fresh app.

Revision as of 13:03, 14 July 2021

Moodle App (Ionic 3 - legacy)


Note: Moodle Desktop is discontinued since 1 May 2021.

Moodle Desktop is build using the popular framework Electron.

Electron is a very popular cross-platform for building desktop apps with JavaScript, HTML, and CSS.

If you want to build your custom version of Moodle Desktop, please follow the Electron Guides that you will find in https://electron.atom.io/docs/

Please, consider the following:

  • For building a Windows version you will need a Windows computer.
  • The Mac version will require a Mac computer.
  • The Linux version may require a Linux distribution (depending on the selected target).

Note also that if you want to publish your custom versions in the Windows or Apple stores, you will need to sign-up for a developer account (it costs money).

Moodle HQ provides a branding service of Moodle Desktop via the The Branded Moodle Mobile App. This service includes publishing in the stores and code signing.

I'm feeling lucky

If you are already familiar with Electron (or simply want to get your feet wet before diving deeper), you can get started easily. But first, you'll have to grab a copy of Moodle Mobile 2 from Github. See our docs here if you need help.

Once you have a copy, you'll see that there is a folder named desktop located in the root directory. This is where the Electron configuration file for the desktop app is located (aptly named "electron.js"). When we build our app, the distribution files will also be placed in this folder. The "electron.js" file defines the configuration for the desktop app with sane defaults. You can modify it if you want to (you don't really have to though) and use either of these scripts to build the desktop app :

npm run desktop.pack

(only generates the package directory without really packaging it. This is useful for testing purposes)

npm run desktop.dist

(to package in a distributable format (e.g. dmg, windows installer, deb package))

Troubleshooting

Deleting the profile

Sometimes the app can get into a bad state and you might want to delete its data. When using the desktop environment, you need to delete the contents of the profile folder.

  • On Windows this can sometimes be found at C:\Users\ (your username) \AppData\Roaming\moodlemobile

Just quit the app, delete all the files in this folder, and open it again; you'll start with a fresh app.