public class BuildHead
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FIRST_STUDY_VAR_NUM |
static int |
NUM_HIDDEN_VAR |
| Constructor and Description |
|---|
BuildHead() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getBodyStart(java.lang.String title,
java.lang.String shortTitle,
java.lang.String server,
java.lang.String path,
java.lang.String script,
java.lang.String dataPath,
java.lang.String target)
Get the html code for the web page from the beginning of the page
to the first question.
|
java.lang.String |
getBodyStartNotLastPage(java.lang.String title,
java.lang.String target)
Page start to begin forms that are not last pages of surveys that need all the hidden variables.
|
java.lang.String |
getEnd(boolean doVAS,
boolean allowCount)
The web page code to end the form and webpage.
|
java.lang.String |
getHead(java.lang.String title,
boolean doVAS)
Generate the code for the header of a web page
|
java.lang.String |
getPHPHeader()
put the code on those pages that will have PHP embedded to start a PHP session
|
java.lang.String |
getPHPInter(int startVar,
boolean inter) |
java.lang.String |
getSessionVar(int startVar)
put the code in the pages to retrieve the variables posted from the previous pages and put in as
hidden variables in the current page.
|
public static final int FIRST_STUDY_VAR_NUM
public static final int NUM_HIDDEN_VAR
public java.lang.String getHead(java.lang.String title,
boolean doVAS)
title - the title of the survey. Will be placed both in
the title field of the head and at the beginning of the survey.doVAS - flag to indicate if the survey contains any visual
analog scale items. If it does, the code to include the
proper JavaScripts is added to the page.public java.lang.String getPHPInter(int startVar,
boolean inter)
public java.lang.String getPHPHeader()
public java.lang.String getSessionVar(int startVar)
startVar - the variable number for the first variablepublic java.lang.String[] getBodyStart(java.lang.String title,
java.lang.String shortTitle,
java.lang.String server,
java.lang.String path,
java.lang.String script,
java.lang.String dataPath,
java.lang.String target)
title - The title of the survey. The
same title information is placed in the web page
header.shortTitle - This is the name of the
survey to communicate with the server so that this
particular study can be identified. The data will will
have the name 'shortTitle.csv'.server - The name of the server that will
collect the data.path - The path from the server root '/' to
the script that will do the collection of the data. This
path is 'cgi-bin/'. Notice that there is no slash at the
beginning of the path. It is usually part of the name
of the server.script - The name of the script.dataPath - The path from the root folder of
the computer that has the server where the data will be stored.target - The page where the script will direct the
participant when the server has been submitted. This page is
usually the debriefing or thank you page.public java.lang.String getBodyStartNotLastPage(java.lang.String title,
java.lang.String target)
title - survey titletarget - the target for the next page.public java.lang.String getEnd(boolean doVAS,
boolean allowCount)
doVAS - the flag if any visual analog scale items are in the survey.
This flag will cause the needed code to be added.allowCount - flag to indicate if the survey make will allow
me to count the use of this survey anonymously.