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 lang="php">")
Line 26: Line 26:
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 :
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 :


<code>npm run desktop.pack</code> (only generates the package directory without really packaging it. This is useful for testing purposes)
<syntaxhighlight lang="php">npm run desktop.pack</code> (only generates the package directory without really packaging it. This is useful for testing purposes)
<code>npm run desktop.dist</code> (to package in a distributable format (e.g. dmg, windows installer, deb package))
<syntaxhighlight lang="php">npm run desktop.dist</code> (to package in a distributable format (e.g. dmg, windows installer, deb package))


== Troubleshooting ==
== Troubleshooting ==

Revision as of 13:02, 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 :

<syntaxhighlight lang="php">npm run desktop.pack (only generates the package directory without really packaging it. This is useful for testing purposes) <syntaxhighlight lang="php">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.