<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>

<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><SPAN class=137523617-17022009><FONT color=#0000ff>I 
think attributes can be set in script?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137523617-17022009><FONT 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=137523617-17022009><FONT color=#0000ff>I 
tried id.correct, but it fails - maybe its id.clip or some 
such?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=137523617-17022009><FONT 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=137523617-17022009><FONT color=#0000ff>Sorry 
I'm not that good with the xerte coding side of things.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <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 17:31<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>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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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 
  &lt;&lt;interactionid&gt;&gt;.judge()</FONT></SPAN></DIV><BR>
  <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
    <DIV class=EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
    <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 
    face=Verdana color=#0000ff>Hello</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff>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 
    face=Verdana color=#0000ff></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff>INTERACTION.prototype.judge = function() 
    {<BR>&nbsp;//check that each response whose correct is not 
    undefined<BR>&nbsp;//has the same status as correct<BR>&nbsp;for (var i = 0; 
    i&lt;this.responses.length; i++) {<BR>&nbsp;&nbsp;if 
    (this.responses[i].correct != undefined) 
    {<BR>&nbsp;&nbsp;&nbsp;//trace(this.responses[i].correct +" " 
    +this.responses[i].status);<BR>&nbsp;&nbsp;&nbsp;if 
    (this.responses[i].correct != this.responses[i].status) 
    {<BR>&nbsp;&nbsp;&nbsp;&nbsp;//doesn't match - user cannot have matched all 
    correctly<BR>&nbsp;&nbsp;&nbsp;&nbsp;return 
    false;<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;return 
    true;<BR>};</FONT></SPAN></DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff>That is the flash&nbsp;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 
    face=Verdana color=#0000ff></FONT></SPAN>&nbsp;</DIV>
    <DIV dir=ltr align=left><SPAN class=EC_EC_609571515-17022009><FONT 
    face=Verdana color=#0000ff>Pat</FONT></SPAN></DIV><BR>
    <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
      <DIV class=EC_EC_OutlookMessageHeader lang=en-us dir=ltr align=left>
      <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 &#8220;10 hidden secrets&#8221; 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> </BLOCKQUOTE></BODY></HTML>