[Xerte] Re: . Xerte 2.n - Page Wizards (April 2011 release)
Kemp Johnathan
johnathan.kemp at ntlworld.com
Thu Apr 21 14:00:01 BST 2011
I am always a bit wary of changes in subversions in that things may be a
little volatile, something being modified may then lead to side effects
being found and then further changes resulting. Or alternatively one good
idea leads to another and further improvements are made. I prefer to wait
until things are stable and then make all the changes that have taken place
available in a new release of the Page Wizards.
My standard procedure is to take a new release of Xerte when it is made
officially available and to create an empty Page Templates based project. I
keep a similar project from the previous version and use this as a base line
for comparison. I then compare both project folders using win merge which
highlights all the changes for me in each individual file.
I can then update the relevant page wizard files one file at a time to
implement the changes I see in the latest Xerte release. The biggest problem
is likely to occur when a significant change to the .rlt file is made as
this will reflect code that many different page templates may call upon.
This is why thus far I have limited the Page Wizards to the Page Templates
and not extended them to cover any of the other project wide templates.
What I find difficult sometimes is to identify when a new release has taken
place as sometimes the last update date on the Xerte web site may not be
updated, or version numbers displayed in the version information may not be
up to date.
I have read in the mailing list of a forthcoming release of Xerte On-line
toolkits and am bracing myself now for a new release of desktop Xerte, in
anticipation that it may create a fair bit of maintenance for the page
wizards.
I recall a while back there being some discussion regarding looking into how
the PageTemplates project wide template and the Page Wizards could share the
same set of files, this would significantly reduce the maintenance burden of
the Page Wizards. The sample code below shows the key issues in achieving
this.
// code from getPageId from a typical page wizard
pageIcon = icon.parentNode.clip();
//myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() -
pgOffset]);
//pageIcon.templateData = myXML.toObject();
pageIcon.templateData = pageIcon.extXML.toObject();
//rootIcon.setTitleText(templateData.learningObject[0].name);
if (pageIcon.templateData.learningObject[0].dragDropLabel[0].narration !=
undefined){
narration = pageIcon.templateData.learningObject[0]
.dragDropLabel[0].narration;
rootIcon.broadcast('showAudio');
nar.play();
}
The blue code is needed for PageTemplates use and the red for Page Wizards
use
I would have thought it might be possible to cover everything except for the
inclusion of ".learningObject[0]" insertions by some kind of project wide
flag and an if else block that tested the flag condition.
Is there any way that pageIcon.templateData could be defined for Page
Wizards so that it included the ".learningObject[0]" so that it does not
need to be referenced every time a call to external xml data is made? If so
this could then be included in the above mentioned if else block and the
rest of the code could stand unchanged.
Kind regards
Johnathan
On 21 April 2011 11:35, Julian Tenney <Julian.Tenney at nottingham.ac.uk>wrote:
> 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> 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
> 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.
>
>
>
> 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
> 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/4bfa82a7/attachment-0001.html>
More information about the Xerte
mailing list