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

KnowledgeWare knowledgeware at kccsoft.com
Tue Sep 13 04:57:25 BST 2011


I'm running toolkits and have a final quiz (quiz.rlm) with scorm tracking
turned on. Everything works fine. I wanted to add another page which
displays the score (again) then makes a decision about printing a
certificate.

 

I've created a model in desktop xerte which is basically a text page and a
script icon which writes to this text page, then imported the model as the
next icon after the quiz.  I'm trying to grab the value of
'quizScoreTracking.sum' and 'quizScoreTracking.length' and display it on the
'welcometext' page like this:

 

welcometext.setText('You got ' + quizScoretracking.sum() + ' correct out of
a total of ' + quizScoreTracking.length + ' questions. Your score is: ' +
score + '%');

 

When I run it however I get:

 

"You got undefined correct out of a total of undefined questions. Your score
is: NaN%"

 

Am I doing something wrong.or do these variables get purged when the quiz
icon is passed?

 

TIA

RonM2

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110912/5fad10ab/attachment.html>


More information about the Xerte mailing list