sequence of multiple choice questions

I tested several plugins available for questions in the community, but did not find what I need. I need to implement a sequence of multiple choice questions. I'm implementing a website for online tests. Can anyone help me?

  • mmm do you mean that you have a list of question and answers implemented with radio/dropdown/multiselect and each answer and question dynamically modify itself basing on other answers?

    If that is the case you must use JavaScript! Basically you can attach a 'onchange' listener on all answers, so each time an answer is picked, something happens, then your 'onchange' handler will do what you need.

    In jQuery is somthing like this:

    $('radiobuttons_answer1').change(function(){

        modify_answare2();

        ...

    });

  • the questions do not change ... the answer must be with ajax. In answering I don't want the reload.

    thanks

  • Depends whether you want the correct answer displayed instantly. If not, the logic would be:

    1. Render all of your questions on a page

    2. Apply css to hide containers with questions

    3. On next/prev click, display the next/prev questions

    4. Upon submit, use a regular Elgg action to process the results and render a page with stats

     

    In this scenario, you don't really need AJAX. 

    You can however implement the entire things with AJAX, which might be a little more complex.