The following procedure is for developing a TLP on your local machine, and then
uploading it to the server.
-
The first step is to navigate to the TLP on the Kimpton site and note any manipulatives, images, scripts.
- Download and unzip this Sample TLP
and unzip it, then rename the directory to a suitable name for your TLP, for
example dining_out.tlp. Note the structure of a TLP and you
should see subdirectories css/, img/, scripts/, manipulatives/, manipulatives/params/
- Back to the Kimpton TLP, take care of the easy things first. Copy over any
stylesheets into the css/ directory, images into the img/ directory, and scripts (JS)
into the scripts/ directory that the original TLP is using.
- Back to your sample TLP directory, open up index.php and be sure that its content is the same with
this file: TLP index page template. It does not need you to edit
any of the $_WME_PAGE_STD variables. These will be populated automatically as long as your tlp.conf.xml
files are valid.
-
Look through the Kimpton TLP. Try to determine page breaks. It is true that the entire page content
can be fit into just one VSec, but the purpose of VSecs is that they can be
hidden, questions can be added to each VSec. They can also be re-ordered. So use your
judgment to anticipate any of these needs and visualize where the breaks should be.
Give your VSecs meaningful filenames (such as intro.vsec or question_section.vsec), copy the
XHTML segment from the Kimpton TLP, place it within this file, and save it under the TLP
directory. Continue on if you've determined multiple VSecs.
-
Create the TLP configuration file, tlp.conf.xml from using this template.
For now, fill in the <name>, <author>, <version>, and
<teacher_guide> elements. The <teacher_guide> should contain a URL.
-
Next, you have already determined which stylesheets and scripts are to be used, and their locations.
Use the <pagestyle> and <pagescript> elements to determine these. Both
of these tags have the same inner tag, <location>, which should contain the relative
path from the TLP directory root to the respective files. For example,
<location>scripts/fade.js</location>
or
<location>css/someStyle.css</location>
-
Before we start defining VSecs, we have to first determine which manipulatives are used by
this TLP. If your TLP does not have any manipulatives, you may skip this step. Otherwise,
rewrite any manipulatives into new OOP architecture as per our discussion here.
After you've done this, traverse into the manipulatives/ directory in your working TLP.
Create a new directory and give it the name of the manipulative (say, mealOrder/ or
ProportionObject/). Next, save the manipulative support file into this directory. Remember the name
of the support file as we will need to refer to it later.
Determine all parameters needed to instantiate your manipulative object, and place into
an MPXML file. Give this filename a .mpxml suffix, and save it under the
manipulatives/params/ directory. Again, remember the filename as we will need to refer back to it later.
In the tlp.conf.xml file, add a <manipulative_support> block. Inside, use the
<support> element to add a manipulative. For example, the following block of code:
<support object="menu" script="mealOrder/mealOrder.js" />
translates into this: A manipulative support file, mealOrder.js is placed within the mealOrder/ directory under
manipulatives/. Its constructor is menu.
-
Now we begin the VSec definition(s). Recall the filenames that you gave your VSecs.
Within every <vsec> element has the attribute filename=. Make sure that
you set filename= to the name of your VSec file. If filename= is not
provided, then it is assumed that the VSec is empty, but can still be manipulated just as
any other VSec (that is, can still hold questions, deploy manipulatives, be rearranged, and
hidden).
Next, if this VSec has no questions nor manipulatives, skip the next two steps.
Otherwise, continue.
-
Take care of manipulative instances. The manipulative instance definition is enclosed
by <manip> elements. This element contains a mandatory attribute, instanceof=.
The value for instanceof= should be one of those manipulative_support objects (that is,
the value of the <support object= attribute defined previously. Enclosed within
the <manip> tags is the filename of the MPXML file that you created specifically
for this instance.
-
Take care of questions. Return to the original TLP on the Kimpton site. Note any questions.
Every question belongs to a question set. The question set definition is enclosed by
<question_set> elements.
Enclosed within <question_set> are two distinct elements:
<name> and <question>.
<name> contains the name of the question set, such as Challenge Questions.
<question> contains the content of the question.
Continue adding <question> elements under <question_set> as necessary,
and continue adding <question_set> as necessary.
-
Do the remainder of your VSecs.
-
Remember to close the <tlp_setting> element when you are done. Save the tlp.conf.xml
file when done. If you are in the process of creating an entire TM, then stop here - you
are done, and create the next TLP. Otherwise, if this TLP is for deployment, then
zip up the directory structure and it is ready for TLP installation!
Back to Topics