[Xerte] Re: . Xerte 2.n - Page Wizards (April 2011 release)

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Apr 21 11:35:33 BST 2011


Do you watch the subversion rss feeds?

http://code.google.com/feeds/p/xerte/updates/basic

That's probably the best way of being kept in the loop of changes. I try and comment them. If there is no comment it's usually a smaller bug fix rather than a  change. If you keep your svn synched up you'll see the files that have changed on each update. If it looks like something you ought to be aware of, and can't see what's changed then send me a mail.

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Kemp Johnathan
Sent: 21 April 2011 11:32
To: Xerte discussion list
Subject: [Xerte] Re: . Xerte 2.n - Page Wizards (April 2011 release)

Hello Deborah,

Thanks for the idea of adding the optional automatic narration parameter, I will aim to add it to all the page wizards that use narration in the next release.

I remember some discussion on the mail list that suggested that there may be some changes to the code that is used to implement narration, but as yet the current version of Xerte still uses the same code. Hence I have made no changes to narrationHandler.rlm. Should there be any changes to how the PageTemplates project wide template delivers narration in a future release then there may be an update to narrationHandler.rlm.

New Page Wizards cannot update existing pages in Xerte projects, as a Page Wizard is only used as a source of information by Xerte from which to create a new page, so existing pages are unaffected by an update to the Page Wizards.

The changes to a Page Wizard that provide support for optional automatic narration are all within the code of the page wizard (an extra line in the xwd file to implement the optional parameter and a small change to the getPageId code block that adds an extra "if" condition to the section that implements narration) so no change to the narrationHandler is required.

Adding auto Narration to any existing page that offers narration
If you wanted to add auto Narration to an existing page in one of your projects then this would be a simple 2 step process

Step 1 - add the optional parameter "narPlayback" to the xwd file. Simply open the xwd file in your favourite editor (not a word processor) - I use FlashDevelop and insert the line below, after the narration optional parameter, then save your change.

<narPlayback type="ComboBox" label="Narration Playback" options="On user request,On page load" data="userRequest,pageLoad" defaultValue="On user request" width="150" optional="true"/>
Step 2 - add an additional "if" block to the narration code in getPageId. Do this in Xerte by expanding the page structure and selecting the getPageId script icon.

// Old page version - no auto narration option

if (pageIcon.templateData.learningObject[0].modelAnswer[0].narration != undefined){
narration = pageIcon.templateData.learningObject[0].modelAnswer[0].narration;
rootIcon.broadcast('showAudio');
}

// sample version from new version of gapFill Page Wizard

if (pageIcon.templateData.learningObject[0].gapFill[0].narration != undefined){
narration = pageIcon.templateData.learningObject[0].gapFill[0].narration;
rootIcon.broadcast('showAudio');

    if (pageIcon.templateData.learningObject[0].gapFill[0].narPlayback != undefined &&   pageIcon.templateData.learningObject[0].gapFill[0].narPlayback == "pageLoad"){
    nar.play();
    }

}

The bit shown in blue above could be added to any page wizard that offers narration, you would just need to edit the references to the page wizard name to match the current page wizard, e.g. for modelAnswer code shown earlier would become

if (pageIcon.templateData.learningObject[0].modelAnswer[0].narration != undefined){
narration = pageIcon.templateData.learningObject[0].modelAnswer[0].narration;
rootIcon.broadcast('showAudio');

    if (pageIcon.templateData.learningObject[0]. modelAnswer [0].narPlayback != undefined &&   pageIcon.templateData.learningObject[0]. modelAnswer [0].narPlayback == "pageLoad"){
    nar.play();
    }

}
That should give your page auto narration option capability. Note the first two lines shown above are actually all one long line.

Updating an existing page to use the new version of a Page Wizard

If you wanted to update a learning object to take advantage of new features in a Page wizard then you could try the following.

Given an existing page called currentPage with its files saved in folder pages / currentPage

1 . Create a new page using the new version of the Page Wizard saving its files to pages / newPage

this would give you a folder pages / newPage containing the Page Wizard's .xml, .xwd and .rlm files

2. Rename the .xml file to something like orig.xml

3. Copy the .xml file from pages / currentPage to pages / newPage

This should give you a new copy of your original page that uses the new code for the page, has the new xwd file but benefits from all the settings of your original page.

But a word of warning. This should work in most instances of new page wizards, one thing could cause a problem.

If the new Version of the page wizard includes any new parameters that are NOT optional.

If the new version of the Page Wizard includes a non-optional parameter that did not exist in the previous version then the wizard may malfunction. To resolve the malfunction look in the original xml file (renamed to orig.xml above and identify the missing parameters. These will need to be copied into the active xml file i.e the copy from your original page.

Whether it is worth updating a page will probably depend on the changes that the new wizard introduces.

Hope this helps to answer your questions.

Kind regards

Johnathan

PS. Don't worry about asking silly questions - just ask for clarification if my answers are not adequate to meet your needs.




On 20 April 2011 11:20, Deborah Delin <admin at strivney.com<mailto:admin at strivney.com>> wrote:
Hi Jonathan,

Thanks very much for the new Page Wizards release.  Great to have an optional parameter to specify automatic narration!

Sorry if this is a silly question:  I have downloaded the new release and replaced the files in my Xerte folder, but, in order for existing learning objects to be affected by the changes in the new release, do I have to re-create the learning objects from scratch?  The release didn't contain a new narration handler - wouldn't I need to add an updated narration handler to the rlo?

Thanks in advance for your reply.

--
Deborah




This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk<mailto:Xerte at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


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


More information about the Xerte mailing list