[Xerte] Xerte problem based learning template

Gennady Sablin gensablin at gmail.com
Mon Nov 1 21:05:58 GMT 2010



Hello,
My name is Gennady, I'm helping now on-line school for disabled childrenin Moscow to find tools for developing on-line courses. This kids can't
go to schools and study at home. Teachers have some computer knowledge,
but not very advanced in technical side.  
I liked Xerte and found template case-Study.xtp, which is done very
well. It gives teacher right perspective and helping to create proper
educational materials.
But when I tried to make a sample for the teachers, I found some bugs. First one was simple:
Handle scores starts with this:
normScore = Math.floor(score / quizDec.pages.length) * 100;
This way if at list one answer in test wrong score will be 0%, it looks
like bracket by accident was misplaced.
normScore = Math.floor(score / quizDec.pages.length * 100);
This way it makes more sense.

The other one is more complicated for me, I'm not very familiar with
XMLNode commands.
I found that when building a test template mixing questions & answers,
but if in each question included pictures, they appear by the original
order, not mixed together with questions.
In buildQuiz:

//build the quiz
score = 0;
if (quizBuilt != true){
  //make the question pages
  quesCount = templateData.pbl[0].quiz[0].question.length;
  icon.nextSibling.firstChild.duplicate(quesCount - 1);

  for (i = 0; i < quesCount; i++){
    //make right number of responses
    respCount =
templateData.pbl[0].quiz[0].question[i].options[0].option.length);
    
icon.nextSibling.childNodes[i].lastChild.childNodes[1].duplicate(respCount
- 1);
    //set correct status
    for (j = 0; j < respCount; j++){
      //set the correct status and response type
      optStatus =
templateData.pbl[0].quiz[0].question[i].options[0].option[j].correct ==
'true' ? '1' : '0';
      icon.nextSibling.childNodes[i].lastChild.childNodes[j +
1].attributes.correct = optStatus;
      icon.nextSibling.childNodes[i].lastChild.childNodes[j +
1].attributes.type =
templateData.pbl[0].quiz[0].question[i].options[0].type;
    }
  }
}
quizBuilt = true;

Please, can you help me to solve this problem, it will be a good help
for a good cause.

With best regards,
Gennady



More information about the Xerte mailing list