[Xerte] Re: reading quizScoreTracking.sum() and quizScoreTracking.length

KnowledgeWare knowledgeware at kccsoft.com
Wed Sep 14 01:05:58 BST 2011


OK..Thanks for that info Julian..I will try that.

 

RonM2

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Tuesday, September 13, 2011 1:47 AM
To: Xerte discussion list
Subject: [Xerte] Re: reading quizScoreTracking.sum() and
quizScoreTracking.length

 

When you turn the page, the quiz icon no longer exists. You'll need to
modify the quiz model to put the data somewhere that will still exist after
the page turns: rootIcon.quizResults.score for example.

 

I'd make a generic solution if I could think how best to do it: you might
have more than one quiz in an rlo. It would probably be worth initialising a
tracking array, with an entry for each page to store data, then you could
put results in from any page:

 

rootIcon.trackingData = new Array();

 

//loop over the xml and initialise an object / value for each

for (i = 0 to number of pages in rlo){

  rootIcon.trackingData[i] = new Object();

}

 

Then you can store data in the array based on rootIcon.currentPage, i.e.

 

rootIcon.trackingData[rootIcon.currentPage].score = 99;

 

and finally loop back over the array to fish the results out and display
them / submit them / whatever.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110913/8770dde7/attachment-0001.html>


More information about the Xerte mailing list