Template versions

First of all you need to be aware of the distinction between individual and consolidated templates. When an individual template is uploaded it is validated, a copy is stored on the server, and a representation of its local dictionary is derived that is optimised to support the questionnaire. However, before it is actually used in a questionnaire or to generate a document, a consolidated representation of the entire template hierarchy is computed and saved on the server. Note that this is done even if the full hierarchy is just a single template. So we end up with two parallel representations of the templates; one of individual templates as uploaded, the other of consolidated templates as actually used. Now to achieve the requirement of re-visiting templates as they stood at some point in time,
Contract Express
never overwrites a consolidated template, but it does allow an author to overwrite an individual template version.
In order to understand some other differences it is helpful to use the concept of a template time line. The timeline of a template will start at the moment the first version was uploaded and will extend indefinitely forward into the future. Say we upload a specified version (V0) at some moment in time (T0), and later (T1) we upload a new version (V1), then V0 is valid from T0 to T1 and V1 is valid from T1 onwards. If we subsequently (T2) upload V0 again then this does
not
change the timeline, i.e. V0 is still valid from T0 to T1. This allows us to retrospectively change an old version to say this is now how we think that version should have been.
The concept of the timeline is also helpful in understanding what happens when a template version is marked as inactive or deleted. The remaining versions are adjusted to fill up the gap left in the time line, in particular the end time of the preceding version on the timeline is changed to the end time of the version that has been removed. Similarly if a version is reactivated then the preceding version readjusts to make room for it.
Note that if the version is not specified explicitly in the template when it is uploaded then a representation of the current date and time is used, which will be unique, and so no existing version will be overwritten, and the new version will slot in at the end of the time line.
When a session is started based on a specified template then the database is checked to see if a consolidated form of the entire template hierarchy from the specified template down already exists. If not then the timelines of all the active templates in the hierarchy are lined up, and the session start time is used to identify which version of each template will contribute to the consolidated form. If in the future any of the contributing template versions change (for example one is uploaded, made inactive or deleted) then the consolidated form is marked as invalid but is not deleted. A valid consolidated form will then be rebuilt when required.

View and compare previous versions of a template and its dictionary

From the
Contract Express Author
ribbon it is possible to view and compare previous versions of a template, including changes to the dictionary.

View a previous template version

To view a previous version of the template you have open:
  1. Click on the
    Template Properties
    button.
  2. Select
    View Versions
    from the dropdown. This will open a list all the versions of the template previously uploaded to Contract Express. You may be prompted to sign into Contract Express first if you have not already done so.
  3. Select the version you want to view, and click on the
    View
    button.
The selected template version will open in a new Word window as a temporary file.

Compare template versions

Compare the template's wording to a previous version
To compare the open template's wording to the wording of a previous version of the template:
  1. Click on the
    Template Properties
    button.
  2. Select
    View Versions
    from the dropdown.
  3. Select the version to compare and click on the
    Compare
    button.
A comparison of the two template versions will open in a new Word window, with the differences shown as tracked changes. This comparison is a temporary file only.
Compare the template's dictionary to a previous version
To compare the open template's dictionary to the dictionary in a previous version of the template:
  1. Click on the
    Template Properties
    button.
  2. Select
    View Versions
    from the dropdown.
  3. Select the version that is to be compared, then select the
    Compare dropdown
    .
  4. Select
    Compare Dictionary
    .
A comparison of the dictionaries in the two template versions will open in a new Word window with the differences shown as tracked changes.
The comparison will highlight the differences between questionnaire pages, groups (and their variables), variables and their definition, user defined functions, and warnings.