Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 3.27 KB

File metadata and controls

81 lines (62 loc) · 3.27 KB

LTI instance ingester command

LtiInstanceIngesterCommand is responsible for ingesting lti instance data into the application for LTI 1.1 launches.

Usage

$ sudo -u www-data bin/console roster:ingest:lti-instance <path> [--storage=local] [--delimiter=1000] [--batch=1000]

Main arguments

Argument Description
path Relative path to the file [example: var/lti-instances.csv]

Main options

Option Description
-s, --storage Filesystem storage identifier [default: local] More information can be found here.
-d, --delimiter CSV delimiter [default: ,]
-b, --batch Batch size [default: 1000]
-f, --force To apply database modifications or not [default: false]

For the full list of options please refer to the helper option:

$ sudo -u www-data bin/console roster:ingest:lti-instance -h

CSV file format

Here is an example csv structure:

label,ltiLink,ltiKey,ltiSecret
infra_1,http://infra_1.com,key1,secret1
infra_2,http://infra_2.com,key2,secret2
infra_3,http://infra_3.com,key3,secret3
infra_4,http://infra_4.com,key4,secret4
infra_5,http://infra_5.com,key5,secret5
Column Description
label Label of the LTI instance.
ltiLink Unique LTI link used by LTI 1.1 launch.
ltiKey LTI key used by LTI 1.1 launch.
ltiSecret LTI secret used by LTI 1.1 launch.

Related environment variables

Variable Description
DATABASE_URL Database connection string. Supported formats are described here.

Examples

Ingesting LTI instances from default (local) storage with custom batch size:

$ sudo -u www-data bin/console roster:ingest:lti-instance /path/to/file.csv --batch=10000 --force

Ingesting LTI instances from default (local) storage with custom column delimiter (;):

$ sudo -u www-data bin/console roster:ingest:lti-instance /path/to/file.csv --delimiter=; --force

Ingesting LTI instances from a custom storage:

$ sudo -u www-data bin/console roster:ingest:lti-instance /path/to/file.csv --storage=myCustomStorage --force

For configuring custom storages, please check the Storage registry documentation.