I'm putting a quiz into Lectora & am trying to trap the score so I can do some branching in the course. I noticed that when I placed alert(arrArgs[1]) in the CC_StoreQuizResult function of the quiz.js file, it gets called twice at the conclusion of the quiz. Any idea why this would be happening?
It seems to me that it should only get called once to report the final quiz score. I just started looking at it so I might be missing something somewhere.
Although the article mentions Presenter, the same process applies to Quizmaker. This debug log will give you a better idea of exactly what is being sent to the LMS.
Thanks, but in my case I'm not publishing for LMS because I don't want Quizmaker reporting anything to the LMS. I need to capture the score before it get's reported, and then if they pass, I manually set the AICC Lesson Status to completed and send the score to the LMS. If they fail, I'm sending them back to the quiz for up to 2 more retries. If they fail after the 3rd try, they fail the course.
We're giving them a different message depending on whether it's the 1st, 2nd, or 3rd time through the quiz. It's my first time using Quizmaker so I'm trying to learn what the functions in the quiz.js file do. I can code a workaround so my function ignores the second time CC_StoreQuizResult is sent. I just found it odd that it was getting called twice at the end of the quiz.
Same problem here - plus another: if the last question on the last slide is answered incorrectly, CC_StoreQuizResult is called. When the user tries to answer the question again - we allow another try for every question - CC_StoreQuizResult is called again.
Then the original problem discussed happens on the final slide - CC_StoreQuizResult is called twice. Total calls of your method: 3.
If the user answers the last question correctly, the only problem is the duplicate call to CC_StoreQuizResult. Since the resulting score is the same, this specific problem can be worked around.
But calling CC_StoreQuizResult when answering incorrectly BEFORE the quiz is actually complete? That one I can't work around.
Articulate code is calling CC_StoreQuizResult. I track this using Firebug. This procedure is called errantly. Regardless of what we do after or within this procedure... there's 2 bugs in your (Flash?) code that calls this JS code.
Could you please explain the exact method you are using that shows the CC_StoreQuizResult is getting called twice. I've been looking into this issue, but do not see where this happening.
console.debug(CC_StoreQuizResult,g_oQuizResults); //use this to debug in FF
break;
...
-----------------------
That last block has the only custom change to your JS file for the simple purpose of bug reproduction. Using that I'm able to see that this code within the player_DoFSCommand function is called inappropriately.
Also, here's the HTML header of of "quiz.html" so you can see what program generated this:
Can you tell me what is happening in your LMS that is a problem? Regardless of how many times we "storequizresult", we only commit the data to the LMS when the content is exited.
Are you having a problem where the second attempt on content is overwriting the previously recorded score? If not, can you clarify your issue?
I'm afraid after this point we use a custom LMS and I know it's unsupported. I assumed the call to CC_StoreQuizResult was the "commit" function because nothing else close to that functionality seems to get called on completion (within the JS, anyway).
There's not a lot of help that I can provide since you're using a custom LMS. Out of curiosity, are you using an implementation of SCORM or are you attempting to grab that same information without using SCORM?
I understand. We're using a custom tracking method that integrates into our existing Customer Support Website. I use JavaScript to get the result (quiz and lesson slide views) then use Ajax to save it to our server.
12 Replies
Hi Jeff,
Instead of putting an alert in the quiz.js file, you should be using the method below to initiate a debug log:
http://www.articulate.com/support/presenter09/kb/?p=936
Although the article mentions Presenter, the same process applies to Quizmaker. This debug log will give you a better idea of exactly what is being sent to the LMS.
Thanks, but in my case I'm not publishing for LMS because I don't want Quizmaker reporting anything to the LMS. I need to capture the score before it get's reported, and then if they pass, I manually set the AICC Lesson Status to completed and send the score to the LMS. If they fail, I'm sending them back to the quiz for up to 2 more retries. If they fail after the 3rd try, they fail the course.
We're giving them a different message depending on whether it's the 1st, 2nd, or 3rd time through the quiz. It's my first time using Quizmaker so I'm trying to learn what the functions in the quiz.js file do. I can code a workaround so my function ignores the second time CC_StoreQuizResult is sent. I just found it odd that it was getting called twice at the end of the quiz.
Unfortunately, we don't support custom modifications. However, I'm glad that you were able to find a workaround.
Same problem here - plus another: if the last question on the last slide is answered incorrectly, CC_StoreQuizResult is called. When the user tries to answer the question again - we allow another try for every question - CC_StoreQuizResult is called again.
Then the original problem discussed happens on the final slide - CC_StoreQuizResult is called twice. Total calls of your method: 3.
If the user answers the last question correctly, the only problem is the duplicate call to CC_StoreQuizResult. Since the resulting score is the same, this specific problem can be worked around.
But calling CC_StoreQuizResult when answering incorrectly BEFORE the quiz is actually complete? That one I can't work around.
Articulate code is calling CC_StoreQuizResult. I track this using Firebug. This procedure is called errantly. Regardless of what we do after or within this procedure... there's 2 bugs in your (Flash?) code that calls this JS code.
Can this be investigated?
Affected versions:
3.0.901.713
3.3.1103.112
Version that works OK:
2.10.045
Michael or Jeff,
Could you please explain the exact method you are using that shows the CC_StoreQuizResult is getting called twice. I've been looking into this issue, but do not see where this happening.
Thanks.
Certainly, the filename is "quiz.js" and here are the important bits:
/********************************************************/
// Chico.js
/********************************************************/
// Results Screen vars
var g_strPlayer = "chico";
var g_arrResults = new Array();
var g_oQuizResults = new Object();
g_oQuizResults.oOptions = new Object();
// Browser Sniffing
var IE = ((document.all)&&(navigator.appVersion.indexOf("MSIE")!=-1)) ? true : false;
var IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
var FF = (navigator.userAgent.indexOf("Firefox")!=-1) ? true : false;
var Opera = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false;
var IESP2 = ((window.navigator.userAgent.indexOf("MSIE")) && window.navigator.userAgent.indexOf("SV1") > window.navigator.userAgent.indexOf("MSIE"));
var Safari3 = (navigator.appVersion.indexOf("Safari") && navigator.appVersion.indexOf("Version/3"));
var NS6plus = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var NS7_2Plus = false;
var Mozilla1_7Plus = false;
var g_bLMSPresent = false;
That last block has the only custom change to your JS file for the simple purpose of bug reproduction. Using that I'm able to see that this code within the player_DoFSCommand function is called inappropriately.
Note: my console.debug should double-quote that first parameter, CC_StoreQuizResult, because it's just a string. My fault during the posting of this.
Hi Michael,
Can you tell me what is happening in your LMS that is a problem? Regardless of how many times we "storequizresult", we only commit the data to the LMS when the content is exited.
Are you having a problem where the second attempt on content is overwriting the previously recorded score? If not, can you clarify your issue?
I'm afraid after this point we use a custom LMS and I know it's unsupported. I assumed the call to CC_StoreQuizResult was the "commit" function because nothing else close to that functionality seems to get called on completion (within the JS, anyway).
Hi Michael,
There's not a lot of help that I can provide since you're using a custom LMS. Out of curiosity, are you using an implementation of SCORM or are you attempting to grab that same information without using SCORM?
I understand. We're using a custom tracking method that integrates into our existing Customer Support Website. I use JavaScript to get the result (quiz and lesson slide views) then use Ajax to save it to our server.
Hi Michael,
You might want to check out this solution that I published a while back...it may give you some insight:
http://www.articulate.com/forums/articulate-quizmaker/8169-articulate-09-email-results-tutorial-php.html
This discussion is closed. You can start a new discussion or contact Articulate Support.