<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>In the last response. :-)<br><br><hr id="stopSpelling">Subject: RE: [Xerte] How to use the judge function correctly<br>Date: Wed, 18 Feb 2009 18:19:21 +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_idOWAReplyText14047" dir="ltr">
<div dir="ltr"><font size="2" color="#000000" face="Arial">responses is initialised to an empty array when the interaction class is initialised. So the instance must exist. It may or may not have had responses added to it yet, or all the responses added - where is the script that tries to address them?</font></div></div>
<div dir="ltr"><br>
<hr>
<font size="2" face="Tahoma"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk on behalf of Julian Tenney<br><b>Sent:</b> Wed 18/02/2009 18:09<br><b>To:</b> Xerte discussion list<br><b>Subject:</b> RE: [Xerte] How to use the judge function correctly<br></font><br></div>
<div dir="ltr">
<div id="EC_idOWAReplyText91120" dir="ltr">
<div dir="ltr"><font size="2" color="#000000" face="Arial">I thought the same thing...</font></div></div>
<div dir="ltr"><br>
<hr>
<font size="2" face="Tahoma"><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="EC_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_EC_idOWAReplyText13302" dir="ltr">
<div dir="ltr"><font size="2" color="#000000" face="Arial">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 size="2" face="Tahoma"><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_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_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">Hello</font></span></div>
<div dir="ltr" align="left"><span class="EC_EC_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">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_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">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_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">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_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">Pat</font></span></div><br>
<blockquote style="margin-right: 0px;">
<div class="EC_EC_EC_OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr>
<font size="2" face="Tahoma"><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 size="2" face="sans-serif">Hi List,</font> <br><br><font size="2" face="sans-serif">another beginner's question. Imagine the following structure:</font> <br><font size="2" face="sans-serif">-- page 1</font> <br><font size="2" face="sans-serif">---- interaction: id=question1</font> <br><font size="2" face="sans-serif">-------- button 1: correct=0</font> <br><font size="2" face="sans-serif">-------- button 2: correct=0</font> <br><font size="2" face="sans-serif">-------- button 3: correct=1</font> <br><font size="2" face="sans-serif">-- page 2</font> <br><font size="2" face="sans-serif">---- script: question1.judge()</font> <br><br><font size="2" face="sans-serif">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 size="2" face="sans-serif">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/">See Now</a> </div></div><br /><hr />Stay up to date on your PC, the Web, and your mobile phone with Windows Live. <a href='http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/' target='_new'>See Now</a></body>
</html>