Tests & Quizzes: Not all global variables are exported on the xml - S2U-11
Description
Attachments
- 02 Sep 2024, 06:45 AM
is related to
Activity
Christina Schwiebert September 4, 2024 at 12:42 PM
I followed Jesus’s test plan from September 2. Imported the provided question pool, viewed the question details and solution, exported it, re-imported it, and viewed the question details for the re-imported pool. Both global variables were present.
https://trunk-maria.nightly.sakaiproject.org/, build 22738a5c
Jesus Maria Mendez Perez September 2, 2024 at 6:45 AM
Another test plan:
Import the pool “exportPool(5).xml”
Click solution or test the question works fine
Export the pool
Import the pool (from the step 3)
Click solution or test the question works fine
Mark Golbeck August 29, 2024 at 8:07 PM
I came up with this question:
Question:
You are given two variables: X
and Y
. You need to calculate a score based on the following condition:
If
X
is less thanY
, the score isX * 2
.If
X
is greater than or equal toY
, the score isY * 3
.
Global Variable:
Let’s assume we have a global variable Z
which is used to modify the score calculation.
Formula:
The final score S
is calculated as:
S=iff(X<Y,X×2,Y×3)+ZS = \text{iff}(X < Y, X \times 2, Y \times 3) + ZS=iff(X<Y,X×2,Y×3)+Z
In this formula:
iff(condition, true_value, false_value)
is a function that returnstrue_value
if thecondition
is true, otherwise it returnsfalse_value
.X < Y
is the condition being tested.X * 2
is the result whenX
is less thanY
.Y * 3
is the result whenX
is greater than or equal toY
.Z
is a global variable that is added to the final score.
Example Calculation:
If X = 5
, Y = 10
, and Z = 3
, then:
Check if
X < Y
: 5 < 10 (True).Calculate the score: 5×2=105 \times 2 = 105×2=10.
Add the global variable
Z
: 10+3=1310 + 3 = 1310+3=13.
So, the final score S
would be 13
.
I'm having trouble turning it into a question with global variables. What should I put in the text box for the calculated question? Can you assist me with this @Bernardo Garcia Vila ?
Thank you.
Bernardo Garcia Vila August 27, 2024 at 7:13 AM
Jesús just updated the test plan so this can be verified.
Bernardo Garcia Vila March 28, 2024 at 7:15 AM
Yes, I remember this being discussed on a S2U call. I think the editor swalled up the formula and he was going to add it back. Let me ask him again, thanks for the reminder.
Not all global variables are exported on the xml