Newsletter: Learn More ||| Multimedia Presentation Software |||
How to obtain the results from a Wildform Flair or Wildform Quiz Creator Quiz
Communicating between Wildform Quiz and Javascript
Wildform Flair and Quiz Creator quizzes communicate with JavaScript in order to send quiz interaction and results to the browser. This mechanism can be extended to post into a database by using AJAX or similar methods. The main communication between Wildform Quiz and JavaScript is done in the following function:

quizname_DoFSCommand(command, args)

Where quizname is the name of your quiz.

Within that function there are four commands of interests: WFQuestionSequence, CMISetScoreMM_cmiSendInteractionInfo, MM_cmiSendSurveyInteractionInfo.

1. WFQuestionSequence: The order in which the questions arrive (useful in random ordered quiz):

var myArgs = new String(args);
if (command == "WFQuestionSequence")
// store the datamy

Args contains the order, separated by  <space>s

2. CMISetScore : The user score (note that "survey" questions are not included in the scoring:

var myArgs = new String(args);
if (command == "CMISetScore")
// store the data

myArgs contain the score

3. MM_cmiSendInteractionInfo: Answers to non survey questions:

var myArgs = new String(args);
if ((command == "MM_cmiSendInteractionInfo")
// store the data

myArgs contain the following information, separated by commas.

date => date the quiz is taken in year/month/day format
time  => time the quiz is taken in hours:minutes:seconds format
interationId => the question number
objectiveId => not used in Wildform Quiz
interactiontype => "F" for Fill The Blank; “S” for Sequencing; “M” for Matching; “C” for MultipleChoices; “T” for True Or False
correctResponse => correct reponse (format varies by question type)
studentResponse=> correct reponse (format varies by question type)
result =>“C” if user answered correctly, “W” otherwise
weight => always 1
latency => not used in Wildform Quiz

Example: 2008/06/09;22:21:29;Slide_2;;C;0;0;C;1;null

Note: this command is sent when user clicks the Submit button, or at the end of the quiz.  At the end of the quiz, questions on which the users had not clicked the Submit button are submitted and each question will trigger this event, unless the user did not answer the question.  If the user did not answer the question, the interpretation is up to you.  To see the message being passed, add a JavaScript alertbox inside the quizname_DoFSCommand(command, args)  function.

4. Answer to survey questions:

var myArgs = new String(args);
if ((command == "WF_cmiSendSurveyInteractionInfo")
// store the data

myArgs contains the same information as in #3 above.

Note that there is no wrong or right answer in survey questions, so the answer will not count towards the score.

Example

The following function is exported within the html file which gets exported with Flair export.  Search for “DoFSCommand” to find it:
(The blue text highlights changes made to the HTML generated by Flair.)

Note how each of the commands described earlier is used and stored.

The following additions in blue (which is not included in the html exported by Flair) is an example of how the data intercepted in “quiz_SCORM_2004_DoFSCommand” are posted to the database

Top
Sample PHP Code

Sample php code that posts the results into a MySql database.  This file is referenced above by postResult and postData

 

Top
 
©2008 Wildform, Inc | Policies | Contact Us | Newsletter Options
 
Wildform provides a 100% satisfaction guarantee on all our Flash software. If you are not completely satisfied with our Flash multimedia software for any reason you may request a refund within 15 days of purchase.