Moodle Mobile App Offline Sync

How Offline Sync Actually Works in the Moodle Mobile App

Offline access is one of the most misunderstood parts of Moodle Mobile — some things genuinely work without a connection, others only look like they do, and a few need custom development to work at all. Here's the real architecture underneath it.

8+ Years Building on MoodleReal Moodle Mobile ArchitectureCustom Offline Extensions
Offline Download & Sync Flow

Why Offline Access Actually Matters for Moodle Learners

A meaningful share of any Moodle Mobile user base isn't sitting on stable Wi-Fi. Offline behavior isn't a nice-to-have edge case — for a lot of learners, it's the difference between using the app at all and giving up on it.

Field & Frontline Training

Technicians, healthcare workers, and field staff completing compliance or safety training in warehouses, job sites, and facilities with poor signal.

Low-Connectivity Regions

Students and staff in areas with unreliable mobile data or expensive bandwidth, where downloading once and studying offline is the norm, not the exception.

Commutes & Downtime

Exam prep and certification learners reviewing downloaded material on a train, plane, or subway with no signal at all.

The Real Architecture Behind Moodle Mobile Offline Mode

The Moodle Mobile app isn't a thin wrapper around a browser — it's a hybrid Ionic/Angular app with its own local data layer that mirrors what's on your Moodle site.

Local SQLite-Backed Storage

The Moodle Mobile app is an Ionic/Angular hybrid app packaged with Capacitor. It keeps a local SQLite database on-device for cached course structure, activity data, and user actions, plus filesystem storage for downloaded files.

Prefetch Handlers Per Activity

Each activity type (page, resource, book, SCORM, forum, assignment) ships a prefetch handler that defines exactly what gets downloaded for offline use — files, structure, and the web service responses needed to render it without a connection.

Sync Providers Per Activity

Activities that accept offline actions — forums, assignments, quizzes — each register a sync provider. It queues actions taken offline and replays them against Moodle's web services once the device is back online.

Web Services Underneath It All

Whether the app is online or replaying a queued action, every read and write still goes through Moodle's external functions and mobile web services — offline mode just delays when those calls fire.

What Works Offline in Stock Moodle Mobile — and What Doesn't

Offline support in Moodle Mobile is activity-specific, not a single on/off switch for the whole app. Some content is viewable offline the moment it's downloaded; some interactions can be queued offline; and some things simply require a live connection.

Generally works offline once downloaded

  • Pages, resources (files/PDFs), books, and folders downloaded ahead of time
  • SCORM packages — content plays offline and attempt data (cmi tracking) syncs on reconnect
  • Assignment drafts and file submissions started offline
  • Forum replies composed offline and queued for posting
  • Quiz attempts, but only when the quiz has "allow offline attempts" enabled and was downloaded first

Generally requires a live connection

  • Quizzes without offline attempts explicitly enabled in their settings
  • Loading forum discussions or content that was never pre-fetched
  • Real-time features — messaging delivery, live chat, and anything server-generated on demand
  • Any custom activity type without a prefetch or sync handler defined for the mobile app

Conflict Resolution When Offline Actions Sync Back

Queuing an action offline is the easy half of the problem. The harder half is what happens when that queued action reaches the server and the world has moved on — that's where sync providers earn their keep.

Time-Sensitive Conflicts

A quiz attempt whose time limit or close date passed before the device reconnected — the app surfaces this as a sync error instead of silently submitting a late attempt.

Duplicate or Overlapping Actions

A submission made offline and again from a browser before syncing — sync providers detect the mismatch and flag it for the user rather than picking one arbitrarily.

Manual Retry, Not Silent Failure

Failed sync items stay queued in the app with a visible error state, so students and staff can retry, discard, or get help instead of quietly losing work.

Extending Offline Support for Custom Activity Types

Stock Moodle Mobile only knows how to prefetch and sync the activity types Moodle HQ has already built handlers for. A custom activity plugin gets none of that offline behavior automatically — it has to be declared explicitly.

Adding offline capability to a custom Moodle activity for the mobile app generally involves:

  • Declaring the plugin's mobile behavior in db/mobile.php, including which external functions the app is allowed to call
  • Marking the relevant external functions in the offlinefunctions declaration, so their responses get cached for offline use
  • Building a prefetch handler that defines what content and files need downloading for the activity to render offline
  • Building a sync provider if the activity should accept offline actions, so queued actions replay correctly once connectivity returns
  • Testing against real dropped connections, not just simulated network throttling, since sync edge cases surface differently in the field

Offline Behavior Tested, Not Assumed

Real Web Services Experience

We build against Moodle's actual mobile web services and external functions layer, not guesswork about how the app behaves offline.

Tested Against Real Drop-Outs

Offline and sync behavior is tested against genuine connectivity loss, not just simulated network throttling in dev tools.

Custom Handlers When Needed

When a custom activity type needs offline support, we build the prefetch and sync handlers it's missing rather than bolting on a workaround.

8+ Years on Moodle Core

Every recommendation here is grounded in real Moodle core and mobile app architecture, not marketing claims about what an app 'should' do.

Questions About Moodle Mobile Offline Sync

Straight answers about how offline access and sync really behave.

Stock Moodle Mobile already supports offline viewing of downloaded courses and offline actions for several core activity types (assignments, forums, some quiz attempts, SCORM). Custom development is only needed when you want offline support for a custom activity type, or want to extend what a stock activity can do offline.

Only if the quiz has "Allow this quiz to be attempted offline using the mobile app" enabled in its settings, and the student downloaded the quiz before going offline. The attempt is stored locally and submitted once the device reconnects — quizzes without that setting still require a live connection.

The app's sync process flags it as a sync error rather than silently overwriting data — for example, a quiz attempt whose time limit expired before it synced, or a submission made both offline and via the web. The user sees the conflict and can retry, discard, or resolve it manually depending on the activity.

Real-time or server-dependent features generally can't work offline — live chat, most forum discussion loading beyond what was pre-fetched, and any activity type without a registered prefetch or sync handler. Viewing already-downloaded pages, resources, and books works fine offline; starting new interactions with un-cached content does not.

You define the plugin's mobile behavior in db/mobile.php, including which external functions the app can call and which of those responses should be cached via the offlinefunctions declaration. Prefetch and sync logic then follow the same pattern the app uses for core activities.

Yes — a branded app is still built on the same Moodle Mobile codebase and web services layer, so offline storage, prefetching, and sync behave identically. Branding changes the app's identity, not its underlying data architecture.

It depends entirely on what's downloaded — a text-heavy course with pages and forums might use a few megabytes, while a course with large SCORM packages or video files can run into hundreds of megabytes. Students can choose what to download rather than caching an entire course automatically.

Need Offline Support for a Custom Activity?

Tell us what your learners need to do offline and we'll tell you exactly what stock Moodle Mobile covers and what needs custom development.

Talk to a Moodle Mobile Developer