FAQ (Frequently Asked Questions)Back to Help Page

FAQ topics
Running an experiment

To run an experiment use the following URL format:

http://dpte.polisci.uiowa.edu/dpte/action/player/launch/expNum

where expNum is the Experiment number (listed in Experiment combo box).

Optionally, a group number can be added as such:

http://dpte.polisci.uiowa.edu/dpte/action/player/launch/expNum/groupNum

to force a certain initial Group to be chosen.

Adding    ?test=1    to the end of the URL puts the Player into test mode, where data is not generated. It also adds an intermediate step after the Passphrase is requested, showing a screen confirming the Experiment and Group used.

Adding pass=my_passphrase to the URL will automatically include the password so the subject doesn't have to enter it, and a researcher-assigned id can be included by using raid=my_subject_id

Thus the URL:

http://dpte.polisci.uiowa.edu/dpte/action/player/launch/100/3?pass=NotSecret&raid=12345

Tells the Player to launch Experiment 100, defaulting subjects to group 3, with the password "NotSecret" automatically used, and with a researcher-assigned id of "12345"

Note that an ampersand is used between the test, pass, and raid parameters, with a question mark preceding the first parameter.

To make the process completely hands-off, include

&skip=1

in the URL, and the window will open immediately (as long as you have also included the passphrase as described).
back to top

'Loading Subject error' message

If Subjects are seeing the message

Loading Subject error; please close this window and try the link again.

normally, following the instructions will allow them to complete the Experiment. This error only occurs at the beginning of Experiments. If completion rates are still low, there is an alternate URL format that can be used.

http://dpte.polisci.uiowa.edu/dpte/action/player2/launch/100/3?pid=Passphrase

In this case using http: (and not https:) is important. The other changes from the normal format are:

- use player2 instead of player

- use pid instead of pass to make the passphrase entry automatic

The example specifies Experiment #100 and the optional GroupId of 3. The passphrase will be visible in the entry box in plain text. Exclude 'pid' and the passphrase if you want to require the subject to enter it, of course.
back to top

When does a Substage end?

The easiest way to think of it is: A Substage ends when its Duration is over, unless there is nothing else for it to do.
Therefore,
  • if the Duration is long enough to accommodate the Flow Time, all the Flow Items will leave the screen before the Substage ends.
  • if the Flow Time exceeds the Duration, the Substage will end with Flow Items visible on the screen.
If the Flow Time (say 1:00) is finished, but the Duration (say, 2:00) is longer, the Substage will end if there is nothing more to do. If there are Timed Items at 1:20 and 1:40, the Substage will continue until those are presented.
Also, the Substage will never end while a Subject has an item open.
And, equally important, a Timed Item that stops the clock stops time completely, and the Substage remains frozen until the Timed Item is put away.

back to top

JavaScript and its use in DPTE

JavaScript is the language used in DPTE for Conditions and Calculations. It is used for all conditional statements including those associated with a Conditional Branch, and to form Calculations, giving Researchers the maximum amount of flexibility possible. However, this means that the Researcher must be able to construct well-formed JavaScript; all Conditions and Calculations must be properly formed or the statement will not execute.

For the purposes of DPTE, the key things to know about JavaScript are:
  • Basic math functions are performed with +, -, *, and /
  • == is the comparison operator, used in most Boolean expressions
Subject Variables and Calculations are not part of Javascript, but can be inserted using the tools provided in the researcher interface. At run-time they are resolved into the current value for the variable or calculation. The format is

[[subjVarName]]  

Remember to use quotes around the entire phrase if you are comparing to a string value. That is,

[[subjVar]] == 1

compares a numeric subject variable to the value 1, while

"[[subjVar]]" == "hello"

compares an alphanumeric subject variable to the string "hello"

Some common math examples
Math.random() < .5
// code above is a condition that executes 50% of the time

if (Math.random() < .3)
    "30% of the time";
else
    "70% of the time";
// above code could be used in a Calculation to return a string

External links for more information on JavaScript:
JavaScript's math functions
Javascript comparison operators

back to top

Order number of Substages within a Stage

Substages within a Stage are numbered consecutively on the left side of the grid (i.e. 1, 2, 3, etc.) However, in old experiments sometimes this numbering would go "bad" and you'd see 1, 3, 3, 5, 5 or something similar.

This was due to a previous error in moving the Substages around in the ordering. If you have an experiment that still has bad numbering, you should fix it by Adding and then Deleting a new Substage. This should cause a proper renumbering of the Substages within the Stage.

back to top

Using Conditions for Stage Alternatives in the first Stage

A Stage's Alternatives are determined at the very beginning of the Stage; that includes resolution of the Conditions you use on them. Trying to reference any Subject Variables in Conditions for the first Stage won't work, because it's impossible for them to have been created yet. For Stage Alternatives, any Subject Variables referenced in Conditions must be established at least one Stage PRIOR to the Stage in question.

back to top

Some peculiarities when streaming video

If you find that your streaming video doesn't work, showing a "Video File Not Found" message in DPTE, make sure it is two folders deep in your URL. The way many Flash streaming servers are set up (including ours at U of Iowa), the server uses one of the first two levels to redirect the URL, so we assume video files are located at least two levels deep on the server.

Also, be sure the video filename has an extension, i.e. .flv, .mp4, etc. DPTE must know the file type to stream the video.

Note that these requirements don't apply to progressive download video.
back to top

Social Experiments (updated for version 3.0.0)

The Social Experiment options under Settings in the Experiment Dashboard are for use with Social Experiments, which allow some degree of "Sharing" between Subjects, hypothetical or real. Currently in progress, you can designate an Experiment as Social, which opens new options on the Timed Items screen. These include marking an item as Shared and/or Shareable.

Shared Items appear with an announcement that they were shared by another user. The Subject has an option to open the 'embedded' item or not. An event is recorded when a Shared Item is presented and closed, and when its embedded item is opened and closed. Stimulus Items and Questionnaires can appear as Shared Items.

Shareable Items contain extra options in the form of buttons that the Subject can select. The button names are editable and their selection will be recorded. These Items also may contain Comments and allow the Subject to leave comments.

Note that if the "master switch" check box--Enable Social Experiment--is deselected, the Timed Items marked as Shared will remain, but appear as regular Timed Items. There is a DPTE System Variable, [[SYS_VAR_SOCIAL_EXP]], used to track whether Sharing is on or off, and this variable can be changed by the experiment using a Calculation item.

The "Read-only" mode feature allows Experiments to start from a "baseline" state, where Comments and button clicks added by a Subject are not visible to subsequent Subjects.

For more detail see Section Three of the DPTE 3.0 Help Manual.
back to top

Using HTML in (certain) DPTE text fields

As of DPTE 2.8.5, you can use HTML in the following DPTE text fields:
- A Text Stimulus Item's main text
- an Announcement's text
- the text of a Question.

In these fields, DPTE will treat the characters {{ and }} as < and > characters to surround your HTML. In the Player, this will render as HTML. For example, the text:


{{a href="http://www.mylink.com" target="_blank"}}Here is a link{{/a}}


would display a link to the location specified. Note that the link text will not appear underlined or blue unless you add that yourself. Remember to always include target="_blank" so that it opens in a new window/tab.

Flash text fields (and therefore DPTE text fields) support a subset of HTML which includes the majority of simple commands, but complex HTML is not supported or recommended. It doesn't hurt to try, but don't count on using HTML to accomplish your DPTE goals.

Most of what you would use HTML for is already provided by DPTE, i.e. bold, italic, etc. Specifying new fonts will probably not work since all of DPTE's fonts are embedded.

You can, however, use HTML to display an image using the img tag, as in
{{img src="http://www.mysite.com/myimage.jpg}}

A list of supported HTML appears at: Supported HTML in Flash/DPTE
back to top

Sending a subject to another URL when Experiment is over

You can use JavaScript to send a Subject to another URL, but you must make sure the Experiment can complete successfully, or you won't have all your data from the Subject.

There is a post at the DPTE blog that explains the process:
Sending Subject to another URL

back to top

Fixing Subject Variables using Search/Replace function (DPTE 2.8.5+)

The Search/Replace feature (on the Experiment Dashboard on the Experiment Setup screen) works like a normal Find/Replace function. To use it to rename Subject Variables requires a bit of thought, but the process is not overly complex.

If you have been using Subject Variables in your Calculations or Conditions, and you then rename a Calculation, Question, or Questionnaire, the Subject Variable you embedded in the Condition will no longer be valid.

The first step is to use the Diagnostics to identify the "old" name you are looking for. You need only check "Verify referenced subject variables" to get a list of offenders.

If a Calculation name has changed, just include the double brackets around the old Calculation name, which you can copy from the Diagnostics window. So you would search for [[CalculationName]].

In the 'Replace' box, put the new Calculation name, by using the Subject Variables dropdown menu.

Be sure you check the box "Include Conditions and Calculations in Search" since those are the areas where many of your Subject Variable references will be contained.

It's slightly more difficult for Questionnaires and Questions, since you can't look for the full Subject Variable name if you just changed, for example, a Questionnaire name. In that case, you would search for:

[[QuestionnaireName.

So that the string will be found for any Question used within that Questionnaire. Use the same format for the replacement Subject Variable. For Questions, you would find/replace:

.QuestionName]]

and that will find all the occurrences of that Question in any Questionnaire.

back to top

Archiving Experiments

An archived Experiment:
- Cannot run Subjects
- Cannot be edited, even by the Owner
- Is listed at the bottom of the Owner's Experiment list, and is not listed for Co-investigators and Participants
- Can be Unarchived or "restored" by the Owner, which makes it a normal Experiment again.

back to top

Uploading questions

To upload a batch of questions, you first create an XML file of questions.

Your XML file must follow the format in the schema file contained here:

Question Upload Schema file

You then use the Upload button on the Questions screen and direct it to your XML file of questions.

back to top

NEW FEATURES SINCE DPTE 3.0

The latest version of the documentation covers DPTE through version 3.0. Features/changes added since then include:

* Announcement Text can be made selectable/copyable
* Shared items can be included more often as Flow Items (see here)
* The Player can be instructed to skip the entire login process (go here)
* You can add a back button to Questionnaires (see here)
* The delimiter for Multiple Answer results has been changed from a single comma to pipe-colon-pipe, i.e. |:|


back to top

Pronouncing DPTE

DPTE is properly pronounced as written: D,P,T,E, or "Dee Pee Tee Eee".

"Diptee" is sternly frowned upon.