[Xerte] How to use the judge function correctly

Peter Huppertz peter.huppertz at baselgovernance.org
Tue Feb 17 15:43:36 GMT 2009


Hi Patrick,

thanks for your answer. So I think everything that is located inside an 
interaction icon is considered as a response?!
I'm not sure about responses.status, where comes this from?

Peter



From:
Patrick Lockley <Patrick.Lockley at nottingham.ac.uk>
To:
"Xerte discussion list" <xerte at lists.nottingham.ac.uk>
Date:
02/17/2009 04:20 PM
Subject:
RE: [Xerte] How to use the judge function correctly
Sent by:
xerte-bounces at lists.nottingham.ac.uk



Hello
 
I don't know how this function works, but I can possibly help as thus
 
INTERACTION.prototype.judge = function() {
 //check that each response whose correct is not undefined
 //has the same status as correct
 for (var i = 0; i<this.responses.length; i++) {
  if (this.responses[i].correct != undefined) {
   //trace(this.responses[i].correct +" " +this.responses[i].status);
   if (this.responses[i].correct != this.responses[i].status) {
    //doesn't match - user cannot have matched all correctly
    return false;
   }
  }
 }
 return true;
};
 
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.
 
Pat

From: xerte-bounces at lists.nottingham.ac.uk [
mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter Huppertz
Sent: 17 February 2009 15:07
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] How to use the judge function correctly

Hi List, 

another beginner's question. Imagine the following structure: 
-- page 1 
---- interaction: id=question1 
-------- button 1: correct=0 
-------- button 2: correct=0 
-------- button 3: correct=1 
-- page 2 
---- script: question1.judge() 

The script returns undefined, regardless of what the user clicks. I also 
tried false and true instead of 0 and 1. What's wrong? 

Peter Huppertz_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090217/138c459e/attachment.html


More information about the Xerte mailing list