<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<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="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_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">Hello</font></span></div>
<div dir="ltr" align="left"><span class="EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="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_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="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_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="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_609571515-17022009"><font size="2" color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_609571515-17022009"><font size="2" color="#0000ff" face="Verdana">Pat</font></span></div><br>
<blockquote style="margin-right: 0px;">
<div class="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!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_getmore_092008' target='_new'>Learn Now</a></body>
</html>