Difference between revisions of "Questionnaire new"

From Catglobe Wiki
Jump to: navigation, search
(Tag: visualeditor)
(Tag: visualeditor)
Line 292: Line 292:
 
|[QUESTIONNAIRE_LANGUAGES]
 
|[QUESTIONNAIRE_LANGUAGES]
 
|array
 
|array
|Array languages of the questionnaire in isocodes.Ex: {da-DK, en-GB}
+
|Array languages of the questionnaire in [[IsocodeLanguage|isocodes]]. Ex: {da-DK, en-GB}
 
|}
 
|}
  

Revision as of 10:59, 10 May 2019

_NOTOC_

Questionnaire_new

To create a new questionnaire object.

Syntax

array Questionnaire_new(string questionnaireName, number questionnaireResourceTemplateResourceId, number questionnaireTemplateResourceId, number layoutResourceId, number questionnaireParentResourceId)

Arguments

- questionnaireName : the name of new questionnaire.

- questionnaireResourceTemplateResourceId : questionnaire resource template resource id

- questionanireTemplateResourceId : existing questionnaire template resource id.

- layoutResourceId : layout resource id.

- questionnaireParentResourceId : parent resource id of questionnaire.

Return type

array,

Index

Data type

Value

[QUESTIONNAIRE_OBJECT_TYPE]

number

Questionnaire object

[QUESTIONNAIRE_RESOURCE_ID]

number

0

[QUESTIONNAIRE_NAME]

string

Entered value

[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_PARENT_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TIME_REGISTRATION]

boolean

Depends on Questionnaire Resource Template settings

[QUESTIONNAIRE_COMPLETED]

bool (read only)

FALSE

[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]

bool

FALSE

[QUESTIONNAIRE_USE_OLD_VIEWER]

bool

TRUE

[QUESTIONNAIRE_ALIAS]

string

""

Default:

- Disabled

- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true

[QUESTIONNAIRE_LAYOUT_RESOURCE_ID]

number

Entered value

[QUESTIONNAIRE_TIME_ESTIMATE]

string

""

[QUESTIONNAIRE_STATUS]

number

1

    • Constant:

1 : QUESTIONNAIRE_STATUS_CLOSED

2: QUESTIONNAIRE_STATUS_PAUSED

3: QUESTIONNAIRE_STATUS_ACTIVE

4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST

 

[QUESTIONNAIRE_TARGET]

number

0

[QUESTIONNAIRE_CATI_OUTCOME_SET]

string

""

Only can be changed when there's no Cati contact

[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE]

datetime array

Mindate

[QUESTIONNAIRE_DEVELOPMENT_START_DATE]

datetime array

Mindate

[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE]

datetime array

Maxdate

[QUESTIONNAIRE_DEVELOPMENT_END_DATE]

datetime array

Maxdate

[QUESTIONNAIRE _MAN_HOURS]

number

0

[QUESTIONNAIRE _DESCRIPTION]

string

Default is same with questionnaire name, if description is empty

[QUESTIONNAIRE_EDITOR_LINK] string Questionnaire editor link

[QUESTIONNAIRE_DEFAULT_LANGUAGE]

string

The default language of questionnaire in iso code

[QUESTIONNAIRE_LANGUAGES] array Array languages of the questionnaire in isocodes. Ex: {da-DK, en-GB}


Example

array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 );
/*{11,15639974,new questionnaire,15571218,15571195,15639973,True,False,False,False,,15571205,Questionnaire Standard Times,3,0,,{1,1,1,0,0,0,0,1,65},{1,1,1,0,0,0,0,1,65},{9999,12,31,23,59,59,999,52,65},{9999,12,31,23,59,59,999,52,65},0,Qnaire xxx (created due to no description).,/questionnairemodule/editor/questionnairejseditor.aspx?id=3761&pq=$5387,da-DK, {da-DK,en-GB}}*/

Availability

Version 5.8