<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=utf-8">
<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]-->
<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";}
span.emailstyle17
        {mso-style-name:emailstyle17;}
span.emailstyle171
        {mso-style-name:emailstyle171;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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="#000000" vlink="#000000">
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>There is no way to add script to the piece using templates –
what you are doing – building a custom page with the code in it and loading it
into the template is the best way,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<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>Martín
Dobovšek<br>
<b>Sent:</b> Monday, July 27, 2009 4:39 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Including some scripts while using Page templates<o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=672
style='width:504.0pt;margin-left:36.0pt'>
<tr>
<td valign=top style='padding:0cm 0cm 0cm 0cm'>
<div>
<p class=MsoNormal>Julian:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Building a new Xerte file using the Page templates,
selecting "Page templates"<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Insert "Title page" (1st. page) <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Insert "Plain text" (2nd. page)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Insert "Plain text" (3rd. page) <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>After building, and uploading, the user access Module.
(secuencially)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>(SCORM 1.2) Default value:
cmi.core.lesson_status ---> NOT ATTEMPTED<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Accesing "Title page" (1st.
page) ---> script to change cmi.core.lesson_status to
INCOMPLETE ---> the user starts the lesson.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Accesing "Plain text" (2nd. page)--->
no change in status<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Accesing "Plain text" (3rd last.
page) ---> script to change cmi.core.lesson_status to COMPLETE
---> the user finished the lesson.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>To acomplish this i need to put scripts to comunicate the
results. (ex. _level0.setValue('cmi.core.lesson_status', 'completed');)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>I do it using standard Xerte package building (each page
with its own script icon). <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>But templates provide powerful tools to use but i do
not know how to script inside them. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Now, I use one last page (added as a Insert> Media >
Xerte content, using a model with a page and the script).<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Thanks for support!<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>Martin<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><br>
--- El <b>lun 27-jul-09, Julian Tenney <i><Julian.Tenney@nottingham.ac.uk></i></b>
escribió:<o:p></o:p></p>
</div>
<blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
De: Julian Tenney <Julian.Tenney@nottingham.ac.uk><br>
Asunto: RE: [Xerte] Including some scripts while using Page templates<br>
Para: "Xerte discussion list" <xerte@lists.nottingham.ac.uk><br>
Fecha: lunes, 27 de julio de 2009, 12:02 pm<o:p></o:p></p>
<div id=yiv1716195199>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’m
not sure what you mean…?</span><o:p></o:p></p>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p>
</div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
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>Martín
Dobovšek<br>
<b>Sent:</b> Monday, July 27, 2009 3:07 PM<br>
<b>To:</b> xerte@lists.nottingham.ac.uk<br>
<b>Subject:</b> [Xerte] Including some scripts while using Page templates</span><o:p></o:p></p>
</div>
</blockquote>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'> <o:p></o:p></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
style='width:468.0pt;margin-left:36.0pt'>
<tr>
<td valign=top style='padding:0cm 0cm 0cm 0cm'>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>Julian:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>How can I include some scripts using page templates to generate a
Xerte file ?. (ex. to change the lesson status of the module to
"completed" after the user browsed a page?. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>The idea is to have a "text window" for ex. to include
simple scripting in some template forms to generate tracking and
results SCORM comunication. (like eXe for Javascript in pages templates)<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>I tried including Xerte models: it works fine but add a page (blank)
to the file (for ex. the last one). <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>Best regards and thanks for support.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'> <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:
auto'>Martin<o:p></o:p></p>
</div>
</td>
</tr>
</table>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> </span><o:p></o:p></p>
<div style='margin-left:36.0pt'>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>
<hr size=1 width="100%" align=center>
</span></div>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
</span><span style='font-size:7.5pt;font-family:"Verdana","sans-serif"'>¡Viví
la mejor experiencia en la web!<br>
Descargá gratis el nuevo Internet Explorer 8<br>
http://downloads.yahoo.com/ieak8/?l=ar</span><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
-----Adjunto en línea a continuación-----<o:p></o:p></p>
<div>
<p class=MsoNormal>_______________________________________________<br>
Xerte mailing list<br>
<a
href="http://ar.mc550.mail.yahoo.com/mc/compose?to=Xerte@lists.nottingham.ac.uk"><u><span
style='color:blue'>Xerte@lists.nottingham.ac.uk</span></u></a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank"><u><span
style='color:blue'>http://lists.nottingham.ac.uk/mailman/listinfo/xerte</span></u></a><o:p></o:p></p>
</div>
</td>
</tr>
</table>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>
<hr size=1 width="100%" align=center>
</span></div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'><br>
</span><span style='font-size:7.5pt;font-family:"Verdana","sans-serif"'>¡Viví
la mejor experiencia en la web!<br>
Descargá gratis el nuevo Internet Explorer 8<br>
http://downloads.yahoo.com/ieak8/?l=ar</span><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'><o:p></o:p></span></p>
</div>
</body>
</html>