The standard view of this forum does not always work well with assistive technology. We also provide a simpler view, which still contains all features. Switch to simple view.

Albert Gomez Post 1

1 July 2016, 8:16 AM

Two numerical answers in one answer box

Dear Moodle team,

How can two numerical answers be both written in the same answer box in a Variable numeric question type?

I know it is possible to do this and have already done so in Calculated (simple) questions by typing

floor({b}/{c}) . {b}%{c}

in the Answer 1 formula = box. 

Strange though it may look, the above formula works and allows students to enter both the quotient and the remainder in the Answer box (separated by any number of spaces).

I'd like to do the same in a Variable numeric (set) question, but the above formula doesn't work here. Is there any formula I could use?

Thanks a lot,

Al

Tim Hunt Post 2 in reply to 1

1 July 2016, 12:29 PM

That is nasty (but quite clever). I suggest that if you want to do something like that, you look at a more appropriate question type, such as STACK or formulas.

Albert Gomez Post 3 in reply to 2

1 July 2016, 4:36 PM

Dear Tim,

To date, that's the only way I know to make it work. I wish I knew a more formal way. Thinking about it, the possibility of stringing two (or more) numerical answers in a single answer box sounds quite handy, at least when it comes to testing simple division skills, as in this case. 

All the best,

Al