Surveys
Survey language settings
Groups
Questions
Tokens
__construct()
activate_survey()
activate_tokens()
add_group()
add_language()
add_participants()
add_response()
add_survey()
delete_group()
delete_language()
delete_participants()
delete_question()
delete_survey()
export_responses()
export_responses_by_token()
export_statistics()
export_timeline()
get_group_properties()
get_language_properties()
get_participant_properties()
get_question_properties()
get_session_key()
get_site_settings()
get_summary()
get_survey_properties()
import_group()
import_question()
import_survey()
invite_participants()
list_groups()
list_participants()
list_questions()
list_surveys()
release_session_key()
remind_participants()
set_group_properties()
set_language_properties()
set_participant_properties()
set_question_properties()
set_survey_properties()
_checkSessionKey()
_doLogin()
_jumpStartSession()
$controller
Basic model
sid | int | The survey id (primary key) | 
owner_id | int | Id of the user that survey belongs to | 
admin | int | The administrator of the survey | 
active | varchar(Y|N) | Survey is active | 
expires | datetime | Date the survey is due to expire | 
startdate | datetime | Date the survey is due to start | 
adminemail | varchar | Email of the survey's administrator | 
anonymized | varchar(Y|N) | Survey has anonymized responses enabled | 
faxto | varchar | This field is used to give a fax number on the "printable survey" | 
format | varchar(G|S|A) | The way the questions are shown (G-By group, S - By question, A-All) | 
savetimings | varchar (Y|N) | Option to save timings of survey completion | 
template | varchar | template to use for Survey presentation | 
language | varchar | Language code of the surveys's basic language | 
additional_languages | varchar | "|" separated value of additional languages codes | 
datestamp | varchar(Y|N) | Store date information for survey responses | 
usecookie | varchar(Y|N) | Use cookies to prevent repeated participation | 
allowregister | varchar(Y|N) | Allow new users to register when using tokens | 
allowsave | varchar(Y|N) | Allow surveys to be saverd for future completion | 
autonumber_start | int | Change the numbering in the surveys id | 
autoredirect | varchar(Y|N) | Automatically load URL when survey complete | 
allowprev | varchar(Y|N) | Show [<< Prev] button | 
printanswers | varchar(Y|N) | Participants may print answers | 
ipaddr | varchar(Y|N) | Save IP address of responses | 
refurl | varchar(Y|N) | Save referrer URL of responses | 
datecreated | date | Creation time of Survey | 
publicstatistics | varchar(Y|N) | Enable the creation of public statistics | 
publicgraphs | varchar(Y|N) | Show graphs in public statistic | 
listpublic | varchar(Y|N) | Publish to available surveys portal | 
htmlemail | varchar(Y|N) | Use HTML format for token emails | 
sendconfirmation | varchar(Y|N) | Enable Send confirmation emails | 
tokenanswerspersistence | varchar(Y|N) | Enable token-based response persistence | 
assessments | varchar(Y|N) | Enable assesment mode | 
usecaptcha | varchar(A|B|C|D|X|R|S|N) | Enble use of captcha for public pages | 
usetokens | varchar(Y|N) | Tokens are used | 
bounce_email | varchar | Email for delivery error notification email | 
attributedescriptions | text | Attribute description expression | 
emailresponseto | text | Send detailed admin notification email to | 
emailnotificationto | text | Send basic admin notification email to | 
tokenlength | int | Set token length to | 
showxquestions | varchar(Y|N) | Show "There are X questions in this survey" | 
showgroupinfo | varchar(B|N|D|X) | Show group name and|or description. B-Both, N-Name, D-Description, X-None | 
shownoanswer | varchar(Y|N) | When Yes, the No Answer will be displayed as the default option for non-mandatory single-select questions | 
showqnumcode | varchar(B|N|C|X) | Show question number and code, B-Both, N-Name, C-Code, X-None | 
bouncetime | int | Time to wait for bounce enable | 
bounceprocessing | varchar(L|N|G) | Bounce settings to use, N-None, L-Survey settings, G-Global settings | 
bounceaccounttype | varchar | Bounce email account type (IMAP|POP) | 
bounceaccounthost | varchar | Bounce account host | 
bounceaccountpass | varchar | Bounce account password | 
bounceaccountencryption | varchar | Bounce account encryption | 
bounceaccountuser | varchar | Bounce account username | 
showwelcome | varchar(Y|N) | Show welcome screen | 
showprogress | varchar(Y|N) | Allow the administrator to turn off the Progress bar | 
allowjumps | varchar(Y|N) | When Yes, an index will be displayed on the right side. Users can jump to any section in the survey | 
navigationdelay | int | Number of seconds before Previous and Next buttons are enabled | 
nokeyboard | varchar(Y|N) | By activating this setting there will be a virtual keyboard available for certain question types | 
alloweditaftercompletion | varchar(Y|N) | Allow editing of answers after completion | 
googleanalyticsstyle | varchar(0|1|2) | 0-Do not use GA, 1-Use Default, 3-Custom GA code | 
googleanalyticsapikey | varchar | API key to allow integration with Google Analytics | 
Model regarding language specific survey information
surveyls_survey_id | int | The survey_language settings id | 
surveyls_language | varchar | Language key for the survey (primary key with surveyls_survey_id) | 
surveyls_title | varchar | Title of the Survey | 
surveyls_description | text | Description of the Survey | 
surveyls_welcometext | text | Welcome text for the Survey | 
surveyls_endtext | text | End text of the Survey | 
surveyls_url | varchar | End URL | 
surveyls_urldescription | varchar | End URL Description | 
surveyls_email_invite_subj | varchar | Subject of invitation email | 
surveyls_email_invite | text | Body of invitation email | 
surveyls_email_remind_subj | varchar | Subject of reminder email | 
surveyls_email_remind | text | Body of reminder email | 
surveyls_email_register_subj | varchar | Subject of registretion email | 
surveyls_email_register | text | Body of registration email | 
surveyls_email_confirm_subj | varchar | Subject of confirmation email | 
surveyls_email_confirm | text | Body of confirmation email | 
surveyls_dateformat | int(0-12) | Format of date | 
surveyls_attributecaptions | text | Returns the token's captions | 
email_admin_notification_subj | varchar | Subject of Admin email notification | 
email_admin_notification |  | Body of admin email notification | 
email_admin_responses_subj | varchar | Subject of admin response email | 
email_admin_responses | t | Body of admin responses email | 
surveyls_numberformat | int(0-1) | Decimal mark, 0-".", 1-"," | 
Model of question Groups
gid | int | Group id (Primary key with language) | 
sid | int | Survey id the group belongs to | 
group_name | varchar | Name of the group | 
group_order | int | Order that the group should appear (relative to other groups) | 
description | text | Group description | 
language | varchar | Language of the group | 
randomization_group | varchar | Identifier of randomization group | 
grelevance | text | Function to declare that the group has dependencies | 
Model of Question
qid | int | Question ID (Primary key with language) | 
parent_qid | int | Id of the question that this question belongs (if a subquestion) | 
sid | int | Id of the Survey this question belongs | 
gid | int | Id of the group this question belongs | 
type | varchar | Type of the question () | 
title | varchar | Title for the question | 
question | text | Actual text question | 
preg | text | the optional regular expression validation criteria for the question | 
help | text | Help text for the question | 
other | varchar | It allows you to specify that an "other" option be presented in some of the list question types | 
mandatory | Varchar(Y|N) | Question is mandatory | 
question_order | int | Order of appearance | 
language | varchar | language code of the question | 
scale_id | int | 0 or 1, depending upon question type (e.g. array text will have two scales) | 
same_default | int | 'Y' for true, in which case any defaultvalue set for primary language applies to other languages | 
relevance | text | This is the Boolean equation that specifies the conditions for this question | 
Model of participant Tokens
tid | int | Dd of the token (primary key) | 
participant_id | varchar | Id from the central participants | 
firstname | varchar | Firstname of participant | 
lastname | varchar | Lastname of participant | 
text | Participants email | |
emailstatus | text | If ok - email is valid | 
token | varchar | Token string | 
language | varchar | Participants language | 
blacklisted | varchar(Y|N) | Whether the participant is blacklisted | 
sent | varchar | Invitation is sent (N|Date) | 
remindersent | varchar | Reminder is sent(N|Date) | 
remindercount | int | Number of reminders sent | 
completed | varchar(Y|N) | Is token used | 
usesleft | int | Number of uses left for a token | 
validfrom | datetime | Tokens start date | 
validuntil | datetime | Tokens end date | 
mpid | int | Mpid | 
This class handles all methods of the RPCs
__construct(\AdminController $controller) : void
| access | public | 
|---|
\AdminController
activate_survey(string $sSessionKey, int $iSurveyID) : array
| access | public | 
|---|
stringAuth credentials
intThe id of the survey to be activated
arrayThe result of the activationactivate_tokens(string $sSessionKey, integer $iSurveyID, array $aAttributeFields) : array
| access | public | 
|---|
stringAuth credentials
integerID of the survey where a token table will be created for
arrayAn array of integer describing any additional attribute fields
arrayStatus=>OK when successfull, otherwise the error descriptionadd_group(string $sSessionKey, int $iSurveyID, string $sGroupTitle, string $sGroupDescription) : string
Used as a placeholder for importing questions. Returns the groupid of the created group.
| access | public | 
|---|
stringAuth credentials
intDd of the Survey to add the group
stringName of the group
stringOptional description of the group
stringThe id of the new groupadd_language(string $sSessionKey, integer $iSurveyID, string $sLanguage) : array
| access | public | 
|---|
stringAuth credentials
integerID of the survey where a token table will be created for
stringA valid language shortcut to add to the current survey. If the language already exists no error will be given.
arrayStatus=>OK when successfull, otherwise the error descriptionadd_participants(string $sSessionKey, int $iSurveyID, \struct $aParticipantData, bool $bCreateToken) : array
Returns the inserted data including additional new information like the Token entry ID and the token string.
| access | public | 
|---|
stringAuth credentials
intId of the Survey
\structData of the participants to be added
boolOptional - Defaults to true and determins if the access token automatically created
arrayThe values addedadd_response(string $sSessionKey, int $iSurveyID, \struct $aResponseData) : int
Returns the id of the inserted survey response
| access | public | 
|---|
stringAuth credentials
intId of the Survey to insert responses
\structThe actual response
intThe response IDadd_survey(string $sSessionKey, int $iSurveyID, string $sSurveyTitle, string $sSurveyLanguage, string $sformat) : string
Used as a placeholder for importing groups and/or questions.
| access | public | 
|---|
stringAuth credentials
intThe wish id of the Survey to add
stringTitle of the new Survey
stringDefault language of the Survey
stringQuestion appearance format
stringdelete_group(string $sSessionKey, int $iSurveyID, int $iGroupID) : int
Returns the id of the deleted group.
| access | public | 
|---|
stringAuth credentials
intId of the survey that the group belongs
intId of the group to delete
intThe id of the deleted groupdelete_language(string $sSessionKey, integer $iSurveyID, string $sLanguage) : array
| access | public | 
|---|
stringAuth credentials
integerID of the survey where a token table will be created for
stringA valid language shortcut to delete from the current survey. If the language does not exist in that survey no error will be given.
arrayStatus=>OK when successfull, otherwise the error descriptiondelete_participants(string $sSessionKey, int $iSurveyID, array $aTokenIDs) : array
Returns the id of the deleted token
| access | public | 
|---|
stringAuth credentials
intId of the Survey that the participants belong to
arrayId of the tokens/participants to delete
arrayResult of deletiondelete_question(string $sSessionKey, int $iQuestionID) : string
Returns the id of the deleted question.
| access | public | 
|---|
stringAuth credentials
intiQuestionID Id of the question to delete
stringId of the deleted Questiondelete_survey(string $sSessionKey, int $iSurveyID) : array
| access | public | 
|---|
stringAuth credentials
intThe id of the Survey to be deleted
arrayReturns Statusexport_responses(string $sSessionKey, int $iSurveyID, string $sDocumentType, string $sLanguageCode, string $sCompletionStatus, string $sHeadingType, string $sResponseType, integer $iFromResponseID, integer $iToResponseID, array $aFields) : array
Returns the requested file as base64 encoded string
| access | public | 
|---|
stringAuth credentials
intId of the Survey
stringpdf,csv,xls,doc
stringThe language to be used
stringOptional 'complete','incomplete' or 'all' - defaults to complete
string'code','full' or 'abbreviated' Optional defaults to 'code'
string'short' or 'long' Optional defaults to 'short'
integerOptional
integerOptional
arrayOptional Selected fields
arrayOn success: Requested file as base 64-encoded string. On failure array with error informationexport_responses_by_token(string $sSessionKey, int $iSurveyID, string $sDocumentType, string $sLanguageCode, string $sCompletionStatus, string $sHeadingType, string $sResponseType, integer $iFromResponseID, integer $iToResponseID, array $aFields) : array
Returns the requested file as base64 encoded string
| access | public | 
|---|
stringAuth credentials
intId of the Survey
stringpdf,csv,xls,doc
stringThe token for which responses needed
stringThe language to be used
stringOptional 'complete','incomplete' or 'all' - defaults to complete
string'code','full' or 'abbreviated' Optional defaults to 'code'
string'short' or 'long' Optional defaults to 'short'
arrayOptional Selected fields
arrayOn success: Requested file as base 64-encoded string. On failure array with error informationexport_statistics(string $sSessionKey, int $iSurveyID, string $docType, $sLanguage, string $graph, int|array $aGroupIDs) : string
Returns string - base64 encoding of the statistics.
| access | public | 
|---|
stringAuth credentials
intId of the Survey
stringType of documents the exported statistics should be $param string $sLanguage Optional language of the survey to use
stringLanguage to use
stringCreate graph option
int|arrayOptional IDs of groups to export statistics for
stringBase64 encoded string with the statistics fileexport_timeline(string $sSessionKey, int $iSurveyID, string $sType, string $dStart, string $dEnd) : array
Returns array On success: The timeline. On failure array with error information
| access | public | 
|---|
stringAuth credentials
intId of the Survey
stringType of statistics needes (per day or per hour). Permitted values day|hour
stringStarting date of the period for which to extract timeline
stringEnd date of the period for which to extract timeline
stringArray On success: The timeline. On failure array with error informationget_group_properties(string $sSessionKey, int $iGroupID, array $aGroupSettings) : array
Returns array of properties
| access | public | 
|---|
stringAuth credentials
intId of the group to get properties
arrayThe properties to get
arrayThe requested valuesget_language_properties(string $sSessionKey, int $iSurveyID, array $aSurveyLocaleSettings, string $sLang) : array
| access | public | 
|---|
stringAuth credentials
intDd of the Survey
arrayProperties to get
stringLanguage to use
arrayThe requested valuesget_participant_properties(string $sSessionKey, int $iSurveyID, int $iTokenID, array $aTokenProperties) : array
| access | public | 
|---|
stringAuth credentials
intId of the Survey to get token properties
intId of the participant to check
arrayThe properties to get
arrayThe requested valuesget_question_properties(string $sSessionKey, int $iQuestionID, array $aQuestionSettings, string $sLanguage) : array
Returns string
| access | public | 
|---|
stringAuth credentials
intId of the question to get properties
arrayThe properties to get
stringOptional parameter language for multilingual questions
arrayThe requested valuesget_session_key(string $username, string $password) : string
| access | public | 
|---|
string
string
stringget_site_settings(string $sSessionKey, string $sSetttingName) : string
| access | public | 
|---|
stringAuth Credentials
stringName of the setting to get
stringThe requested valueget_summary(string $sSessionKey, int $iSurveyID, string $sStatName) : string
Returns the requested value as string.
| access | public | 
|---|
stringAuth credentials
intId of the Survey to get summary
stringName of the sumamry option
stringThe requested valueget_survey_properties(string $sSessionKey, int $iSurveyID, array $aSurveySettings) : array
| access | public | 
|---|
stringAuth credentials
intThe id of the Survey to be checked
arrayThe properties to get
arrayimport_group(string $sSessionKey, int $iSurveyID, string $sImportData, string $sImportDataType, string $sNewGroupName, string $sNewGroupDescription) : integer
| access | public | 
|---|
stringAuth credentials
intThe id of the survey that the group will belong
stringString containing the BASE 64 encoded data of a lsg,csv
stringlsg,csv
stringOptional new name for the group
stringOptional new description for the group
integeriGroupID - ID of the new groupimport_question(string $sSessionKey, int $iSurveyID, int $iGroupID, string $sImportData, string $sImportDataType, string $sMandatory, string $sNewQuestionTitle, string $sNewqQuestion, string $sNewQuestionHelp) : integer
| access | public | 
|---|
string
intThe id of the survey that the question will belong
intThe id of the group that the question will belong
stringString containing the BASE 64 encoded data of a lsg,csv
stringlsq,csv
stringOptional Mandatory question option (default to No)
stringOptional new title for the question
stringAn optional new question
stringAn optional new question help text
integeriQuestionID - ID of the new questionimport_survey(string $sSessionKey, string $sImportData, string $sImportDataType, string $sNewSurveyName, integer $DestSurveyID) : integer
| access | public | 
|---|
stringAuth Credentials
stringString containing the BASE 64 encoded data of a lss,csv,xls or survey zip archive
stringlss,csv,xls or zip
stringThe optional new name of the survey
integerThis is the new ID of the survey - if already used a random one will be taken instead
integeriSurveyID - ID of the new surveyinvite_participants(string $sSessionKey, int $iSurveyID) : array
| access | public | 
|---|
stringAuth credentials
intID of the survey that participants belong
arrayResult of the actionlist_groups(string $sSessionKey, int $iSurveyID) : array
Returns array of ids and info.
| access | public | 
|---|
stringAuth credentials
intId of the Survey containing the groups
arrayThe list of groupslist_participants(string $sSessionKey, int $iSurveyID, int $iStart, int $iLimit, bool $bUnused) : array
if $bUnused is true, user will get the list of not completed tokens (token_return functionality). Parameters iStart and ilimit are used to limit the number of results of this call.
| access | public | 
|---|
stringAuth credentials
intId of the survey to list participants
intStart id of the token list
intNumber of participants to return
boolIf you want unused tokensm, set true
arrayThe list of tokenslist_questions(string $sSessionKey, int $iSurveyID, int $iGroupID, string $sLanguage) : array
Returns array of ids and info.
| access | public | 
|---|
stringAuth credentials
intId of the survey to list questions
intOptional id of the group to list questions
stringOptional parameter language for multilingual questions
arrayThe list of questionslist_surveys(string $sSessionKey, string $sUser) : array
Returns array of ids and info. If user is admin he can get surveys of every user (parameter sUser) or all surveys (sUser=null) Else only the syrveys belonging to the user requesting will be shown.
| access | public | 
|---|
stringAuth credentials
stringOptional username to get list of surveys
arrayThe list of surveysrelease_session_key(string $sSessionKey) : string
| access | public | 
|---|
string
stringremind_participants(string $sSessionKey, int $iSurveyID, int $iMinDaysBetween, int $iMaxReminders) : array
| access | public | 
|---|
stringAuth credentials
intID of the survey that participants belong
intOptional parameter days from last reminder
intOptional parameter Maximum reminders count
arrayResult of the actionset_group_properties(string $sSessionKey, integer $iGroupID, array | \struct $aGroupData) : array
| access | public | 
|---|
stringAuth credentials
integerarray\structarrayOf succeeded and failed modifications according to internal validation.set_language_properties(string $sSessionKey, integer $iSurveyID, array | \struct $aSurveyLocaleData, string $sLanguage) : array
| access | public | 
|---|
stringAuth credentials
integerarray\structstringarrayStatus=>OK, when save successful otherwise error text.set_participant_properties(string $sSessionKey, int $iSurveyID, int $iTokenID, array | \struct $aTokenData) : array
Returns array
| access | public | 
|---|
stringAuth credentials
intId of the survey that participants belong
intId of the participant to alter
array\structData to change
arrayResult of the change actionset_question_properties(string $sSessionKey, integer $iQuestionID, array | \struct $aQuestionData, string $sLanguage) : array
| access | public | 
|---|
stringAuth credentials
integerarray\structstringOptional parameter language for multilingual questions
arrayOf succeeded and failed modifications according to internal validation.set_survey_properties(string $sSessionKey, integer $iSurveyID, array | \struct $aSurveyData) : array
| access | public | 
|---|
stringAuth credentials
integerarray\structarrayOf succeeded and failed nodifications according to internal validation._checkSessionKey(string $sSessionKey) : bool
If yes returns true, otherwise false and sends an error message with error code 1
| access | protected | 
|---|
stringAuth credentials
bool_doLogin(string $sUsername, mixed $sPassword) : bool
| access | protected | 
|---|
stringThe username
mixedThe Password
bool_jumpStartSession(string $username) : bool
| access | protected | 
|---|
stringThe username
bool$controller : \AdminController