After updating to 7.x-1.6, my implementation of this module is now completely broken. I have written code that links a bunch of nodes together via a redirect on successful submission of the correct answer. Now that AJAX has been added by default, nothing works anymore. There doesn't seem to be anyway to turn AJAX off in configuration and if you do it in code by hard-coding $use_ajax = FALSE;, the module still breaks.

I think that there should be two branches for such a radical change as this as an update shouldn't cause me to re-write a module to make it work (I wouldn't have thought anyway).

Cheers,

Comments

jaydee1818 created an issue. See original summary.

Carsten Müller’s picture

Assigned: Unassigned » Carsten Müller

see https://www.drupal.org/node/2521992
there is a checkbox in the administration settings to disable the ajax support

see admin/config/system/field-quiz

jaydee1818’s picture

Ok thanks, but it is still broken because a redirect to a /quiz/success/some-id is new behaviour I'm pretty sure.

Carsten Müller’s picture

/quiz/success/some-id is a redirect to the success page and has at last parameter the node id of the quiz page. That is by purpose to be able accessing the original quiz node for having the title or the question again for example.
there is also the redirect to the quiz/sorry/nid page where the original quiz node id is used to add the link back to the question page in the retry link.

By this you can access the original quiz page again and use the data again in your messages for whatever needed.

Short notice beside: These are just small features added, so no major update needed, because it is not a rebuild of the module.
All previous features are still supported.

Carsten Müller’s picture

BTW i just checked version 7.x-1.x - see https://www.drupal.org/project/field_quiz/releases/7.x-1.0
There is also the same redirect logic included as in version 7.x-1.6

 // if user answered wrong
    if ($error) {
      // redirect the user to the sorry page
      $form_state['redirect'] = 'quiz/sorry/' . $form_state['values']['entity']->nid;
    }
    else {
      // redirect the user to the success page
      $form_state['redirect'] = 'quiz/success/' . $form_state['values']['entity']->nid;
    }
Carsten Müller’s picture

Hi,

is there still an issue here?
Else i will close it.

jaydee1818’s picture

I just haven't applied the update.