<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Having problems duplicating nodes</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I got caught out by that one last week as well, and spent a long
time trying to figure out why things were going strange. The problem is simply
because when two pages have the same ID, things collide. Often you can get away
with duplicate IDs (in fact it is convenient) because there is only ever one of
these things on the screen when the ID is used. I can&#8217;t remember the details,
but the parser works differently for pages.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Paul Swanson<br>
<b>Sent:</b> Wednesday, December 10, 2008 4:53 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Thanks for those tips Julian, it
was the ID of the page being duplicated that seems to have caused the problem.
I had given the page an ID attribute, but was never referencing it for
anything, so I deleted the ID attribute and now I get the questions to appear
when navigating back. My problem is now solved!&nbsp;Yay! That was a tricky one
to debug -- thanks for your patience.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Just for my own understanding:
why would the duplicate IDs be a problem in this case? I try to not make the
same mistake twice, and would like to know what the problem might have been.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Paul</span><o:p></o:p></p>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk [mailto:xerte-bounces@lists.nottingham.ac.uk]
<b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Wednesday, December 10, 2008 3:09 AM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>When you back up to the page,
what do you get when you debug() the various things you are expecting? Does all
your data seem correct? Can you display anything at all in that page, even
hard-coded text icons, like &#8216;here is page one&#8217;? Do the icons you expect to be
in that page actually exist? You&#8217;re not calling duplicate() more than once? The
pages themselves don&#8217;t have duplicate IDs?<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:72.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Paul Swanson<br>
<b>Sent:</b> Tuesday, December 09, 2008 11:33 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Making progress ... but not
using your suggestion. I came up with a different way.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>I started to think that my
lesson1quiz array was not being appended to, but overwritten, when using the
following code:</span><o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>lesson1Counter = 0; // counter for number of
questions</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>// loop through all questions to get lesson 1<br>
for (i = 0; i &lt; quizData.question.length; i++) {</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp; if (quizData.question[i].lesson == '1') {<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp; <span style='color:red'>lesson1quiz[lesson1Counter].question
= quizData.question[i];<br>
</span>&nbsp;&nbsp;&nbsp; lesson1Counter++;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp; } // end of quizData.question[i] conditional</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>}</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>but by changing it to:</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>lesson1Counter = 0; // counter for number of
questions</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>// loop through all questions to get lesson 1<br>
for (i = 0; i &lt; quizData.question.length; i++) {</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp; if (quizData.question[i].lesson == '1') {<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp; <span style='color:green'>lesson1quiz.push(quizData.question[i]);</span><br>
&nbsp;&nbsp;&nbsp; lesson1Counter++;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>&nbsp; } // end of quizData.question[i] conditional</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>}</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>and then changing the references
that display the questions to {lesson1quiz[questIndex].prompt}, I am getting
the questions and answers to display within the individual lesson. My only
problem now is that if the user tries to navigate back within the question
framework, the page appears blank. questIndex is set by this statement:</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>questIndex = icon.parentNode.index()
- 1;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>The page that the questIndex
code is on is the first page of my lesson1quiz framework, with an Entry Pane
preceeding it. Any thoughts on that?</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Again, thanks for all the help.
And a special thanks to Dave B, who offered to take a look at my file and offer
suggestions (even though I didn't take him up on it).</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Paul</span><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:72.0pt'><o:p>&nbsp;</o:p></p>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:72.0pt'><o:p>&nbsp;</o:p></p>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:72.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Tuesday, December 09, 2008 1:39 AM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>I&#8217;d use decision icons, set
to randomUnused to present the questions &#8211; then there&#8217;s no need to randomise
your arrays. Pick out each question using icon.parentNode.index() or similar,
with a page on the deision for each question &#8211; but you&#8217;ll make those with
duplicate(). &nbsp;You will still need to build some arrays for sec1Questions,
sec2Questions though. I might be tempted to make those arrays of xmlNodes
rather than the bits of templateData. You can get the pre-XML2Object xml from
your file with the variable extXML. I&#8217;d loop over that, picking out your nodes
and adding them to your arrays, then use those arrays to drive your code.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>HTH?<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>J<o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:108.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Monday, December 08, 2008 10:52 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:108.0pt'><o:p>&nbsp;</o:p></p>

<div id=idOWAReplyText56773>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif";color:black'>how fussy are you about the .xml
format?</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>could you work with:</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&lt;questions&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&nbsp; &lt;question section=&quot;1&quot;&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&nbsp;&nbsp;&nbsp; &lt;!--data for question
here --&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&nbsp; &lt;/question&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&nbsp; &lt;!--etc--&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>&lt;/questions&gt;</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>and generally, what does the .rlo need to do?
Present a framework of content for each section, and then show the quiz (on the
last page?). Do the page types vary?</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>and then a final section
framework&nbsp;summarises and then shows all questions, randomised?</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><o:p>&nbsp;</o:p></p>

<div style='margin-left:36.0pt'>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'>

<hr size=2 width="100%" align=center>

</div>

</div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:108.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk on behalf of Paul Swanson<br>
<b>Sent:</b> Mon 08/12/2008 19:15<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Commenting out the two
randomQuizData lines doesn't change anything. I've moved the statement that
randomizes the questions to the button that launches the final test, rather
than have it in the setup script.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Maybe I'm just going about this
entirely the wrong way. What I want to accomplish is to have all my test
questions within one setup.xml file. I have six lessons, and some of the
questions will also be presented at the end of each lesson. So I need to parse
which questions are for lesson 1, which are for lesson 2, etc. Once the student
has completed all of the lessons, they must take a test to pass the course.
This test will be comprised of all of the questions for all of the lessons,
with the questions randomized. Am I on the right track with what I've been
trying to do, or do I need to take a different approach?</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Paul</span><o:p></o:p></p>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:108.0pt'><o:p>&nbsp;</o:p></p>

<div style='margin-left:36.0pt'>

<div style='margin-left:36.0pt'>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

</div>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:108.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Julian Tenney<br>
<b>Sent:</b> Thursday, December 04, 2008 11:32 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Having problems duplicating nodes</span><span
lang=EN-US><o:p></o:p></span></p>

<div id=idOWAReplyText25401>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif";color:black'>You are creating references to
the same array.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>quizData = templateData.quiz[0]; // non-randomized
questions</span><o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Courier New"'>randomQuizData = templateData.quiz[0]; // for
randomized questions<br>
randomQuizData.question.randomize(); // randomize the list of questions</span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:108.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>quizData.question is also randomised.</span><o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal style='margin-left:108.0pt'><o:p>&nbsp;</o:p></p>

<div style='margin-left:36.0pt'>

<p class=MsoNormal align=center style='margin-left:72.0pt;text-align:center'>&nbsp;<o:p></o:p></p>

</div>

</div>

</blockquote>

</div>

</blockquote>

</blockquote>

</div>

</body>

</html>