all groups > flash actionscript > october 2004 >
You're in the

flash actionscript

group:

SessionArray / eLearning


SessionArray / eLearning athena7878
10/10/2004 10:00:14 PM
flash actionscript:
Hi all,

First, sorry for my poor english, i'm a french user so I hope you will be able
to anderstand what I mean. lol

I work on Learning Interaction in Flash Mx 2004 PRO, I use the complete
component with result page and track for AICC.
For the moment, I don't have CMI system but i want to keep this option AICC
enable for later,
Maybe for my own CMI system or maybe to distribute my complete Module (lessons
+ Quiz...) with compatibility AICC

So for my personnal use, I need to integrate my Quiz (with 10 to 20
Interactions in) in my own ASP webSite and to save data in an Access database.

I would like to use SessionArray to "catch" data and send it to my insert.asp
file

I had insert a simple clip on the result page (last image of my fla file), and
I wrote an actionScript (just for the first Interct for testing) but my data
are always "undefined" in output :

What is wrong ?
The place of my script or the script himself ?
I need to change something in the Interact component about sessionarray ?
How to use trace() to know where is my problem ?

Thank you for all help you can give me.


SCRIPT :

onClipEvent(load) {
QuizData = new Object();
QuizData.interaction_id1 = SessionArray[0].interaction_id;
QuizData.interaction_type1 = SessionArray[0].interaction_type;
QuizData.objective_id1 = SessionArray[0].objective_id;
QuizData.weighting1 = SessionArray[0].weighting;
QuizData.correct_response1 = SessionArray[0].correct_response;
QuizData.student_response1 = SessionArray[0].student_response;
QuizData.result1 = SessionArray[0].result;
QuizData.latency1 = SessionArray[0].latency;
QuizData.dateStamp1 = SessionArray[0].dateStamp;
QuizData.timeStamp1 = SessionArray[0].timeStamp;
QuizData.send("insert.asp", QuizData, "POST");
}
Re: SessionArray / eLearning tjbalos
5/25/2006 6:56:24 PM
I was wondering if you ever received an answer to your question as I am faced
with the same problem.

I have an input field for participant's name and one for an e-mail address. I
have a submit button (code attached) to send the entered values and the
sessionArray values to an .asp file (attached) which sends them to an Access
database. The entered values transfer over without a problem. The
sessionArray values are lost.

What did I miss?



on (press) {
loadVariablesNum("processForm.asp", 0, "POST");
}

- - - - -

//processForm.asp

<%@language = "VBScript" %>
<%

strName = Request("ParticipantName")
strQ01Result = Request("_root.SessionArray[0].result")

MyPath=Server.MapPath("PrerequisiteWork.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath

SQL = "INSERT INTO results (UserName, Question01) VALUES
('"&strName&"','"&strQ01Result&"')"
conn.Execute(SQL)
%>
AddThis Social Bookmark Button