Questionnaire links

From Catglobe Wiki
Revision as of 10:16, 21 January 2019 by Administrator (talk | contribs)
Jump to: navigation, search



Questionnaire links

Links to questionnaires can be created in a number of ways to support various actions upon users viewing their answer sheets. One type of link is recurring links where clicking the link will automatically generate a new answer sheet for that user. The basic part of the link can be found on the information dialog on the questionnaire list. By default the tag '&n=1' will have been added.

Recurring link

r=[qasGUID]
Open directly an existing answer sheet
r=[qnaireGUID]
Use combine questionanire guid with below tags for open existing answer sheet or generate new answer sheet
&n=1
Will generate a new answer sheet each time the link is clicked. But it will check whether the user has a cookie telling Catglobe that this user should return to the initial answer sheet he created using the link and thus try to avoid that any one user uses the link more than once.
&n=2
Similar to n=1 except that it will actually also generate a new user to attach to the answer sheet created. There may be various reasons why you would want to create user accounts when users use the link. You may for example have CGScript in your questionnaire that send information to update the user object with demographic data.
&n=3
Will generate a new answer sheet for logged in user each time the link clicked (need to be logged in before)
&c=[accessCode]
Will open an existing answer sheet beloging to that access code
&b=1
When this tag is added we will ignore that the logged in user has a session cookie which informs us that he has already started on a different answer sheet. We will instead just generate a new answer sheet to answer each time the user clicks the link!
&l=[language]
Where [language] should be replaced by the iso code of the language that the user should see the questionnaire in.E.g. 'l=dk-DK'.
&u=[username]
If you did not choose &n=1 or &n=2 then you can instead specify user's user name and passwords as tags to let the system find an existing answer sheet for the questionnaire belonging to that user. Replace the [username] tag with the applicable user name. It must be used in combination with the correct password tag shown below. Can also be used for an n=3 link to login during the creation.
&p=[password]
Replace the [password] tag with correct password for the user used in the [username] tag.


Detail for qasUser, loginUser, currentUser for each n type link:

Qnaire Impersonation already logged in link type User_getQasUser User_getLoggedInUser getCurrentUserResourceId
No No Direct Qas user or Empty Qas user or anonymous Qas user or anonymous
n=1 Empty anonymous (userRId: 4) anonymous (userRId: 4)
n=2 User C User C User C
n=3 Error: Don't work when NO logged in before
User B Direct Qas user or Empty Qas user or anonymous Qas user or anonymous
n=1 Empty anonymous (userRId: 4) anonymous (userRId: 4)
n=2 User C User C User C
n=3 User B User B User B
User A No Direct Qas user or Empty Qas user or anonymous User A
n=1 Empty anonymous (userRId: 4) User A
n=2 User C User C User A
n=3 Error: Don't work when NO logged in before
User B Direct Qas user or Empty Qas user or anonymous User A
n=1 Empty anonymous (userRId: 4) User A
n=2 User C User C User A
n=3 User B User B User A