Issues While delivering questions done on perseus

22 views
Skip to first unread message

Binayak

unread,
Oct 22, 2014, 2:55:28 AM10/22/14
to khanacademy...@googlegroups.com
I am trying to create an exercise using Perseus. In my case I have created two questions. I am trying to serve these questions in a streak.I am using AJAX to get next question JSON from server always. 

Q1 --> Q2 --> Q1 ---> Q2 ---> Q1

Eg: Suppose Q1 is multiple type question having 2 choices, I selected second choice which was correct. Then the next question Q2 comes because I have selected correct choice for Q1. Q2 is also multiple choice question alos having 2 choices but when it rendered the second option is selected by default as I have selected second one in previous question Q1. 

How do I clear previous choice or input text?.
 



Thanks 

Aria

unread,
Oct 23, 2014, 5:12:42 PM10/23/14
to khanacademy...@googlegroups.com, content-tools-blackhole
Hi!

That's awesome you've gotten so much working!

I think that's caused by a bit of a bug on our side. The workaround solution for now is that unmounting and remounting the itemrenderer on each new item should make everything behave nicely.

To do that, you should call React.unmountComponentAtNode(itemMountNode) before calling React.renderComponent. [React.unmountComponentAtNode in the official docs: http://facebook.github.io/react/docs/top-level-api.html#react.unmountcomponentatnode ]. This clears all the state of the ItemRenderer and I think will solve your problem.

~Aria

--
You received this message because you are subscribed to the Google Groups "Khan Academy Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to khanacademy-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Binayak

unread,
Oct 24, 2014, 5:15:34 PM10/24/14
to khanacademy...@googlegroups.com, content-too...@khanacademy.org
Thanks. It worked :). 
To unsubscribe from this group and stop receiving emails from it, send an email to khanacademy-developers+unsub...@googlegroups.com.

Oresoft Live Web Class

unread,
Oct 24, 2014, 5:16:34 PM10/24/14
to khanacademy...@googlegroups.com, content-tools-blackhole
Thanks. It worked :)

--
You received this message because you are subscribed to a topic in the Google Groups "Khan Academy Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/khanacademy-developers/1v0sI5OFgq8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to khanacademy-devel...@googlegroups.com.

Aria

unread,
Oct 24, 2014, 5:23:27 PM10/24/14
to khanacademy...@googlegroups.com, content-tools-blackhole
Great :)

To unsubscribe from this group and stop receiving emails from it, send an email to khanacademy-devel...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages