cereal-lab / EvoPIE

Evolutionary Peer Instruction Environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting question in quiz editor

profgrumpy opened this issue · comments

Does not work anymore, we are using xhr though, maybe time to update this to a fetch request?

NOTE - the test that revealed that bug involved having the same question added twice to a quiz; once when it had only 1 distractor, then again after adding another distractor
Before to go any further, verify that this is not a side effect of having multiple times the same question in a quiz. If so, we need to prevent that both from the UI and in the REST API.

Nope...
confirmed on a vanilla setup with different questions in a quiz.
Might be interfering with issue #56...
not sure...

ok need help figuring out how to step through the JS embedded in the page with VSCode. Assuming the console errors from issue #56 are also causing the problem, these are not allowing me to zero-in on any part of the code via the developer tools...

Just added a commit for issue #56 (aa81f0b)

I think this is the issue here:

href='#' onClick="removeQuizQuestion({{quiz}},{{qq.id}})" type="button" class=""
I think we might be getting the error because we are passing the quiz as one of the arguments, not sure if that is being serialized

You might be onto something there; I tried quiz | tojson and it gave me an internal server error explaining that the type quiz was not JSON serializable.

The above commit might fix the issue... we need to test this thoroughly to make sure that the problem is gone no matter what ends up in justifications / title / stem / answer / ...

Added justification column in distractor table as part of COP2512.S22 DB migration script so that we could test on real DB. It worked. Made sure both Easy Label Tests and Extensive Tests worked.
Closing for now until we find what's wrong and not obvious right now.