Open reachomk opened 3 years ago
So how would you fix this?
You most likely can't due to EdPuzzle's API changes, they've made it so that you can only view the correct answers to questions that you've already completed. Therefore EdPuzzle+ can't get the correct answers because you haven't solved the problem yet.
Doing some testing and this seems to be fixed
I tried sending a request to the following URL https://edpuzzle.com/api/v3/assignments/{ID}/questions
and got the following back (sorry it's not formatted)
{"questions":[{"type":"multiple-choice","questionNumber":0,"time":70.77,"duration":0,"_id":"618effc07c9285417a9f79b0","body":[{"text":"When you are subtracting, which number should go on top?","html":"<p>When you are subtracting, which number should go on top?</p>","_id":"618effc07c9285417a9f7955"}],"choices":[{"choiceNumber":1,"_id":"618effc07c9285417a9f797d","isCorrect":true,"body":[{"text":"","html":"<p>the bigger number</p>","_id":"618effc07c9285417a9f795b"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f795c"}]},{"choiceNumber":0,"_id":"618effc07c9285417a9f7980","isCorrect":false,"body":[{"text":"","html":"<p>the smaller number</p>","_id":"618effc07c9285417a9f795d"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f795e"}]}]},{"type":"multiple-choice","questionNumber":0,"time":119.75,"duration":0,"_id":"618effc07c9285417a9f79b8","body":[{"text":"What do you call the answer to a subtraction problem?","html":"<p>What do you call the answer to a subtraction problem?</p>","_id":"618effc07c9285417a9f7956"}],"choices":[{"choiceNumber":2,"_id":"618effc07c9285417a9f7983","isCorrect":true,"body":[{"text":"","html":"<p>difference</p>","_id":"618effc07c9285417a9f795f"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7960"}]},{"choiceNumber":0,"_id":"618effc07c9285417a9f7986","isCorrect":false,"body":[{"text":"","html":"<p>sum</p>","_id":"618effc07c9285417a9f7961"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7962"}]},{"choiceNumber":1,"_id":"618effc07c9285417a9f7989","isCorrect":false,"body":[{"text":"","html":"<p>product</p>","_id":"618effc07c9285417a9f7963"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7964"}]}]},{"type":"multiple-choice","questionNumber":0,"time":211.727,"duration":0,"_id":"618effc07c9285417a9f79c3","body":[{"text":"What is 15 - 7?","html":"<p>What is 15 - 7?</p>","_id":"618effc07c9285417a9f7957"}],"choices":[{"choiceNumber":1,"_id":"618effc07c9285417a9f798c","isCorrect":false,"body":[{"text":"","html":"<p>9</p>","_id":"618effc07c9285417a9f7965"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7966"}]},{"choiceNumber":2,"_id":"618effc07c9285417a9f798f","isCorrect":false,"body":[{"text":"","html":"<p>7</p>","_id":"618effc07c9285417a9f7967"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7968"}]},{"choiceNumber":0,"_id":"618effc07c9285417a9f7992","isCorrect":true,"body":[{"text":"","html":"<p>8</p>","_id":"618effc07c9285417a9f7969"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f796a"}]}]},{"type":"multiple-choice","questionNumber":0,"time":268.051,"duration":0,"_id":"618effc07c9285417a9f79ce","body":[{"text":"Which place should we begin subtracting?","html":"<p>Which place should we begin subtracting?</p>","_id":"618effc07c9285417a9f7958"}],"choices":[{"choiceNumber":2,"_id":"618effc07c9285417a9f7995","isCorrect":false,"body":[{"text":"","html":"<p>hundreds</p>","_id":"618effc07c9285417a9f796b"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f796c"}]},{"choiceNumber":1,"_id":"618effc07c9285417a9f7998","isCorrect":true,"body":[{"text":"","html":"<p>ones</p>","_id":"618effc07c9285417a9f796d"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f796e"}]},{"choiceNumber":0,"_id":"618effc07c9285417a9f799b","isCorrect":false,"body":[{"text":"","html":"<p>tens</p>","_id":"618effc07c9285417a9f796f"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7970"}]}]},{"type":"multiple-choice","questionNumber":0,"time":151.1,"duration":0,"_id":"618effc07c9285417a9f79d9","body":[{"text":"","html":"<p>What do you need to do when there is a bigger number on the bottom?</p>","_id":"618effc07c9285417a9f7959"}],"choices":[{"choiceNumber":0,"_id":"618effc07c9285417a9f799e","isCorrect":true,"body":[{"text":"","html":"<p>regroup!</p>","_id":"618effc07c9285417a9f7971"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7972"}]},{"choiceNumber":1,"_id":"618effc07c9285417a9f79a1","isCorrect":false,"body":[{"text":"","html":"<p>just subtract!</p>","_id":"618effc07c9285417a9f7973"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7974"}]}]},{"type":"multiple-choice","questionNumber":0,"time":287.957,"duration":0,"_id":"618effc07c9285417a9f79e1","body":[{"text":"","html":"<p>What is 16 - 8?</p>","_id":"618effc07c9285417a9f795a"}],"choices":[{"choiceNumber":0,"_id":"618effc07c9285417a9f79a4","isCorrect":true,"body":[{"text":"","html":"<p>8</p>","_id":"618effc07c9285417a9f7975"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7976"}]},{"choiceNumber":1,"_id":"618effc07c9285417a9f79a7","isCorrect":false,"body":[{"text":"","html":"<p>7</p>","_id":"618effc07c9285417a9f7977"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f7978"}]},{"choiceNumber":2,"_id":"618effc07c9285417a9f79aa","isCorrect":false,"body":[{"text":"","html":"<p>9</p>","_id":"618effc07c9285417a9f7979"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f797a"}]},{"choiceNumber":3,"_id":"618effc07c9285417a9f79ad","isCorrect":false,"body":[{"text":"","html":"<p>6</p>","_id":"618effc07c9285417a9f797b"}],"feedback":[{"text":"","html":"","_id":"618effc07c9285417a9f797c"}]}]}]}
which seems to return the correct isCorrect
param
I'm going to do further testing to make sure this isn't a cookies cache error (cache of my teacher account cookies still in my browser)
What Keyboardsheep said still stands true. It seems to be a cache error on edpuzzle's part.
This is likely because of the following line of code:
if (assignmentData[x].choices[y].isCorrect)
When taking a look at the JSON of my assignment using
https://edpuzzle.com/api/v3/assignments/[assignment id]
I have found that all fieldsisCorrect
are marked as false.