Hi,

When I try to start an ajax quiz, it never actually starts. (screenshot attached)
When I click start, it shows the Quiz information:
*Questions: 10
*Available: Always
*Pass rate: 75 %
*Backwards navigation: Allowed
Then I click 'Start Quiz', and it shows the Quiz information again!
The quiz never actually starts. What might the problem be?

Path: ?q=node/4411/ajax-quiz

Comments

accessiveapps’s picture

Same here

accessiveapps’s picture

But looking at the TODO.txt explains it

$Id: TODO.txt,v 1.5.4.5 2010/02/23 11:53:37 falcon Exp $

For a current TODO list please visit http://groups.drupal.org/quiz

Items
---------
- Adoptive quiz #413176
- Drag and Drop matching
- #497772
- certify
- Improve quiz taking
-- Optional menu for navigation between questions
-- Ajax
-- Follow fapi

---
Have additional suggestions? Please visit http://drupal.org/project/issues/quiz
and leave your feedback!

justingeeslin’s picture

Some progress.

I got the ajax quiz to work in Chrome, but no luck in Firefox.

In Firefox, this appears in the Error Console whenever I click the submit button 'Start Quiz'.

Error: [Exception... "'Initialization failed' when calling method: [nsILoginManagerStorage::init]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%203.5%20Beta%204/components/nsLoginManager.js :: anonymous :: line 116" data: no]
Source File: file:///C:/Program%20Files/Mozilla%20Firefox%203.5%20Beta%204/components/nsLoginManager.js
Line: 116

It appears to be specific to FF and may not affect other browsers.

Armenia’s picture

I've the same problem.
justingeeslin, suggest me how to get it working, please.

justingeeslin’s picture

I just enabled the module and it did seem to work in Chrome. Not sure why.

I also have the Ajax module installed, but I cannot confirm that that module has any effect.
http://drupal.org/project/ajax

Armenia’s picture

Hm.... I have also AJAX module enabled, but it not works, the module pass to the browser a table of quizz stats (*Questions: 10 *Available: Always *Pass rate: 75 % *Backwards navigation: Allowed).

Can u write your options for Quiz, what modules of quiz are enabled, what type of questions do u use (multichoice, etc)? do you have also Views module installed (do u enable ajax in views module)?

If there is a browser-compatibility problem, I'll try to write a patch for js. But before I must get it worked in at least 1 browser.

I see the problem is in the file ajax_quiz.admin.inc, on this line -

$output .= node_view($node, FALSE, FALSE);

The function node_view returns the stats of quiz, but it must start the quiz with link node/n/ajax-quiz

Any ideas, how to change the result of node_view with or without coding /change default output of node/?

I don't have such experience in drupal and quiz, this is my first project, sorry if there are logical mistakes. :)

And sorry again for my bad english:)

justingeeslin’s picture

Does the AJAX quiz work in the 4.1 release?

I notice now there is an Autoload module dependency.
Will the AJAX quiz not work without Autoload module?

albertk’s picture

I have the same problem with Internet Explorer, my quiz starts but I still stuck to the first question. I click next but he reload the first. Someone there a solution?

albertk’s picture

I found the cause of my problem. Compatibility Mode IE opened my page for IE7

DanaRoseRoss’s picture

Component: Code - Quiz module » Code - Import/Export
Status: Active » Needs review
StatusFileSize
new1.4 KB

These changes made the AJAX quiz work for me.

DanaRoseRoss’s picture

StatusFileSize
new2.04 KB

Updated the patch to include a fix to ajax_quiz.js. It was append()-ing the next question underneath the last one. This one swaps one question out for another, which I'm sure is how this is supposed to work.

DanaRoseRoss’s picture

StatusFileSize
new6.39 KB

One (hopefully) last patch. Our client wanted the AJAX quiz to render in a block so they could add quizzes to sidebars throughout the site. Also fixed issues when anonymous users used AJAX quizzes.

m2jalali’s picture

I changed code but again not working
show this message "An error has occurred. Please try again."
my website link
http://www.dolphin-sch.ir/node/251/ajax-quiz
username : dolphin
pass : 123

DanaRoseRoss’s picture

One more change. Not going to bother with a patch for this as it only comes up in certain circumstances....like out client's setup *grumble*

In ajax_quiz.admin.inc, around line 23 or 24 (where it builds the link), take out the whole call to url(), changing the line to read:

$output .= '<div class="ajax-quiz-start">' . l(t('Start'), "node/{$node->nid}/ajax-quiz", array('attributes' => array('class' => 'ajax-load-example'))) . '</div>';

justingeeslin’s picture

Sounds good. I will test this patch as soon as I can.
(Not that I'm a maintainer, but since I created this issue I'd like to confirm the patch.)

m2jalali’s picture

again not working
in Mozilla -> show this message "An error has occurred. Please try again."
in internet explorer -> show only first question . when click on next do not change .

ilanhaz’s picture

Component: Code - Import/Export » Code - Quiz core
Assigned: Unassigned » ilanhaz

Hello,
I had a problem with "Take by Ajax" only at FireFox. At IE it was working great.
I have applied the last patch ajax-quiz-1048886-12.patch and the last change in ajax_quiz.admin.inc and now both IE and FF has the same problem: it shows only the first question.

Please help.
Thanks
Ilan.

DanaRoseRoss’s picture

Here's another important change that needs to happen. ajax_quiz.js, line 9:

$('.form-submit:not(.form-submit-clicked)', context)

change to:

$('.ajax-quiz-wrapper .form-submit:not(.form-submit-clicked)', context)

Otherwise the AJAX quiz takes over every form on the page.

m2jalali’s picture

Hi
UNFORTUNATELY
again not working
in Mozilla -> show this message "An error has occurred. Please try again."
in internet explorer -> show only first question . when click on next do not change .

DanaRoseRoss’s picture

It's working fine for me, guys. Unless you can give me a URL to try & troubleshoot it, you're on your own to figure it out and submit a patch.

m2jalali’s picture

Hi
http://www.dolphin-sch.ir/node/251
my quiz module changed for download in changed like your patch
please guide me
thanks a lot

aks_richa’s picture

hey i had applied your patch but still not working... what should i do.... my quiz modules is 6.x-4.3..

djdevin’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)