Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
en:create:functions:casetime [24.01.2015 14:59] – [caseTime()] alexander.ritter | en:create:functions:casetime [24.01.2015 15:01] – [Example 2] alexander.ritter |
---|
| |
| |
**Note:** If the questionnaire jumps to another page by using ''[[:en:create:functions:gotopage|goToPage()]]'', the time spent on the page shown first will be counted. Therefore, ig there is a filter on page "one" which forwards the participant directly to page "two", the time spent on page "one" will be saved nevertheless. | **Note:** If the questionnaire jumps to another page by using ''[[:en:create:functions:gotopage|goToPage()]]'', the time spent on the page shown first will be counted. Therefore, ig there is a filter on page "one" which forwards the participant directly to page "two", the time spent on page "one" will nevertheless be saved. |
| |
| |
===== Example 2 ===== | ===== Example 2 ===== |
| |
If the participant needs less than 15 seconds for the previous page, the following PHP code redisplays the page -- along with the text element "too_quick". | If the participant needed less than 15 seconds for the previous page, the following PHP code redisplays the page -- along with the text element "too_quick". |
| |
<code php> | <code php> |
<code php> | <code php> |
if (caseTime('hitherto') < 60) { | if (caseTime('hitherto') < 60) { |
text('please_check'); // information next | text('please_check'); // information message |
setNextPage('start'); // after "Next" to page "start" | setNextPage('start'); // after "Next" go to page "start" |
pageStop(); // do not display any further content on the page | pageStop(); // do not display any further content on the page |
} | } |
</code> | </code> |