I have a set of courses I want to generate via OLX. For the moment at least (the POC), I just want to use html blocks with an iframe to show a set of html+javascript (slightly de-nastified Captivate exports). There are levels, lessons and units, and units have several captivate exports.
I tried
<course advanced_modules="["done"]" course="1_1"
display_name="Level 1, Lesson 1"
enrollment_start="2014-03-01T04:00:00Z" org="ee" start="2014-03-03T00:00:00Z"
url_name="Ongoing">
<chapter display_name="Unit 1" url_name="unit_1">
<sequential format="Learning Sequence" graded="true" display_name="Everyday English"
url_name="1_1_everyday_english">
<vertical display_name="Everyday English" url_name="1_1_everyday_english">
<html display_name="Everyday English">
<p>
<iframe style="min-height: 500px;"
src="https://local.openedx.io/public/ca/templates/index.html?mediaPath=/public/ca/media/&dataPath=/public/ca/1/1/1/1_everyday_english/"
width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
</p>
</html>
<done display_name="Everyday English Completion" url_name="1_1_everyday_english"
align="right" />
</vertical>
</sequential>
...
</chapter>
<chapter display_name="Unit 2" url_name="unit_2">
...
<html display_name="Everyday English">
<p>
<iframe style="min-height: 500px;"
src="https://local.openedx.io/public/ca/templates/index.html?mediaPath=/public/ca/media/&dataPath=/public/ca/1/1/2/1_everyday_english/"
width="100%" height="100%" scrolling="no" frameborder="0"></iframe>
</p>
</html>
...
With the difference between the two sequential+vertical+html being the chapter, and then the dataPath that I pass to the URL in the iframe src. The problem is that unless I provide a url_name to the html, I get the second URL in BOTH the Unit 1 AND Unit 2 “Everyday English” htmls (and the so on for the subsequent sequential+vertical+htmls).
What is happening here? If I provide a (unique?) url_name, everything works as expected. Is it if I don’t provide a unique url_name then it makes a url_name from something else, and if that isn’t unique we somehow get an override?
HTML Components in OLX — Latest documentation wasn’t particularly clear about url_name… The “Element Attributes” section says display_name is obligatory, even though the Example of an HTML Component Embedded in a Vertical section doesn’t have one, and the attributes section doesn’t have url_name at all, even though it’s present in a few of the examples. My reading of example-of-separate-html-files was that I should only put url_name if I wanted to use a separate file, but putting the html content directly in the course.xml with the url_name attribute seemed to get me what I wanted.
Is the basic rule of thumb that basically everything in OLX needs a unique url_name? Or at least if I do put one I won’t go wrong? Any pointers most appreciated!