For those who have played with EM suffixes, you have probably seen that if they refer to variables on the same page, they always generate a <span> element. For example,
Yields this if on the same page:
<span id='LEMtailor_Q_521_35'>24235X25X521</span>
But this if on a different page:
This has led to challenges like the one discussed in
this thread, where attempts to get the sgqa code on the same page were temporarily stymied by the dynamic substitution feature.
Perhaps some of those question metadata should be statically substituted even when on the same page. The logical option would be to allow static substitution for anything that could not be dynamic. So, it might make sense to upgrade the substitution engine to do the following:
(1) Continue to make these dynamic:
| SUFFIX | SUBSTITUTION_TYPE |
| (no suffix) | dynamic |
| code | dynamic |
| NAOK | dynamic |
| relevanceStatus | dynamic |
| shown | dynamic |
| value | dynamic |
| valueNAOK | dynamic |
(2) But make these static, even when on the same page:
| SUFFIX | SUBSTITUTION_TYPE |
| gid | static |
| grelevance | static |
| gseq | static |
| jsName | static |
| mandatory | static |
| qid | static |
| qseq | static |
| question | static |
| readWrite | static |
| relevance | static |
| rowdivid | static |
| sgqa | static |
| type | static |
The only down-side of using static substitution is that if you wanted to use {q.question} to show the text of a question, but you wanted to hide that value if the question was irrelevant, you would need to use the following instead:
At present, if q is irrelevant, q.question would not be shown at all.
Thoughts from the developers and broader community?