<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2>Hello</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2>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=609571515-17022009><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff 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></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff 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></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=609571515-17022009><FONT face=Verdana
color=#0000ff size=2>Pat</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 size=2><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 size=2>Hi List,</FONT> <BR><BR><FONT
face=sans-serif size=2>another beginner's question. Imagine the following
structure:</FONT> <BR><FONT face=sans-serif size=2>-- page 1</FONT> <BR><FONT
face=sans-serif size=2>---- interaction: id=question1</FONT> <BR><FONT
face=sans-serif size=2>-------- button 1: correct=0</FONT> <BR><FONT
face=sans-serif size=2>-------- button 2: correct=0</FONT> <BR><FONT
face=sans-serif size=2>-------- button 3: correct=1</FONT> <BR><FONT
face=sans-serif size=2>-- page 2</FONT> <BR><FONT face=sans-serif size=2>----
script: question1.judge()</FONT> <BR><BR><FONT face=sans-serif size=2>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 size=2>Peter Huppertz</FONT></BLOCKQUOTE></BODY></HTML>