<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Aha. I think i see what is happening.<br><br>Patrick, is there any way to address the responses object directly?<br>Something like:<br>interaction.responses[1].status<br><br>What I'm really driving at is there any way to dynamically set the correct status T/F?<br><br><hr id="stopSpelling">Subject: RE: [Xerte] How to use the judge function correctly<br>Date: Tue, 17 Feb 2009 16:40:44 +0000<br>From: Patrick.Lockley@nottingham.ac.uk<br>To: xerte@lists.nottingham.ac.uk<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">Well
I replied to this, but sent an attachment and it appears to have lost itself in
the ether.</font></span></div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">So <a href="http://www.nottingham.ac.uk/%7Ecczpl/response.rlo">http://www.nottingham.ac.uk/~cczpl/response.rlo</a></font></span></div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">basically</font></span></div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">Set
up an interaction, give it an id</font></span></div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">Add
to the interaction (i've used check boxes) a series of items, giving each one an
id, a response and a correct attribute</font></span></div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_586423616-17022009"><font color="#0000ff">At
some point, run some code and add to that code
<<interactionid>>.judge()</font></span></div><br>
<blockquote style="margin-right: 0px;">
<div class="EC_OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Dave
Burnett<br><b>Sent:</b> 17 February 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></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 color="#0000ff" face="Verdana">Hello</font></span></div>
<div dir="ltr" align="left"><span class="EC_EC_609571515-17022009"><font color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609571515-17022009"><font 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_609571515-17022009"><font color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609571515-17022009"><font 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_609571515-17022009"><font color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609571515-17022009"><font 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_609571515-17022009"><font color="#0000ff" face="Verdana"></font></span> </div>
<div dir="ltr" align="left"><span class="EC_EC_609571515-17022009"><font color="#0000ff" face="Verdana">Pat</font></span></div><br>
<blockquote style="margin-right: 0px;">
<div class="EC_EC_OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr>
<font 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 face="sans-serif">Hi List,</font> <br><br><font face="sans-serif">another beginner's question. Imagine the following
structure:</font> <br><font face="sans-serif">-- page 1</font> <br><font face="sans-serif">---- interaction: id=question1</font> <br><font face="sans-serif">-------- button 1: correct=0</font> <br><font face="sans-serif">-------- button 2: correct=0</font> <br><font face="sans-serif">-------- button 3: correct=1</font> <br><font face="sans-serif">-- page 2</font> <br><font face="sans-serif">---- script:
question1.judge()</font> <br><br><font 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 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> </blockquote><br /><hr />Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. <a href='http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008' target='_new'>Learn Now</a></body>
</html>