<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<STYLE>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</STYLE>
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV id=idOWAReplyText91120 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>I thought the same thing...</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Dave Burnett<BR><B>Sent:</B> Wed 18/02/2009 18:08<BR><B>To:</B> Xerte list<BR><B>Subject:</B> RE: [Xerte] How to use the judge function correctly<BR></FONT><BR></DIV>
<DIV><BR>I could test that, but since I got 0 instead of Undefined for the length query, I assumed the rest of the objects had to exist.<BR><BR><BR>
<HR id=stopSpelling>
Subject: RE: [Xerte] How to use the judge function correctly<BR>Date: Wed, 18 Feb 2009 18:02:25 +0000<BR>From: Julian.Tenney@nottingham.ac.uk<BR>To: xerte@lists.nottingham.ac.uk<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
<DIV id=EC_idOWAReplyText13302 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>does it exist when you try and get at it?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial>debug(question) ?? undefined??</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Dave Burnett<BR><B>Sent:</B> Tue 17/02/2009 16:26<BR><B>To:</B> Xerte list<BR><B>Subject:</B> RE: [Xerte] How to use the judge function correctly<BR></FONT><BR></DIV>
<DIV><BR>Hmm.<BR><BR>My interaction (id question) has 4 responses with names, id's, correct set to 1.<BR><BR>If I debug:<BR>question.responses.length<BR><BR>I get 0<BR><BR><BR><BR><BR>
<HR id=EC_stopSpelling>
Subject: RE: [Xerte] How to use the judge function correctly<BR>Date: Tue, 17 Feb 2009 15:17:15 +0000<BR>From: Patrick.Lockley@nottingham.ac.uk<BR>To: xerte@lists.nottingham.ac.uk<BR><BR>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2>Hello</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2>I don't know how this function works, but I can possibly help as thus</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2>INTERACTION.prototype.judge = function() {<BR> //check that each response whose correct is not undefined<BR> //has the same status as correct<BR> for (var i = 0; i<this.responses.length; i++) {<BR> if (this.responses[i].correct != undefined) {<BR> //trace(this.responses[i].correct +" " +this.responses[i].status);<BR> if (this.responses[i].correct != this.responses[i].status) {<BR> //doesn't match - user cannot have matched all correctly<BR> return false;<BR> }<BR> }<BR> }<BR> return true;<BR>};</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2>That is the flash source code of the function, so it looks like you need to set responses for the interactions for a judge to work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT face=Verdana color=#0000ff size=2>Pat</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=EC_EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Peter Huppertz<BR><B>Sent:</B> 17 February 2009 15:07<BR><B>To:</B> xerte@lists.nottingham.ac.uk<BR><B>Subject:</B> [Xerte] How to use the judge function correctly<BR></FONT><BR></DIV>
<DIV></DIV><FONT face=sans-serif size=2>Hi List,</FONT> <BR><BR><FONT face=sans-serif size=2>another beginner's question. Imagine the following structure:</FONT> <BR><FONT face=sans-serif size=2>-- page 1</FONT> <BR><FONT face=sans-serif size=2>---- interaction: id=question1</FONT> <BR><FONT face=sans-serif size=2>-------- button 1: correct=0</FONT> <BR><FONT face=sans-serif size=2>-------- button 2: correct=0</FONT> <BR><FONT face=sans-serif size=2>-------- button 3: correct=1</FONT> <BR><FONT face=sans-serif size=2>-- page 2</FONT> <BR><FONT face=sans-serif size=2>---- script: question1.judge()</FONT> <BR><BR><FONT face=sans-serif size=2>The script returns undefined, regardless of what the user clicks. I also tried false and true instead of 0 and 1. What's wrong?</FONT> <BR><BR><FONT face=sans-serif size=2>Peter Huppertz</FONT></BLOCKQUOTE><BR>
<HR>
Get more out of the Web. Learn 10 hidden secrets of Windows Live. <A href="http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_getmore_092008">Learn Now</A> </DIV><BR>
<HR>
See how Windows Mobile brings your life together—at home, work, or on the go. <A href="http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/" target=_new>See Now</A> </DIV></BODY></HTML>