dataformat_sqlite
Export Moodle reports as a SQLite database file (.sqlite).
How It Works
Extends core\dataformat\base. On export:
- Sanitizes column names (lowercase, alphanumeric).
- Creates temp SQLite DB via PDO.
- Creates table
exportwithrow INTEGER PRIMARY KEY+col_* TEXTcolumns. - Inserts each record with row number.
- Streams the
.sqlitefile to browser on completion.
Use
Select “SQLite Database (.sqlite)” in any report export dropdown. File downloads as report.sqlite. Can be opened with any SQLite client.
Details
| Property | Value |
|---|---|
| MIME type | application/vnd.sqlite3 |
| Extension | .sqlite |
| Requires | PHP pdo_sqlite extension |
| Privacy | No personal data stored |
File Structure (inside .sqlite)
Single table export:
row- Row number (INTEGER, PK)col_*- One TEXT column per report column