How can I use a parameter formula in the question text of a calculated question?

How can I use a parameter formula in the question text of a calculated question?

by Pieter van der Hijden -
Number of replies: 2

Moodle 3.0

I am preparing a drill exercise for making divisions with whole numbers (and no rest amount). Think about the reverse of (1...10) * (1...10) tables.

My trial:

  • Question text: {{x}*{y}} / {y}?
  • Answer text: {x}
  • Parameters: both {x} and {y} are random numbers between 1 and 12

Expected result:

  • Parameters x=8, y=7
  • Question text: 56 / 7 ?
  • Answer text: 8

However, the question text appears like: {8*7}/7 ?

Please, advise.

Average of ratings: -
In reply to Pieter van der Hijden

Re: How can I use a parameter formula in the question text of a calculated question?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Change your question text to {={x}*{y}} / {y} and your text should then appear the way you want it to.

Average of ratings: Useful (1)