Skip to Content
Pluginsdataformat_sqlite

dataformat_sqlite

Export Moodle reports as a SQLite database file (.sqlite).

How It Works

Extends core\dataformat\base. On export:

  1. Sanitizes column names (lowercase, alphanumeric).
  2. Creates temp SQLite DB via PDO.
  3. Creates table export with row INTEGER PRIMARY KEY + col_* TEXT columns.
  4. Inserts each record with row number.
  5. Streams the .sqlite file 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

PropertyValue
MIME typeapplication/vnd.sqlite3
Extension.sqlite
RequiresPHP pdo_sqlite extension
PrivacyNo personal data stored

File Structure (inside .sqlite)

Single table export:

  • row - Row number (INTEGER, PK)
  • col_* - One TEXT column per report column