Integracio de plataformes

Learning Platform Bridge

Panel to migrate and synchronize users, courses, and progress from LearnDash (WordPress) to Moodle via APIs.

Context

After the initial migration from LearnDash to Moodle using the migration tool (6-phase pipeline), a system was needed to keep both platforms synchronized during the transition period. Students continued taking courses on LearnDash while the transition to Moodle was being completed, and progress had to be consistent across both platforms.

What it does

Complete ETL system that acts as an intermediate layer (bridge) between multiple WordPress installations with LearnDash + WooCommerce and a centralized Moodle installation:

  • Extraction via WordPress REST plugin: custom plugin that exposes users, courses, enrollments, and progress from WordPress
  • Custom canonical model: data unification with deduplication by email (users) and slug (courses)
  • Manual validation with dry-run: preview mode that shows any change before executing
  • Application to Moodle via Web Services API: idempotent creation of users, courses, and enrollments
  • Asynchronous execution with Celery + Redis: job tracking, persistent logs, automatic retry
  • Complete auditing: detailed record of each operation for debugging and verification

Results in production

  • 15,423 records synchronized in 95 seconds
  • 695 deduplicated canonical users
  • 72 canonical courses
  • 1,982 enrollments
  • 12,218 progress records
  • 0 conflicts detected
  • 5 users successfully created in Moodle production with verified idempotency

Main difficulties

  • Different APIs and formats: WordPress REST API with serialized metadata vs Moodle Web Services with tokens
  • User deduplication: same person on multiple websites with different IDs
  • Progress in different formats: LearnDash stores progress as JSON in wp_usermeta, Moodle as records in tables
  • Asynchronous execution: mass synchronization without blocking the interface
  • Data loss risk: each synchronization modifies both platforms

Solutions

  • Custom WordPress plugin that exposes data via REST with normalized format
  • Canonical model with deduplication by email and logging of any conflict
  • Celery + Redis for asynchronous execution with job tracking and automatic retry
  • Dry-run mode that shows preview of all changes before executing
  • Total idempotency: every operation is safe for re-executions

Learnings

  • Bidirectional synchronization is more complex than unidirectional migration
  • A manual validation panel (dry-run) is essential for critical data
  • Celery + Redis is the right combination for ETL jobs with tracking
  • Idempotency must be verified with real data, not just designed