More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{HelpFiles}} | {{HelpFiles}} | ||
==== Questionnaire_new ==== | ==== Questionnaire_new ==== | ||
To create a new questionnaire object. | To create a new questionnaire object. | ||
Line 23: | Line 23: | ||
'''Return type''' | '''Return type''' | ||
array, | array, | ||
{| width="651" class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse;" border="1" cellspacing="0" cellpadding="2" | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | |||
'''Index''' | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | |||
'''Data type''' | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" bgcolor="#bfbfbf" | | |||
'''Value''' | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_OBJECT_TYPE] | |||
'''Example''' | | width="120" style="border: 1px solid rgb(1, 1, 1);" | | ||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Questionnaire object | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_RESOURCE_ID] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
0 | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE _NAME] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
string | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Entered value | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_RESOURCE_TEMPLATE_RESOURCE_ID] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Entered value | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_PARENT_RESOURCE_ID] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Entered value | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_TEMPLATE_RESOURCE_ID] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Entered value | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_TIME_REGISTRATION] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
boolean | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Depends on Questionnaire Resource Template settings | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_COMPLETED] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
bool (read only) | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
FALSE | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNAIRE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
bool | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
FALSE | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_USE_OLD_VIEWER] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
bool | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
TRUE | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE _ALIAS] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
string | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
"" | |||
Default: | |||
- Disabled | |||
- Enabled when [QUESTIONNAIRE_DISPLAY_IN_MY_QUESTIONNNAIRE] = true | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_LAYOUT_RESOURCE_ID] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Entered value | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_TIME_ESTIMATE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
string | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
"" | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_STATUS] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
1 | |||
**Constant: | |||
1 : QUESTIONNAIRE_STATUS_CLOSED | |||
2: QUESTIONNAIRE_STATUS_PAUSED | |||
3: QUESTIONNAIRE_STATUS_ACTIVE | |||
4: QUESTIONNAIRE_STATUS_OPEN_FOR_TEST | |||
| |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_TARGET] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
0 | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_CATI_OUTCOME_SET] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
string | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
"" | |||
Only can be changed when there's no Cati contact | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_AUTOMATIC_RELEASE_DATE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
datetime array | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Mindate | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_DEVELOPMENT_START_DATE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
datetime array | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Mindate | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_AUTOMATIC_CLOSE_DATE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
datetime array | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Maxdate | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE_DEVELOPMENT_END_DATE] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
datetime array | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Maxdate | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE _MAN_HOURS] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
number | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
0 | |||
|- align="left" valign="top" | |||
| width="348" style="border: 1px solid rgb(1, 1, 1);" | | |||
[QUESTIONNAIRE _DESCRIPTION] | |||
| width="120" style="border: 1px solid rgb(1, 1, 1);" | | |||
string | |||
| width="183" style="border: 1px solid rgb(1, 1, 1);" | | |||
Default is same with questionnaire name, if description is empty | |||
|} | |||
<br> | |||
<br> '''Example''' | |||
array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 ); | array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 ); | ||
Line 231: | Line 286: | ||
'''Availability''' | '''Availability''' | ||
Version 5.8 __NOTOC__ | Version 5.8 __NOTOC__ | ||
[[Category:Questionnaire_Functions]] | [[Category:Questionnaire_Functions]] |
Revision as of 08:28, 15 December 2011
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
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 |
Example
array a= Questionnaire_new("new questionnaire",34409965,34822447 , 34779240,34775455 );
Availability
Version 5.8