<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>Yes, thank you Peter.<br>That works as expected.<br><br>You can poll the responses, and if you receive an "Undefined" if no correct attribute exists, else you get the value of the correct attribute, and it can be set.<br><br>You an also add the attribute if you want:<br>interaction.XMLElement.childNodes[2].clip().CreateAttribute["correct"];<br><br>then set it.<br><br><br>Paul, I had tried both syntaxes.<br>No luck. <br><br><br><br>&nbsp;<br><hr id="stopSpelling">To: xerte@lists.nottingham.ac.uk<br>Subject: RE: [Xerte] How to use the judge function correctly<br>From: peter.huppertz@baselgovernance.org<br>Date: Tue, 17 Feb 2009 19:33:54 +0100<br><br><font size="2" face="sans-serif">What seems to work is the following:</font>
<br>
<br><font size="2" face="sans-serif">interactionID.XMLElement.childNodes[0].clip().correct
= true;</font>
<br>
<br><font size="2" face="sans-serif">childNodes[0] is the first response,
childNodes[1] the second and so on.</font>
<br>
<br><font size="2" face="sans-serif">Peter</font>
<br>
<br>
<br>
<table width="100%">
<tbody><tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">From:</font>
</td><td><font size="1" face="sans-serif">Dave Burnett &lt;d_b_burnett@hotmail.com&gt;</font>
</td></tr><tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">To:</font>
</td><td><font size="1" face="sans-serif">Xerte list &lt;xerte@lists.nottingham.ac.uk&gt;</font>
</td></tr><tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">Date:</font>
</td><td><font size="1" face="sans-serif">02/17/2009 07:19 PM</font>
</td></tr><tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">Subject:</font>
</td><td><font size="1" face="sans-serif">RE: [Xerte] How to use the judge function
correctly</font>
</td></tr><tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">Sent by:</font>
</td><td><font size="1" face="sans-serif">xerte-bounces@lists.nottingham.ac.uk</font></td></tr></tbody></table>
<br>
<hr noshade="noshade">
<br>
<br>
<br><font size="2" face="Verdana"><br>
Thanks Paul. Including the RS did indeed allow me to address (and set)
the correct status on the fly.<br>
<br>
Now I'm wondering if you have to know the rs values or you can use an object
reference:<br>
<br>
Say instead of <br>
interaction.response.checkbox.correct;<br>
<br>
this<br>
<br>
interaction.response[1].correct;<br>
<br>
That unfortunately gives me "Undefined"<br>
<br>
<br>
<br>
</font>
<hr><font size="2" face="Verdana">Subject: RE: [Xerte] How to use the judge
function correctly<br>
Date: Tue, 17 Feb 2009 09:38:35 -0800<br>
From: Paul.Swanson@harlandfs.com<br>
To: xerte@lists.nottingham.ac.uk<br>
</font>
<br><font size="2" color="#004080" face="Calibri">Dave, I believe if you set
the rs property of the response, you can address it directly.</font>
<br><font size="2" color="#004080" face="Calibri">&nbsp;</font>
<br><font size="2" color="#004080" face="Calibri">From the Help:</font>
<br><font size="2" color="#004080" face="Calibri">&nbsp;</font>
<br><font size="2" face="Arial"><b>Common Response Properties</b></font>
<br><font size="2" face="Arial">All interaction responses share some common
properties:</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>name</i></font>
<br><font size="2" face="Arial">The name of the icon you will see on the
document tree.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>id</i></font>
<br><font size="2" face="Arial">An id that refers to the theoretical 'page'
that contains the content associated with an interaction response. The<i>
id </i>property is optional.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>rs</i></font>
<br><font size="2" face="Arial">An id that refers to the actual interactive
element, such as the button itself. The <i>rs </i>property is optional.
You will use this when scripting interactions.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>type</i></font>
<br><font size="2" face="Arial">The type of response. This is set automatically.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>erase</i></font>
<br><font size="2" face="Arial">This setting of 1 or 0 determines whether
the contents of this response are erased when<i> </i>other responses on
the interaction are matched.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Arial"><i>exit</i></font>
<br><font size="2" face="Arial">A boolean (0 or 1) value that determines
whether the response will cause the interaction to exit, or not. Interactions
that are set to perpetual will not exit, regardless of the response setting.
You can force an interaction to exit by calling it's exit method: <i>id.exit();</i></font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="#004080" face="Calibri">&nbsp;</font>
<br><font size="2" color="#004080" face="Calibri">&nbsp;</font>
<br><font size="2" face="Tahoma"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk
[</font><a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><font size="2" face="Tahoma">mailto:xerte-bounces@lists.nottingham.ac.uk</font></a><font size="2" face="Tahoma">]
<b>On Behalf Of </b>Dave Burnett<b><br>
Sent:</b> Tuesday, February 17, 2009 9:31 AM<b><br>
To:</b> Xerte list<b><br>
Subject:</b> RE: [Xerte] How to use the judge function correctly</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" face="Verdana">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?</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Verdana">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</font>
<br><font size="2" color="blue" face="Verdana">Well I replied to this, but
sent an attachment and it appears to have lost itself in the ether.</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">So </font><a href="http://www.nottingham.ac.uk/%7Ecczpl/response.rlo"><font size="2" color="blue" face="Verdana"><u>http://www.nottingham.ac.uk/~cczpl/response.rlo</u></font></a>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">basically</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">Set up an interaction, give
it an id</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">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>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">At some point, run some code
and add to that code &lt;&lt;interactionid&gt;&gt;.judge()</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Tahoma"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk
[</font><a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><font size="2" face="Tahoma">mailto:xerte-bounces@lists.nottingham.ac.uk</font></a><font size="2" face="Tahoma">]
<b>On Behalf Of </b>Dave Burnett<b><br>
Sent:</b> 17 February 2009 16:26<b><br>
To:</b> Xerte list<b><br>
Subject:</b> RE: [Xerte] How to use the judge function correctly</font>
<br><font size="2" face="Verdana"><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>
</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Verdana">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</font>
<br><font size="2" color="blue" face="Verdana">Hello</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">I don't know how this function
works, but I can possibly help as thus</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" 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&lt;this.responses.length; i++) {<br>
 &nbsp;if (this.responses[i].correct != undefined) {<br>
 &nbsp; //trace(this.responses[i].correct +" " +this.responses[i].status);<br>
 &nbsp; if (this.responses[i].correct != this.responses[i].status) {<br>
 &nbsp; &nbsp;//doesn't match - user cannot have matched all correctly<br>
 &nbsp; &nbsp;return false;<br>
 &nbsp; }<br>
 &nbsp;}<br>
 }<br>
 return true;<br>
};</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" 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>
<br><font size="2" face="Verdana">&nbsp;</font>
<br><font size="2" color="blue" face="Verdana">Pat</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Tahoma"><b>From:</b> xerte-bounces@lists.nottingham.ac.uk
[</font><a href="mailto:xerte-bounces@lists.nottingham.ac.uk"><font size="2" face="Tahoma">mailto:xerte-bounces@lists.nottingham.ac.uk</font></a><font size="2" face="Tahoma">]
<b>On Behalf Of </b>Peter Huppertz<b><br>
Sent:</b> 17 February 2009 15:07<b><br>
To:</b> xerte@lists.nottingham.ac.uk<b><br>
Subject:</b> [Xerte] How to use the judge function correctly</font>
<br><font size="2" face="Arial">Hi List,</font><font size="2" face="Verdana">
<br>
</font><font size="2" face="Arial"><br>
another beginner's question. Imagine the following structure:</font><font size="2" face="Verdana">
</font><font size="2" face="Arial"><br>
-- page 1</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
---- interaction: id=question1</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
-------- button 1: correct=0</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
-------- button 2: correct=0</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
-------- button 3: correct=1</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
-- page 2</font><font size="2" face="Verdana"> </font><font size="2" face="Arial"><br>
---- script: question1.judge()</font><font size="2" face="Verdana"> <br>
</font><font size="2" face="Arial"><br>
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><font size="2" face="Verdana">
<br>
</font><font size="2" face="Arial"><br>
Peter Huppertz</font>
<br><font size="2" face="Verdana">&nbsp;</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Verdana">Get more out of the Web. Learn 10 hidden
secrets of Windows Live. </font><a href="http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_getmore_092008"><font size="2" color="blue" face="Verdana"><u>Learn
Now</u></font></a><font size="2" face="Verdana"> </font>
<br><font size="2" face="Verdana">&nbsp;</font>
<div align="center">

<BR><hr></div>
<br><font size="2" face="Verdana">Want to do more with Windows Live? Learn
“10 hidden secrets” from Jamie. </font><a href="http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_domore_092008"><font size="2" color="blue" face="Verdana"><u>Learn
Now</u></font></a>
<font size="2" face="Verdana"><br>
</font>
<BR><hr><font size="2" face="Verdana">Want to do more with Windows Live? Learn
“10 hidden secrets” from Jamie. </font><a href="http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_domore_092008"><font size="2" color="blue" face="Verdana"><u>Learn
Now</u></font></a><tt><font size="2">_______________________________________________<br>
Xerte mailing list<br>
Xerte@lists.nottingham.ac.uk<br>
</font></tt><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte"><tt><font size="2">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</font></tt></a><tt><font size="2"><br>
</font></tt>

<BR><BR><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></body>
</html>