-
Notifications
You must be signed in to change notification settings - Fork 21
Description
See #365 for more details, but the issue is that advanced problems can be randomized as documented here. Those seeds can cause there to be different correct answers for the same problem, making it difficult to understand which values are "correct". We may want to add the variant / seed of the problem to the transforms.
Here is a sample problem to test with:
<problem>
<script type="loncapa/python">
def test_add(expect, ans):
try:
a1=int(ans[0])
a2=int(ans[1])
return (a1+a2) == int(expect)
except ValueError:
return False
target_sum = random.randint(0, 100)
</script>
<p>Enter two integers that sum to $target_sum: </p>
<customresponse cfn="test_add" expect="$target_sum">
<textline size="40" label="Integer #1"/><br/>
<textline size="40" label="Integer #2"/>
</customresponse>
</problem>
To use this, in Studio: Add Problem -> Advanced tab -> Blank Advanced Problem. Paste the above. Then you can set the randomization value in the settings to "Always". You should be able to reset the problem and get a different value each time. This does get passed in the tracking event as "variant", but I wasn't able to find an xAPI concept for this information so we'd probably have to create one.