Tests & Quizzes: Not all global variables are exported on the xml - S2U-11

Description

Not all global variables are exported on the xml

Attachments

1
  • 02 Sep 2024, 06:45 AM

Activity

Show:

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:

  1. Import the pool “exportPool(5).xml”

  2. Click solution or test the question works fine

  3. Export the pool

  4. Import the pool (from the step 3)

  5. 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 than Y, the score is X * 2.

  • If X is greater than or equal to Y, the score is Y * 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 returns true_value if the condition is true, otherwise it returns false_value.

  • X < Y is the condition being tested.

  • X * 2 is the result when X is less than Y.

  • Y * 3 is the result when X is greater than or equal to Y.

  • Z is a global variable that is added to the final score.

Example Calculation:
If X = 5, Y = 10, and Z = 3, then:

  1. Check if X < Y: 5 < 10 (True).

  2. Calculate the score: 5×2=105 \times 2 = 105×2=10.

  3. 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 ?

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.

Fixed

Details

Priority

Affects versions

Fix versions

Assignee

Reporter

Labels

Created December 18, 2023 at 6:40 PM
Updated September 4, 2024 at 12:42 PM
Resolved December 19, 2023 at 11:12 AM

Flag notifications