<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText24208 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>That will work if the clip() exists. it might be better to get at the underlying XML, </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 Peter Huppertz<BR><B>Sent:</B> Tue 17/02/2009 18:33<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><FONT face=sans-serif size=2>What seems to work is the following:</FONT> <BR><BR><FONT face=sans-serif size=2>interactionID.XMLElement.childNodes[0].clip().correct = true;</FONT> <BR><BR><FONT face=sans-serif size=2>childNodes[0] is the first response, childNodes[1] the second and so on.</FONT> <BR><BR><FONT face=sans-serif size=2>Peter</FONT> <BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD><FONT face=sans-serif color=#5f5f5f size=1>From:</FONT>
<TD><FONT face=sans-serif size=1>Dave Burnett <d_b_burnett@hotmail.com></FONT>
<TR vAlign=top>
<TD><FONT face=sans-serif color=#5f5f5f size=1>To:</FONT>
<TD><FONT face=sans-serif size=1>Xerte list <xerte@lists.nottingham.ac.uk></FONT>
<TR vAlign=top>
<TD><FONT face=sans-serif color=#5f5f5f size=1>Date:</FONT>
<TD><FONT face=sans-serif size=1>02/17/2009 07:19 PM</FONT>
<TR vAlign=top>
<TD><FONT face=sans-serif color=#5f5f5f size=1>Subject:</FONT>
<TD><FONT face=sans-serif size=1>RE: [Xerte] How to use the judge function correctly</FONT>
<TR vAlign=top>
<TD><FONT face=sans-serif color=#5f5f5f size=1>Sent by:</FONT>
<TD><FONT face=sans-serif size=1>xerte-bounces@lists.nottingham.ac.uk</FONT></TD></TR></TBODY></TABLE><BR>
<HR noShade>
<BR><BR><BR><FONT face=Verdana size=2><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 face=Verdana size=2>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 face=Calibri color=#004080 size=2>Dave, I believe if you set the rs property of the response, you can address it directly.</FONT> <BR><FONT face=Calibri color=#004080 size=2> </FONT> <BR><FONT face=Calibri color=#004080 size=2>From the Help:</FONT> <BR><FONT face=Calibri color=#004080 size=2> </FONT> <BR><FONT face=Arial size=2><B>Common Response Properties</B></FONT> <BR><FONT face=Arial size=2>All interaction responses share some common properties:</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>name</I></FONT> <BR><FONT face=Arial size=2>The name of the icon you will see on the document tree.</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>id</I></FONT> <BR><FONT face=Arial size=2>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 face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>rs</I></FONT> <BR><FONT face=Arial size=2>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 face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>type</I></FONT> <BR><FONT face=Arial size=2>The type of response. This is set automatically.</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>erase</I></FONT> <BR><FONT face=Arial size=2>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 face=Verdana size=2> </FONT> <BR><FONT face=Arial size=2><I>exit</I></FONT> <BR><FONT face=Arial size=2>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 face=Verdana size=2> </FONT> <BR><FONT face=Calibri color=#004080 size=2> </FONT> <BR><FONT face=Calibri color=#004080 size=2> </FONT> <BR><FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk [</FONT><A href="mailto:xerte-bounces@lists.nottingham.ac.uk"><FONT face=Tahoma size=2>mailto:xerte-bounces@lists.nottingham.ac.uk</FONT></A><FONT face=Tahoma size=2>] <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 face=Verdana size=2> </FONT> <BR><FONT face=Verdana size=2>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>
<P>
<HR>
</DIV><BR><FONT face=Verdana size=2>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 face=Verdana color=blue size=2>Well I replied to this, but sent an attachment and it appears to have lost itself in the ether.</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>So </FONT><A href="http://www.nottingham.ac.uk/~cczpl/response.rlo"><FONT face=Verdana color=blue size=2><U>http://www.nottingham.ac.uk/~cczpl/response.rlo</U></FONT></A> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>basically</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>Set up an interaction, give it an id</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>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 face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>At some point, run some code and add to that code <<interactionid>>.judge()</FONT> <BR><FONT face=Verdana size=2> </FONT>
<DIV align=center>
<P>
<HR>
</DIV><BR><FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk [</FONT><A href="mailto:xerte-bounces@lists.nottingham.ac.uk"><FONT face=Tahoma size=2>mailto:xerte-bounces@lists.nottingham.ac.uk</FONT></A><FONT face=Tahoma size=2>] <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 face=Verdana size=2><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>
<P>
<HR>
</DIV><BR><FONT face=Verdana size=2>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 face=Verdana color=blue size=2>Hello</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>I don't know how this function works, but I can possibly help as thus</FONT> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue 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> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue 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> <BR><FONT face=Verdana size=2> </FONT> <BR><FONT face=Verdana color=blue size=2>Pat</FONT> <BR><FONT face=Verdana size=2> </FONT>
<DIV align=center>
<P>
<HR>
</DIV><BR><FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk [</FONT><A href="mailto:xerte-bounces@lists.nottingham.ac.uk"><FONT face=Tahoma size=2>mailto:xerte-bounces@lists.nottingham.ac.uk</FONT></A><FONT face=Tahoma size=2>] <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 face=Arial size=2>Hi List,</FONT><FONT face=Verdana size=2> <BR></FONT><FONT face=Arial size=2><BR>another beginner's question. Imagine the following structure:</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>-- page 1</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>---- interaction: id=question1</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>-------- button 1: correct=0</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>-------- button 2: correct=0</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>-------- button 3: correct=1</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>-- page 2</FONT><FONT face=Verdana size=2> </FONT><FONT face=Arial size=2><BR>---- script: question1.judge()</FONT><FONT face=Verdana size=2> <BR></FONT><FONT face=Arial size=2><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 face=Verdana size=2> <BR></FONT><FONT face=Arial size=2><BR>Peter Huppertz</FONT> <BR><FONT face=Verdana size=2> </FONT>
<DIV align=center>
<P>
<HR>
</DIV><BR><FONT face=Verdana size=2>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 face=Verdana color=blue size=2><U>Learn Now</U></FONT></A><FONT face=Verdana size=2> </FONT><BR><FONT face=Verdana size=2> </FONT>
<DIV align=center>
<P>
<HR>
</DIV><BR><FONT face=Verdana size=2>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 face=Verdana color=blue size=2><U>Learn Now</U></FONT></A>
<P><FONT face=Verdana size=2><BR></FONT>
<HR>
<FONT face=Verdana size=2>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!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008" target=_new><FONT face=Verdana color=blue size=2><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>
<P>
<P></P></DIV></BODY></HTML>