Life cycle scripts are used to interact with the environment of a student, and to run commands on certain events while a student plays your track. Scripts are responsible for:
Setting up the scenario your students will follow, by configuring applications and starting services.
Checking the student's work, and providing feedback to student on their progress.
You typically write scripts in Bash, but you can write them in any language supported on your environment.
There are four types of challenge life cycle scripts:
And one track life cycle scripts:
The Instruqt platform injects a set of parameters, through environment variables, into every script. The following environment variables are available:
The ID of the track
The ID of the challenge that the script is running on. This can be empty, in case of a track cleanup script.
The ID of the participant. This value is guaranteed to be unique for every play of a track, i.e. when a user starts the same track twice, the IDs will differ.
The ID of the track invite. Will only be present if the user got access to the track via an invite.
The ID of the user. This value uniquely identifies a user. This value can be empty, in case a script is run as part of a pooled instance.
The full name of the user (as they have entered it when creating their account). *
The email address of the user *