jewlofthelotus / SlickQuiz

A jQuery plugin for creating pretty, dynamic quizzes.
http://jewlofthelotus.github.com/SlickQuiz
MIT License
400 stars 244 forks source link

several quizes combined at one #26

Closed crazycoder82 closed 10 years ago

crazycoder82 commented 10 years ago

Thanks again for this pretty quiz plugin! and i wanna ask, is it possible to do like this: ex:

  1. we have several .json files where stored quiz questions like php.json, html.json, css.json, jquery.json.... (tests about php, html, css ....)
  2. we have a page where user checks quizes which he wants to take from all available quizes (in our example chose from to quizzes - php and css) and hits the let's say start button. The question is - is it possible to make this two choices combined together and start the quiz (user takes two quizes parallelly)? i mean user may switch beetween them if he wants and quiz should work. when goes php quiz on the top right corner we have button "swithc to css quiz" or something like that. if its possible, can you give me some example or explain how to implement it. thanks in advance!!!
jewlofthelotus commented 10 years ago

Yeah, something like this should be possible and probably wouldn't require any modification to the SlickQuiz plugin itself.

I would suggest not initializing the quiz via .slickQuiz() until your users have made their type selections. That way, as soon as they choose, you can pull those JSON objects in and merge them together. THEN you could initialize the quiz with a single JSON object containing all the questions.

crazycoder82 commented 10 years ago

Thank you for quick reply! Is it possible to have two slickquiz objects (quizzes)in one page and switch between them?

jewlofthelotus commented 10 years ago

You should be able to put multiple quizzes no the page as long as they're initialized on different elements.

There is not functionality built in that supports toggling between multiple datasets though. It would be doable, but you'd need to add that functionality on.

crazycoder82 commented 10 years ago

If we initialize quizzes on different elements, how can we add toggling functionality between multiple quizzes? Pls can you give me some directions about it (how to implement it)? thanks

jewlofthelotus commented 10 years ago

@crazycoder82 That would depend on the type of toggling functionality you're looking for. If you just want to show one quiz and hide the other, that's pretty straightforward toggling. If you want the end scores and rankings to account for the questions the user answered in both quizzes, then it will require a much more complex solution.

crazycoder82 commented 10 years ago

how we can switch between instances of plugin? like instance1 = active, instance2 = not active and how to acces them? or if you know can u give me name of some plugin where i can have a look if you know? thank u

jewlofthelotus commented 10 years ago

Like I said, that is not built in functionality, so you'd have to implement a custom JavaScript solution that handles toggling, resetting, or whatever you need it to do.

I do not know off the top of my head of any quiz plugins that allow this, but I also don't know of many good quiz plugins.

crazycoder82 commented 10 years ago

eventually i got it. three instances in one page. thanks

jewlofthelotus commented 10 years ago

Glad to hear it!