Moodle 3.10 comes with nice improvements on the External Tool module, some long awaited like this one: support for the substitution variable.

So what is it used for? It’s been for a long time the way to support course copy in LTI (see course copy road to nowhere) by communicating to the tool the history of the context.

There are other substitution variables in the LTI Core Specifications and futur releases of Moodle will bring more support for those.

In the meantime, enjoy!