Qtype-Formula - Combine a calculation answer with MCE

Qtype-Formula - Combine a calculation answer with MCE

Marcelo Rodrigues發表於
Number of replies: 4
Hello everybody,

I hope you are well and have peace in your heart!

Please, I would like to ask for help in the following situation:

1- I have 4 questions that calculate the elasticity of demand for 4 products.

2- Demand elasticity can be of 3 types:

If elasticity is < 1, then we have inelastic demand

if the elasticity is = 1, then we will have unit demand (unit elasticity)

If the elasticity is > 1, then we will have elastic demand

I would like that on the side of each calculation for each elasticity, there was an MCE, with these 3 possibilities: inelastic - unitary - elastic.

Thus, after the calculation, according to the value, the student could choose the type of elasticity they found in the calculation.

It would be possible?

Thank you very much, Marcelo.
評比平均分數: -
In reply to Marcelo Rodrigues

Re: Qtype-Formula - Combine a calculation answer with MCE

AL Rachels發表於
Core developers的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Testers的相片
It has been a while since I did something similar, but I think you should be able to do what you want with the Formulas question type. https://moodle.org/plugins/qtype_formulas
In reply to AL Rachels

Re: Qtype-Formula - Combine a calculation answer with MCE

Marcelo Rodrigues發表於
Dear Al Rachels,

Thank you very much for your return.

You are sure! I was able to perform the combination using operators.

Thank you very much!

Marcelo.
In reply to Marcelo Rodrigues

Re: Qtype-Formula - Combine a calculation answer with MCE

Joachim Tropf發表於
Particularly helpful Moodlers的相片
Hi Marcelo,

the usage of MC is well descriped on Dominique's site dynamiccourseware.org .
The multichoice answers are put in an array:
       MCA = ["inelastic elasticity","unit elasticity","elastic elasticity"];
Depending on the results for e1, ... it must decided which element of the array is the right answer. So it is a nested IF:
       help = (e1 < 1) ? 0 : ( (e1==1) ? 1  :2 );    
As mentioned the result must be a number (in this case  0,1, or 2).
In parts text you have two possibilities:
Radio buttons:  {_0 : MCA} or a
dropdown menue: {_0 : MCA : MCE} !
(To my knowledge multiple answers are not possible!)

Find the question attached!

Cheers

Joachim
評比平均分數:Useful (3)
In reply to Joachim Tropf

Re: Qtype-Formula - Combine a calculation answer with MCE

Marcelo Rodrigues發表於
Hi Joaquim,

I hope you are well and at peace! 

I apologize for the delay in getting back to you. 

This strategy worked well. 

Thank you very much for helping me once again! 

Thank you very much! 

Marcelo.

Note: Thank you very much for the valuable explanations in your comments within the question - in the variable items. Explanations are extremely important to me!