A Learning Management System extension for Wagtail with SCORM 1.2/2004 support
Project description
Wagtail LMS
A Learning Management System extension for Wagtail CMS with SCORM 1.2/2004 support.
⚠️ Alpha Release
This package is in early development.
Supported versions:
- Python: 3.11, 3.12, 3.13
- Django: 4.2 (LTS), 5.0, 5.1, 5.2 (LTS)
- Wagtail: 6.0, 6.1, 6.2, 6.3, 7.0 (LTS), 7.1
All combinations are tested in CI. See our compatibility matrix for specific version combinations.
Features
- 📚 Course Management - Integrate courses into Wagtail's page system
- 📦 SCORM Support - Full SCORM 1.2 and 2004 package compatibility
- 👥 Enrollment Tracking - Automatic student enrollment and progress monitoring
- 📊 SCORM API - Complete runtime API implementation for content interactivity
- 🔒 Secure Delivery - Path-validated content serving with iframe support
- 💾 Progress Persistence - CMI data model storage with suspend/resume capability
- 🔄 Concurrency Handling - Retry logic for SQLite database lock scenarios
- 🎨 Framework Agnostic - Minimal default styling, easy to customize with any CSS framework
Development Status
✅ Core functionality tested and working
- Comprehensive test suite with 86% code coverage
- 65+ tests covering models, views, API, and integration workflows
- Example project fully functional for development and testing
- Database lock handling for concurrent SCORM operations
- Wagtail preview mode fully supported
See example_project/README.md for setup instructions.
Installation
pip install wagtail-lms
Quick Start
-
Add to
INSTALLED_APPSin your Django settings:INSTALLED_APPS = [ # ... 'wagtail_lms', # ... ]
-
Add wagtail-lms URLs to your
urls.py:from django.urls import path, include urlpatterns = [ # ... path('lms/', include('wagtail_lms.urls')), # ... ]
-
Run migrations:
python manage.py migrate wagtail_lms
-
Collect static files:
python manage.py collectstatic
Configuration
Optional settings in your Django settings:
# SCORM package upload directory
WAGTAIL_LMS_SCORM_UPLOAD_PATH = 'scorm_packages/'
# Extracted SCORM content directory
WAGTAIL_LMS_CONTENT_PATH = 'scorm_content/'
# Auto-enroll users when they visit a course
WAGTAIL_LMS_AUTO_ENROLL = False
Usage
Creating a Course
- Log into Wagtail admin
- Create a new "Course Page" under Pages
- Upload a SCORM package via Django Admin → SCORM Packages
- Assign the SCORM package to your course page
SCORM Package Requirements
- Must be a valid SCORM 1.2 or 2004 ZIP file
- Must contain
imsmanifest.xmlat the root - Launch file must be specified in the manifest
Customizing Templates
The package includes minimal, functional styling that works out of the box. To match your project's design:
- Quick: Override the CSS classes in your own stylesheet
- Full control: Override the templates in your project (standard Django approach)
- Examples: See Template Customization Guide for Bootstrap, Tailwind CSS, and Bulma examples
For API-first projects, the templates are optional and can be ignored entirely.
Development
Running Tests
The project includes a comprehensive test suite with 86% code coverage.
# Install testing dependencies (pytest, pytest-django, pytest-cov)
uv sync --extra testing
# Run all tests
PYTHONPATH=. uv run pytest
# Run with coverage report
PYTHONPATH=. uv run pytest --cov=src/wagtail_lms --cov-report=term-missing
# Run specific test file
PYTHONPATH=. uv run pytest tests/test_models.py -v
Database Considerations
SQLite: The package includes retry logic with exponential backoff to handle database lock errors during concurrent SCORM API operations. For development with the example project:
# example_project/settings.py
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "db.sqlite3",
"OPTIONS": {
"timeout": 20, # Increased timeout for SCORM operations
},
}
}
Production: For production deployments, PostgreSQL is recommended for better concurrency handling:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "wagtail_lms",
# ... other PostgreSQL settings
}
}
Acknowledgments
- Built with Django and Wagtail CMS
- SCORM implementation based on ADL specifications
- Inspired by open-source LMS solutions like Moodle and Open edX
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtail_lms-0.3.1.tar.gz.
File metadata
- Download URL: wagtail_lms-0.3.1.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dea7410a9e187e767f19e369bc69d418d3e48c01ce8a1ec3c630ae37e5510bc
|
|
| MD5 |
14b375258619032457513192b3951e86
|
|
| BLAKE2b-256 |
9b3057fcc90880cf4a675c38a4f91a09fda2fdaec486740f48e17bd1374dd0df
|
Provenance
The following attestation bundles were made for wagtail_lms-0.3.1.tar.gz:
Publisher:
publish.yml on dr-rompecabezas/wagtail-lms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wagtail_lms-0.3.1.tar.gz -
Subject digest:
2dea7410a9e187e767f19e369bc69d418d3e48c01ce8a1ec3c630ae37e5510bc - Sigstore transparency entry: 686047260
- Sigstore integration time:
-
Permalink:
dr-rompecabezas/wagtail-lms@0660f54a847817835358545402bd96991b606948 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/dr-rompecabezas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0660f54a847817835358545402bd96991b606948 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wagtail_lms-0.3.1-py3-none-any.whl.
File metadata
- Download URL: wagtail_lms-0.3.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
806131dc28e84b7d04d7d972f1506f8493b93b5b439e9c3bf23c4cac827cc1a9
|
|
| MD5 |
ac365451ebe8c79778df098f038f223c
|
|
| BLAKE2b-256 |
fe760f151a37586316223de185412885101523a3cbcb50e5a04dd8fbcd948621
|
Provenance
The following attestation bundles were made for wagtail_lms-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on dr-rompecabezas/wagtail-lms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wagtail_lms-0.3.1-py3-none-any.whl -
Subject digest:
806131dc28e84b7d04d7d972f1506f8493b93b5b439e9c3bf23c4cac827cc1a9 - Sigstore transparency entry: 686047262
- Sigstore integration time:
-
Permalink:
dr-rompecabezas/wagtail-lms@0660f54a847817835358545402bd96991b606948 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/dr-rompecabezas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0660f54a847817835358545402bd96991b606948 -
Trigger Event:
release
-
Statement type: