Moodle LMS — online courses and access keys
Menu Our items → Moodle connection / Moodle courses / LMS keys (when the Moodle LMS module is enabled for the store).
EliaFlow orchestrates customers, sales (invoices), and time-limited access keys. Teaching content (text, images, short videos, quizzes) is built in Moodle.
Roles: EliaFlow vs Moodle
| In EliaFlow (admin) | In Moodle |
|---|---|
| Connection to the store’s Moodle server | Lesson content, pages, quizzes |
| Catalogue training ↔ Moodle course link | Course structure (sections, activities) |
| Access keys + email delivery | Learner UI (login, reading) |
| Activation on the storefront | Time-limited enrolment (driven by EliaFlow) |
| Training invoice → key when invoice is paid | Grades / progress (Moodle side) |
Prerequisites
- Moodle LMS module enabled (Module Control) for the service point.
- Trainings module often useful: catalogue price + invoicing.
- A Moodle connection saved and tested (“Test connection”).
Admin menus
| Menu | Purpose |
|---|---|
| Moodle connection | Public URL, internal Docker URL, Web Services token, student role |
| Moodle courses | Link / create a course, FR or EN locale, default access duration, invoice |
| LMS keys | Activation codes, status, customer, dates, resend email |
| Trainings / Training categories | “Create / Update Moodle · FR/EN” sync from the edit page |
Typical flow (end to end)
flowchart LR conn[Moodle_connection] link[Course_link] key[LMS_key] redeem[Storefront_redeem] moodle[Moodle_access] conn --> link --> key --> redeem --> moodle
- Moodle connection: public URL (e.g.
http://localhost:8085), internal Docker URL if needed (http://moodle:8080), and Web Services token; test it. - Moodle courses — three ways:
- A — Link an existing Moodle course (picker + “Refresh from Moodle”).
- B — Create / update from a Filament training (FR / EN header buttons on edit).
- B2 — Categories: sync training category → Moodle category (FR / EN).
- Invoice (flow C): from the linked course or enrolled users → prefilled invoice with the linked training; when the invoice is paid, EliaFlow creates the LMS key (duration = link “Default access duration”, otherwise 30 days) and can send email.
- Or create a manual key (days and/or absolute date window) and email it.
- The customer redeems on the storefront (
/en/lms/activate?code=…or/fr/...) or via the email link. - EliaFlow creates the Moodle account if needed, enrols until the end date, then sends the learner to Moodle.
On expiry, automatic unenrol runs (moodle-lms:expire-access-keys).
Bilingual setup
| Layer | Behaviour |
|---|---|
| Moodle UI | FR or EN chosen by the learner (language selector / preferences) |
| Teaching content | Two separate courses (e.g. introduction-fr / introduction-en), each linked with its course language |
| Keys | One key = one course = one language; storefront link follows /fr/ or /en/ |
Rule: a FR key does not enrol into the EN course.
Course content (trainers)
Trainers edit inside Moodle (Page, images, video URL, Quiz).
Detailed guide (recommended structure, videos, branding): technical doc MOODLE_TRAINER_GUIDE.md (team / not shown on public /docs).
Invoicing and access duration
| Item | Detail |
|---|---|
| Linked training | Required for “Create invoice” (price = training price) |
| Default duration | Field on the course link (days); otherwise 30 days |
| Manual key | Duration relative to redeem and/or absolute dates |
| Key statuses | draft, active, redeemed, expired, revoked |
Success criteria
- Moodle LMS module ON for the store.
- Moodle connection tested (Web Services token).
- At least one linked course (FR and/or EN) with a catalogue training if invoicing.
- An emailed key redeems on the storefront.
- The customer sees the Moodle course during the allowed period.
- After expiry, Moodle access is no longer available.