[Xerte-dev] A little help digging into Xerte's internals?

Smith, Bradley brsmith at akamai.com
Fri May 8 23:17:58 BST 2015


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).

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?

A template page like `modules/xerte/parent_templates/Nottingham/wizards/en-GB/data.xwd` defines the properties you see in the `edithtml.php`
…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…
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.
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?
`show_preview_code()` calls show_template_page() in play.php. Assuming you’re rendering as html5, this loads `modules/xerte/player_html5/rloObject.htm`
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!
At this point most of the heavy lifting seems to be handled by `modules/xerte/parent_templates/Nottingham/common_html5/js/xenith.js`
This does an AJAX call to retrieve USER-FILES/$ID-$USER-$TEMPLATE/preview.xml?time=$UNIX_TIMESTAMP
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... 
The xml just describes the structure of the LO, and has "<![CDATA[ Enter text for the page here ]]>” where all the content should be, so it must be being replaced by something…
…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?
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.

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. 

Thanks!
—Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150508/d8661576/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4291 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150508/d8661576/attachment-0001.bin>


More information about the Xerte-dev mailing list