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.

QAS getByUserResourceId: Difference between revisions

From Catglobe Wiki
No edit summary
No edit summary
Line 11: Line 11:
* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first.
* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first.


* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first.
* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first. Create qas if none existed.


* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone, bool setTestIfCreate) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first.
* QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone, bool setTestIfCreate) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first. Create qas if none existed. Can also set test qas if create, default is false.


* QAS_getByUserResourceId(int userResourceId, Array questionnaireResourceIds) - Get a list of qas by the specified user for all questionnaires. Ordered by Created date, latest first.
* QAS_getByUserResourceId(int userResourceId, Array questionnaireResourceIds) - Get a list of qas by the specified user for all questionnaires. Ordered by Created date, latest first.

Revision as of 05:05, 11 August 2020



QAS_getByUserResourceId

Get list of answer sheets for a user.

Syntax

  • QAS_getByUserResourceId(int userResourceId) - Get a list of qas by the specified user for all questionnaires. Ordered by Created date, latest first.
  • QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first.
  • QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first. Create qas if none existed.
  • QAS_getByUserResourceId(int userResourceId, int questionnaireResourceId, bool createIfNone, bool setTestIfCreate) - Get a list of qas by the specified user and questionnaire. Ordered by Created date, latest first. Create qas if none existed. Can also set test qas if create, default is false.
  • QAS_getByUserResourceId(int userResourceId, Array questionnaireResourceIds) - Get a list of qas by the specified user for all questionnaires. Ordered by Created date, latest first.

Note: userResourceId:

  • 0 is use current user
  • -1 to force no user
  • -2 to anonymous user

Return value

Array of QAS {qas1, qas2,...} which have been assigned to the specific user. If no answer sheets exists then it will return an empty array.

Example:

ex1 :

array qas_list = QAS_getByUserResourceId(38588899); 
print(qas_list);

ex2:

array qas_list = QAS_getByUserResourceId(38588899,38606878);
print(qas_list);