Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 900 Bytes

File metadata and controls

31 lines (22 loc) · 900 Bytes

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

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