Copy link to clipboard
Copied
Hi everybody,
I need to create some e-learning modules with Captivate to save users's records (sorry for my poor english, i'm french). In fact I want to make a package in wich user course is saved, i mean I want to see the results of the quizz for each questions, the % of good answers etc... How can i do this ?
I tried with a LMS (claroline) but it just send the progression in the package, no results to quizz and for each questions
I'm so disappointed because I had to finish this in just 2 weeks,
Some help would be very helpful and appreciated,
thanks a lot !
1. To be able to track all answer options at the end of the quiz, you will need to have an array in JS. You can update each member of the array upon slide change. To determine if a slide has changed, you can use the cpInfoCurrentSlide variable.
2. For go to next slide, you can use rdcmndNextSlide variable. You will have to sue cpSetValue() function for this. This is how you do it:
document.Captivate.cpSetValue("rdcmndNextSlide", 1);
Copy link to clipboard
Copied
Recording the results you require to an LMS is certainly possible. Whether Claroline supports recprdomg those results, I don't know.
However, the first step is to setup your Captivate lesson properly. Look in the Quiz Preferences for all the various settings, as well as Project > Advanced Interactions....and read the help files and search these forums. The setup for such quiz recording has been discussed a lot, so you should be able to setup your CP lesson as is required with a bit of research.
However, recording those results to an LMS, again, requires an LMS that supports it. Claroline may... If not, Moodle does (at least, mostly). You can always test the settings using the ADL Test Suite as well (though it's not for saving data, just for testing).
HTH
Erik
Copy link to clipboard
Copied
Ok thanks, I will try Moodle.
But is there any other way to get thoses answers to questions ? I mean other than a LMS ?
Copy link to clipboard
Copied
You can access the quizzing variables from either Flash or Javascript and then save the results of the quiz in a file using AS or JS. Kindly let me know if this a viable option for you. If so, I will let you know the procedure to do it.
Copy link to clipboard
Copied
Yes this exactly what I want to do. I develop something to do that but it's not working perfectly. I want to use JS and then PHP. Thanks a lot.
See what i tried to do :
function getData(a) {
if(!a){
return false
}
var stripCoreData = a.replace("Core Data", "");
stripCoreData = stripCoreData.replace("Interaction Data", " \" \"");
stripCoreData = stripCoreData.split("\" \"");
// Enlever les doubles quotes dans Core Data
var stripQuotes = stripCoreData[1]; // stripCoreData[1] = données Core Data
while(stripQuotes.indexOf("\"") !=-1){
stripQuotes=stripQuotes.replace("\"", "");
}
// Retouner le résultat sous forme de tableau (Core Data)
var results_coreData = stripQuotes.split(",");
alert(stripCoreData);
// Enlever les doubles quotes dans Interaction Data
tabLength = stripCoreData.length - 3;
tabInteractionData = new Array(tabLength);
var intCompteur = 0;
for(var i = 3; i<stripCoreData.length;i++)
{
var stripQuotes = stripCoreData;
while(stripQuotes.indexOf("\"") !=-1){
stripQuotes = stripQuotes.replace("\"", "");
}
tabInteractionData[intCompteur] = stripQuotes;
intCompteur++;
}
// Remplissage des données core Data
var result = [ 4 + tabInteractionData.length ];
result['RawScore'] = results_coreData[2];
result['MaxScore'] = results_coreData[3];
result['MinScore'] = results_coreData[4];
var Pourcentage = result.RawScore/result.MaxScore;
result['Pourcentage'] = Pourcentage*100;
//Remplissage des données interaction Data
for(var j = 0; j < tabInteractionData.length;j++ ){
result['InteractionData' + j.toString()] = tabInteractionData;
}
return result;
}
Then i call this function in the sendMail function, like this :
datas = getData(gstrEmailBody);
But I want a function to be ready for all my modules, I mean I don't want to have to modify the code for every modules, I want something automatic
Thanks.
Copy link to clipboard
Copied
I am not sure if I understood the code perfectly, but I didn't see any part of the code from which you are trying to access a captivate variable.
To access a captivate variable from JS, you will need to use the cpGetValue() function. It takes one parameter which is the name of the Cp variable which you want to access.
for eg: If you wish to access the variable to display the final percentage of the quiz in your HTML page,
var finalPercentage = document.Captivate.cpGetValue("cpInfoPercentage");
document.write(finalPercentage);
I am not sure if this is going to be of any help.
Copy link to clipboard
Copied
Hi,
Thanks for this tricks ! I tried
var answer = document.Captivate.cpGetValue("cpQuizInfoAnswerChoice ");
document.write(answer);
But it doesn't work Any Idea ?
Copy link to clipboard
Copied
I see a space that has been inserted after the name of the variable within the quotes. Try after removing that space.
Copy link to clipboard
Copied
LOL, yes sorry I'm dumb xD
It works but it give me only the lastest answer given, not all answer. Have I to make it in each slide ? I mean on Cp in first question slide, i go to question options and execute this JS if right answer or wrong ? Can't I track all answer variable at the end of the quizz ?
Also, do you know, in JS, how to say "GoToNextSlide()" without have to give the numer of the slide to the function ?
Thanks a lot
Copy link to clipboard
Copied
1. To be able to track all answer options at the end of the quiz, you will need to have an array in JS. You can update each member of the array upon slide change. To determine if a slide has changed, you can use the cpInfoCurrentSlide variable.
2. For go to next slide, you can use rdcmndNextSlide variable. You will have to sue cpSetValue() function for this. This is how you do it:
document.Captivate.cpSetValue("rdcmndNextSlide", 1);
Copy link to clipboard
Copied
Damn !!! You are a god
Really thanks for this help, this is so great !
This easiest in comparison of paking a JS function with CP hacking THANKS A LOT AGAIN !!! xD
Copy link to clipboard
Copied
Hmm, I need your help again
Can you please give an example of code to keep, for each slide, the score and the answers (maybe a function to do that?).
Thanks man