openedx / openedx/event-routing-backends
Add variant / seed to problem_check events
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named; start by tracing the tracking event's existing variant field through the transforms and reviewing how xAPI concepts are represented. Done means the transformed problem_check event carries the problem's variant or seed in a defined xAPI-compatible form, with the randomized sample problem producing distinguishable values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100