Forum for the discussion around technical documentation, user documentation, website & testing

Variables documentation

  • a511197
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 1 month ago #7465 by a511197
Variables documentation was created by a511197
Hi there,

I'm looking for clarity on what should be added in the answer field and 'correct' field when setting up a variable MCQ, see attachment. I gave an end user the variable guide but they came back to me to say the guide doesn't mention what goes in these fields. Could someone clarify and possibly update the guide just so it's absolutely clear.

many thanks,
Alison

If you can use Lego, you can use Xerte
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago - 5 years 1 month ago #7470 by Fay
Replied by Fay on topic Variables documentation
Hi Alison
There are two options for how to do this:
1. Create a fourth variable (e.g. called 'd') with the fixed value of
Code:
[a]+[b]+[c]
and then reference the new variable in the answer field e.g. [d]
2. Dynamically calculate the answer directly in the answer field without the need for a new variable to be created. This can be done in this format:
Code:
[{[a]+[b]+[c]}]
where the [{ }] indicate that the variable sum within should be calculated rather than just shown on screen as separate variables.
Option 2 is a newer feature that I think has only been available since 3.9 so isn't in the variable guide that was written before then. I'll add info about how to do this & make how you would do option 1 a bit clearer. Thanks for flagging this up
Fay
Last edit: 5 years 1 month ago by Fay.
The following user(s) said Thank You: a511197, Menno

Please Log in or Create an account to join the conversation.

  • a511197
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 1 month ago #7471 by a511197
Replied by a511197 on topic Variables documentation
Hi Fay,

Thank you for this. I got it working using the first option but the second option is good to have too! It's been a long time since I used variables.

bw,
Alison

If you can use Lego, you can use Xerte

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #7781 by Menno
Replied by Menno on topic Variables documentation
Hello everyone,

Does someone have an overview of interactive pages that work with variables.

Best,
Menno

Please Log in or Create an account to join the conversation.

Moderators: ingdonronmhelenmdFay
Time to create page: 0.141 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo