<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Ok, I going to answer your original question first....<br>
<br>
I am afraid, it's because some temporary code was committed to
develop, and it is not fixed yet. We are trying to make the
properties of the pages more consistent, and we were debating
whether to change the size attribute that takes a 'width,height'
string to two separate width and height attributes. In order to be
able to do that, and not break older LO's we needed a mechanism to
deprecate optional properties, so I implemented that, and to
demonstrate it, I changed the .xwd of the videoText page. However, I
didn't change the code, so that page is effectively broken now. I'll
fix it today.<br>
<br>
Now to your other questions, so you will understand what is
happening. I will start from your original e-mail, and anser them
one by one, repeating some of John's information (sorry John):<br>
<br>
<br>
Ok, I am going bac k to this one...<br>
<br>
<div class="moz-cite-prefix">Smith, Bradley schreef op 9-5-2015 om
0:17:<br>
</div>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
I’ve noticed that, at least for me, the “Video Width” and “Video
Height” properties on video pages don’t seem to have any effect.
I’d like to learn more about Xerte’s internals and help out by
troubleshooting this, so I’ve been digging around, but I’ve hit
some walls and only have so much time I can spend on the issue
(which unfortunately is making the video page pretty much unusable
for me).
<div class=""><br class="">
</div>
<div class="">So, in light of the recent thread about how handy it
would be to have more some more detailed references re how XOT
content is built, how about I write up what I’ve figured out,
and then hopefully someone more knowledgable can help me fill in
the missing pieces?</div>
<div class=""><br class="">
</div>
<div class="">
<ol class="MailOutline">
<li class="">A template page
like `modules/xerte/parent_templates/Nottingham/wizards/en-GB/data.xwd`
defines the properties you see in the `edithtml.php`</li>
<ul class="">
<li class="">…but the field definitions in here don’t look
like they’re intended for human consumption, so maybe they
come from somewhere else? like
`src/Nottingham/wizards/en-GB/textVideo.xwd`? If so, I
haven’t been able to make changes in the latter show up in
the former…</li>
</ul>
</ol>
</div>
</blockquote>
<br>
As a developer, you would normally work with the
src/Nottingham/wizards/en-GB files. These define the forms displayed
in the editor. After editing the src files, you can build a data.wxd
file, that is actually used by the system. The build script can be
found src/Nottingham/buildXWD.txt<br>
<br>
These individual files per pagetype are easier to maintain than the
large data.xwd file, and the idea is, in the future to be able to
determine the pages that are available in an installation through
management.php.<br>
<br>
Also, these files rae used as input to the XerteTrans website, where
all the .xwd files are loaded and parsed, and where people can
translate the English phrases into another language. XerteTrans uses
the translated phrases to build translated .xwd files, to create the
data.xwd file in another language.<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<ol class="MailOutline">
<li class="">When you save content in the editor, it is
written to `USER-FILES/$ID-$USER-$TEMPLATE/preview.xml`,
which is read by `show_preview_code()` in
`modules/xerte/preview.php` when you click Play.</li>
<ul class="">
<li class="">side-note: it looks like XOT saves the last ten
versions as `preview.xml.1`, `preview.xml.2`, which would
suggest some kind of revision control feature, which is
cool but I’ve seen no evidence of such a thing. What’s
going on there?</li>
</ul>
</ol>
</div>
</blockquote>
When you save or play the LO from the edito, the content is saved in
preview.xml. When you publish the LO, it is saved in data.xml. In an
exported LO, this information is stored in template.xml. The
preview.xml file is used by <xerte root>preview.php, which
calls the appropriate preview.php of a module, so
modules/xerte/preview.php for a Nottingham LO, and
modules/site/preview.php for a Bootstrap LO<br>
<br>
Similar for data.xml and play.php<br>
<br>
The reason why we store the .1, .2 etc files, is that we are
suffering from (very) intermittent loss of data problems, and we
like to figure out the reason for this. To give us some extra
information to work with, we store the last 10 versions. We don't
know yet how useful this will be in debugging this problem. And we
might extend it to some version control system, by enabling an
end-user to go back to a previous version.<br>
<br>
Current theory is either connection problems, or invalid XML being
generated.<br>
<br>
<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<ol class="MailOutline">
<li class="">`show_preview_code()` calls show_template_page()
in play.php. Assuming you’re rendering as html5, this loads
`modules/xerte/player_html5/rloObject.htm`</li>
<ul class="">
<li class="">A fun fact I picked up here: you can append
“&page=X” to the url to link directly to page X of the
LO. Nice!</li>
</ul>
</ol>
</div>
</blockquote>
See also John's remark.<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<ol class="MailOutline">
<li class="">At this point most of the heavy lifting seems to
be handled by
`modules/xerte/parent_templates/Nottingham/common_html5/js/xenith.js`</li>
</ol>
</div>
</blockquote>
That is true only for the main Nottingham template, but yes,
xenith.js loads the preview.xml or data.xml, and then the individual
pagetype codes dynamically. (with AJAX)<br>
<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<ol class="MailOutline">
<li class="">This does an AJAX call to
retrieve USER-FILES/$ID-$USER-$TEMPLATE/preview.xml?time=$UNIX_TIMESTAMP</li>
<ol class="">
<li class="">First, why would you pass a url argument to a
request for a static file? Is there something more going
on here? There are some .htaccess files scattered about,
but they don’t look like they do anything related to this,
and yet... <font color="#ff0000"> I answer this inline, because
the numbering is messed up (like in the items above, but
didn't feel like retyping). The timestamp is a trick to
circumvent caching problems. The .htaccess files are
only used if Apache mode is switched on in management.php,
and gives you better readable URLs. Fair warning,
though, these cause sometimes problems because the
rewrite rules are not always tested thoroughly enough.<br>
</font></li>
<li style="widows: 1;" class="">The xml just describes the
structure of the LO, and has "<span style="widows: 1;"
class=""><font class="" face="monospace" size="2"><![CDATA[
Enter text for the page here ]]>”</font><font
class="" face="Arial" size="2"> where all the content
should be, so it must be being replaced by something</font></span><font
class="" face="Arial" size="2">… <font color="#ff0000">No,
that's an unfortinate coincidance. Your learning
object actually contains the text: 'Enter text for the
page here'. So all the contents entered by the user
ends up in the preview.xml or data.xml. Nothing to be
replaced. The actual page is renedered by the
models_html5/<pagetype>.html files. See also
below. </font><br>
</font></li>
</ol>
<li class=""><font class="" face="Arial" size="2">…and at this
point I’ve spent more time than I can justify today
digging around trying to get to the bottom of this
problem. Unfortunately I still haven’t answered question I
really need to answer here: where the heck does the actual
page content come from?</font></li>
<ul class="">
<li class="">A model file like
`modules/xerte/parent_templates/Nottingham/models_html5/textVideo.html`
seems like it has to be involved, since it appears to
define the code that actually displays a given page type,
but when I make changes in this file they don’t seem to be
reflected in what gets rendered.</li>
</ul>
</ol>
</div>
</blockquote>
Again, this is only true for the Nottingham template. For each .xwd
file from src, there is an equivalent .html file in
modules/xerte/parent_templates/Nottingham/models_html5 with the same
basename. This html file is used to render the data stored in the
pagetype node. The pagetype node has the same basename as the .xwd
or the .html file, (except text, which is a text node in the xml,
but is called simpleText for the .xwd and the .html)<br>
<br>
All this is combined by either the flash engine (XMLEngine.swf), or
the html5/javascript engine (xenith.js). So, to change the behaviour
of a page you have to change the .html file (the so-called model
file). Historically there are two versions of the model file, the
ones stored in modules/xerte/parent_templates/Nottingham/models,
used by the Flash engine (deprecated), and the ones stored in
modules/xerte/parent_templates/Nottingham/models_html5. The can
access the data stored in the preview.xml and/or data.xml. <br>
<br>
In your case the preview.xml contains data about the size of the
video in two separate entities, (width and height) and the model
file, still assumes they are stored in one (size). Sorry about that.
Like I said, I will fix that this afternoon.<br>
<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<div class=""><br class="">
</div>
<div class="">I feel like I’ve gotta be close to the end of this
trail (at least, I dearly hope I am…), but I just don’t have
any more time to spend on this. Could one of the devs help me
out? Then maybe this could be turned into a sort of
architecture overview on the github wiki to help other new
folks in the future. <br>
</div>
</div>
</blockquote>
<br>
We're working on generating proper documentation of all this.<br>
<blockquote
cite="mid:0DE121DD-37D4-4FF6-B5E7-844C1E90CA14@akamai.com"
type="cite">
<div class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">Thanks!</div>
<div class="">—Brad</div>
</div>
</div>
<pre>
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.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Xerte-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
--
Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196
</pre>
</body>
</html>