Lifecycle scripts execute inside of the sandbox environment to setup and tear down challenges, give your learners feedback on their solution, or to automatically solve a challenge.
It is common to write the scripts in Bash, but you can write them in any language supported on your environment.
There are four types of challenge lifecycle scripts:
And one track life cycle scripts:
The Instruqt platform injects a set of parameters using environment variables into every script:
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. It is only present if the user accessed the track via an invite link.
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 *