Difference between revisions of "Questionnaire links"
(→Return values for CgScript functions) |
(→Return values for CgScript functions) |
||
Line 57: | Line 57: | ||
| rowspan="10" |No | | rowspan="10" |No | ||
| rowspan="5" |No | | rowspan="5" |No | ||
− | |Direct | + | |Case1: Direct |
|Qas user | |Qas user | ||
|Qas user | |Qas user | ||
Line 63: | Line 63: | ||
|Qas user | |Qas user | ||
|- | |- | ||
− | |Direct Anon Qas | + | |Case2: Direct Anon Qas |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 69: | Line 69: | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
|- | |- | ||
− | |n=1 | + | |Case3: n=1 |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 75: | Line 75: | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
|- | |- | ||
− | |n=2 | + | |Case4: n=2 |
|User C | |User C | ||
|User C | |User C | ||
Line 81: | Line 81: | ||
|User C | |User C | ||
|- | |- | ||
− | |n=3 | + | |Case5: n=3 |
| colspan="4" |Don't work when NO logged in before, will show login page | | colspan="4" |Don't work when NO logged in before, will show login page | ||
|- | |- | ||
| rowspan="5" |User B | | rowspan="5" |User B | ||
− | |Direct | + | |Case6: Direct |
|Qas user | |Qas user | ||
|Qas user | |Qas user | ||
Line 91: | Line 91: | ||
|Qas user | |Qas user | ||
|- | |- | ||
− | |Direct Anon Qas | + | |Case7: Direct Anon Qas |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 97: | Line 97: | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
|- | |- | ||
− | |n=1 | + | |Case8: n=1 |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 103: | Line 103: | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
|- | |- | ||
− | |n=2 | + | |Case9: n=2 |
|User C | |User C | ||
|User C | |User C | ||
Line 109: | Line 109: | ||
|User C | |User C | ||
|- | |- | ||
− | |n=3 | + | |Case10: n=3 |
|User B | |User B | ||
|User B | |User B | ||
Line 117: | Line 117: | ||
| rowspan="10" |User A | | rowspan="10" |User A | ||
| rowspan="5" |No | | rowspan="5" |No | ||
− | |Direct | + | |Case11: Direct |
|Qas user | |Qas user | ||
|Qas user | |Qas user | ||
Line 123: | Line 123: | ||
|User A | |User A | ||
|- | |- | ||
− | |Direct Anon Qas | + | |Case12: Direct Anon Qas |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 129: | Line 129: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=1 | + | |Case13: n=1 |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 135: | Line 135: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=2 | + | |Case14: n=2 |
|User C | |User C | ||
|User C | |User C | ||
Line 141: | Line 141: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=3 | + | |Case15: n=3 |
| colspan="4" |Don't work when NO logged in before, will show login page | | colspan="4" |Don't work when NO logged in before, will show login page | ||
|- | |- | ||
| rowspan="5" |User B | | rowspan="5" |User B | ||
− | |Direct | + | |Case16: Direct |
|Qas user | |Qas user | ||
|Qas user | |Qas user | ||
Line 151: | Line 151: | ||
|User A | |User A | ||
|- | |- | ||
− | |Direct Anon Qas | + | |Case17: Direct Anon Qas |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 157: | Line 157: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=1 | + | |Case18: n=1 |
|Empty | |Empty | ||
|anonymous (userRId: 4) | |anonymous (userRId: 4) | ||
Line 163: | Line 163: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=2 | + | |Case19: n=2 |
|User C | |User C | ||
|User C | |User C | ||
Line 169: | Line 169: | ||
|User A | |User A | ||
|- | |- | ||
− | |n=3 | + | |Case20: n=3 |
|User B | |User B | ||
|User B | |User B |
Latest revision as of 06:04, 12 December 2024
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.
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 |
&uac=1 |
Will open a page for typing accessCode and then will open existing answer sheet beloging to that access code. See more Code_protected_answer_sheets |
&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=da-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. |
Return values for CgScript functions
Qnaire Impersonation | already logged in | link type | User_getQasUser | User_getLoggedInUser | User getCallingLoggedInUser | getCurrentUserResourceId |
---|---|---|---|---|---|---|
No | No | Case1: Direct | Qas user | Qas user | Empty | Qas user |
Case2: Direct Anon Qas | Empty | anonymous (userRId: 4) | Empty | anonymous (userRId: 4) | ||
Case3: n=1 | Empty | anonymous (userRId: 4) | Empty | anonymous (userRId: 4) | ||
Case4: n=2 | User C | User C | Empty | User C | ||
Case5: n=3 | Don't work when NO logged in before, will show login page | |||||
User B | Case6: Direct | Qas user | Qas user | User B | Qas user | |
Case7: Direct Anon Qas | Empty | anonymous (userRId: 4) | User B | anonymous (userRId: 4) | ||
Case8: n=1 | Empty | anonymous (userRId: 4) | User B | anonymous (userRId: 4) | ||
Case9: n=2 | User C | User C | User B | User C | ||
Case10: n=3 | User B | User B | User B | User B | ||
User A | No | Case11: Direct | Qas user | Qas user | Empty | User A |
Case12: Direct Anon Qas | Empty | anonymous (userRId: 4) | Empty | User A | ||
Case13: n=1 | Empty | anonymous (userRId: 4) | Empty | User A | ||
Case14: n=2 | User C | User C | Empty | User A | ||
Case15: n=3 | Don't work when NO logged in before, will show login page | |||||
User B | Case16: Direct | Qas user | Qas user | User B | User A | |
Case17: Direct Anon Qas | Empty | anonymous (userRId: 4) | User B | User A | ||
Case18: n=1 | Empty | anonymous (userRId: 4) | User B | User A | ||
Case19: n=2 | User C | User C | User B | User A | ||
Case20: n=3 | User B | User B | User B | User A |