In SSI Web 8, I've programmed some dummy MaxDiff choice tasks at the beginning of my MaxDiff exercise using a free format question. Now, I would like to change the counter value that is displayed in the MaxDiff exercise to accommodate those extra tasks. I tried the following code
([% MaxDiffCurrentSet()+19 %] of [% MaxDiffTotalSets()+19 %]) but it just displayed 19 of 19. How can I accomplish this?
The following code will definitely not work, as you have experienced.
([% MaxDiffCurrentSet()+19 %] of [% MaxDiffTotalSets()+19 %])
It doesn't work because these two SSI Script functions are actually placeholders that run before Perl executes and won't allow mathematical calculations. That's why they blow up and display
(19 of 19).
So, for a work-around, here are three options.
1. Define a new text question on the same page as each MaxDiff question that only features the text you want displayed, such as (10 of 19).
2. Use the PageNumber() function, which does allow the addition or subtraction of numbers. For example:
[%PageNumber()-3%] of 19
3. Use some jQuery code somewhere on each MaxDiff page, like this: