learningequality / learningequality/studio
Update API to not return answers and hints as strings
Open
Nobody has claimed this yet.
P1 - important
TAG: tech update / debt
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Summary
Return assessment item's answers and hints as arrays.
Current response
{
assessment_id: "cad456647f974dc183aaf37e164fc526"
answers: "[{"answer": "Yellow", "correct": false, "order": 1}, {"answer": "Black", "correct": true,
"order": 2}]"
hints: "[{"hint": "Hint 1", "order": 1}, {"hint": "Hint 2", "order": 2}]"
...
}
Expected response
{
assessment_id: "cad456647f974dc183aaf37e164fc526"
answers: [{"answer": "Yellow", "correct": false, "order": 1}, {"answer": "Black", "correct": true,
"order": 2}]
hints: [{"hint": "Hint 1", "order": 1}, {"hint": "Hint 2", "order": 2}]
...
}
Subsequently, remove handling of strings from addAssessmentItem action, updateAssessmentItem action and ADD_ASSESSMENTITEMS mutation and their specs.
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
Start with the addAssessmentItem and updateAssessmentItem actions and the ADD_ASSESSMENTITEMS mutation referenced in the issue, then inspect their specs. Trace the assessment-item API response to confirm answers and hints are arrays, and remove the string-handling paths from those entry points and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100