# Reset Calculated qtype comments on datasets to their initial coding

XMLWordPrintable

#### Details

• Type: Bug
• Status: Closed
• Priority: Minor
• Resolution: Fixed
• Affects Version/s: 2.6.5, 2.7.2, 2.8
• Fix Version/s:
• Component/s:
• Labels:
• Testing Instructions:
Hide
• Go to any question bank
• Create a new 'Calculated' question
• Set the following fields:
question name: Test MDL-48042
question text: Test MDL-48042
answer 1 formula = ( {x}*0.001)*{y}
* click save changes
* click next page
* Set the following fields:
wild card {x}

: 0.240
range min: 0.15
range max: 0.45
decimal places: 3
distribution: uniform

wild card

{y}

: 84.2
range min: 20
range max: 100
decimal places: 1
distribution: uniform

Tolerance ±: 0

format: significant figures
• click update the answers tolerance parameters

Expected: ERROR Correct answer : 0.020 outside limits of true value
Min: 0.020208 — Max: 0.020208

Modify * Correct answer shows* to 7

Expected: Correct answer : 0.020208 inside limits of true value
Min: 0.020208 — Max: 0.020208

This is a copy of the test done when testing MDL-47224 although here the expected result is different.
TO complete the test, create 100 set(s) of wild card(s) values.
There should be no error ( I tested 10 times).
Preview using the preview button.
Use Fill in correct response and submit.
You should obtain a 100% grade like the Test_MDL-48042.jpg

Notice that setting Tolerance to 0 is tricky as it implies that the 2 values are really equivalent.
In this specific test the number 7 was found by trial and error and its related to the fact that the answer equation and the range chosen for the variables does not give a response with a greater number of decimals.

Show
Go to any question bank Create a new 'Calculated' question Set the following fields: question name: Test MDL-48042 question text: Test MDL-48042 answer 1 formula = ( {x}*0.001)*{y} grade: 100% answer display: 3 significant figures * click save changes * click next page * Set the following fields: wild card {x} : 0.240 range min: 0.15 range max: 0.45 decimal places: 3 distribution: uniform wild card {y} : 84.2 range min: 20 range max: 100 decimal places: 1 distribution: uniform Tolerance ± : 0 Correct answer shows*: 3 format: significant figures click update the answers tolerance parameters Expected: ERROR Correct answer : 0.020 outside limits of true value Min: 0.020208 — Max: 0.020208 Modify * Correct answer shows* to 7 Expected: Correct answer : 0.020208 inside limits of true value Min: 0.020208 — Max: 0.020208 This is a copy of the test done when testing MDL-47224 although here the expected result is different. TO complete the test, create 100 set(s) of wild card(s) values. There should be no error ( I tested 10 times). Preview using the preview button. Use Fill in correct response and submit. You should obtain a 100% grade like the Test_ MDL-48042 .jpg Notice that setting Tolerance to 0 is tricky as it implies that the 2 values are really equivalent. In this specific test the number 7 was found by trial and error and its related to the fact that the answer equation and the range chosen for the variables does not give a response with a greater number of decimals.
• Affected Branches:
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
• Fixed Branches:
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
• Pull from Repository:
• Pull Master Branch:
MDL-48042_wip
• Pull Master Diff URL:

#### Description

MDL-47224 modify the way datasets handle the handling of \$answer->min and \$answer->min are calculated which could result in setting a good response with a 0 grade.
see MDL-47224 for more details

#### Attachments

1. MDL-47224.jpg
94 kB
2. Test_MDL-48402.jpg
92 kB

#### People

Assignee:
Pierre Pichet
Reporter:
Pierre Pichet
Peer reviewer:
Tim Hunt
Integrator:
Dan Poltawski
Tester:
David Monllaó
Participants:
Component watchers:
Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze