Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Questionnaire new: Difference between revisions

From Catglobe Wiki
Cg_pham (talk | contribs)
No edit summary
No edit summary
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Questionnaire_Functions]]
{{HelpFiles}}
{{HelpFiles}}
_NOTOC_


====Questionnaire_new====
= Questionnaire_new =


To create a new questionnaire object.
To create a new questionnaire object.


'''Syntax'''
=== Syntax ===


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


'''Arguments'''
=== Arguments ===


- questionnaireName : the name of new questionnaire.
- questionnaireName : the name of new questionnaire.


- questionnaireResourceTemplateResourceId : questionnaire resource template resource id
- questionnaireResourceTemplateResourceId : questionnaire resource template resource id


- questionanireTemplateResourceId : existing questionnaire template resource id.
- questionanireTemplateResourceId : existing questionnaire template resource id.


- layoutResourceId : layout resource id.
- layoutResourceId : layout resource id.


- questionnaireParentResourceId : parent resource id of questionnaire.
- questionnaireParentResourceId : parent resource id of questionnaire.


'''Return type'''
=== Return type ===


array.
array,
 
{| class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse;" width="651" cellspacing="0" cellpadding="2" border="1"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" bgcolor="#bfbfbf" |
'''Index'''
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" bgcolor="#bfbfbf" |
'''Data type'''
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" bgcolor="#bfbfbf" |
'''Value'''
 
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |
[QUESTIONNAIRE_OBJECT_TYPE]
[QUESTIONNAIRE_OBJECT_TYPE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Questionnaire object
Questionnaire object
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_RESOURCE_ID]
[QUESTIONNAIRE_RESOURCE_ID]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
0
0
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
[QUESTIONNAIRE _NAME]
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
| style="border: 1px solid #010101" width="120" |
[QUESTIONNAIRE_NAME]
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
string
string
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Entered value
Entered value
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]
[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Entered value
Entered value
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_PARENT_RESOURCE_ID]
[QUESTIONNAIRE_PARENT_RESOURCE_ID]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Entered value
Entered value
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]
[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Entered value
Entered value
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_TIME_REGISTRATION]
[QUESTIONNAIRE_TIME_REGISTRATION]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
boolean
boolean
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Depends on Questionnaire Resource Template settings
Depends on Questionnaire Resource Template settings
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_COMPLETED]
[QUESTIONNAIRE_COMPLETED]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
bool (read only)
bool (read only)
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
FALSE
FALSE
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]
[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
bool
bool
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
FALSE
FALSE
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_USE_OLD_VIEWER]
[QUESTIONNAIRE_USE_OLD_VIEWER]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
bool
bool
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
TRUE
TRUE
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
[QUESTIONNAIRE _ALIAS]
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
| style="border: 1px solid #010101" width="120" |
[QUESTIONNAIRE_ALIAS]
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
string
string
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
""
""


Line 106: Line 152:


- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true
- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_LAYOUT_RESOURCE_ID]
[QUESTIONNAIRE_LAYOUT_RESOURCE_ID]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Entered value
Entered value
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_TIME_ESTIMATE]
[QUESTIONNAIRE_TIME_ESTIMATE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
string
string
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
""
""
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_STATUS]
[QUESTIONNAIRE_STATUS]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
1
1


<nowiki>**Constant:</nowiki>
**Constant:


1 : QUESTIONNAIRE_STATUS_CLOSED
1&nbsp;: QUESTIONNAIRE_STATUS_CLOSED


2: QUESTIONNAIRE_STATUS_PAUSED
2: QUESTIONNAIRE_STATUS_PAUSED
Line 137: Line 192:


4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST
4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
&nbsp;
 
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_TARGET]
[QUESTIONNAIRE_TARGET]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
0
0
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_CATI_OUTCOME_SET]
[QUESTIONNAIRE_CATI_OUTCOME_SET]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
string
string
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
""
""


Only can be changed when there's no Cati contact
Only can be changed when there's no Cati contact
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE]
[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
datetime array
datetime array
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Mindate
Mindate
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_DEVELOPMENT_START_DATE]
[QUESTIONNAIRE_DEVELOPMENT_START_DATE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
datetime array
datetime array
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Mindate
Mindate
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE]
[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
datetime array
datetime array
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Maxdate
Maxdate
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE_DEVELOPMENT_END_DATE]
[QUESTIONNAIRE_DEVELOPMENT_END_DATE]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
datetime array
datetime array
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Maxdate
Maxdate
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE _MAN_HOURS]
[QUESTIONNAIRE _MAN_HOURS]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
number
number
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
0
0
|- align="left" valign="top"
 
| style="border: 1px solid #010101" width="348" |
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |  
[QUESTIONNAIRE _DESCRIPTION]
[QUESTIONNAIRE _DESCRIPTION]
| style="border: 1px solid #010101" width="120" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="120" |  
string
string
| style="border: 1px solid #010101" width="183" |
 
| style="border: 1px solid rgb(1, 1, 1);" width="183" |  
Default is same with questionnaire name, if description is empty
Default is same with questionnaire name, if description is empty
|-
|[QUESTIONNAIRE_EDITOR_LINK]
|string
|Questionnaire editor link
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1);" width="348" |
[QUESTIONNAIRE_DEFAULT_LANGUAGE]
| style="border: 1px solid rgb(1, 1, 1);" width="120" |
string


'''Example'''
| style="border: 1px solid rgb(1, 1, 1);" width="183" |
The default language of questionnaire in iso code
|-
|[QUESTIONNAIRE_LANGUAGES]
|array
|Array languages of the questionnaire in [[IsoCodeLanguage|isocodes]]. Ex: {da-DK, en-GB}
|}


<br />'''Example'''
<source lang="javascript">
array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 );
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}}*/
</source>
'''Availability'''
'''Availability'''


Version 5.8
Version 5.8
__NOTOC__
[[Category:Questionnaire Functions]]
<!-- imported from file: 8015.htm-->

Latest revision as of 10:01, 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