Closing data collection at a particular date or time

Problem

You want to forbid access to a questionnaire past a certain date or time.

Solution

Use the "Deny access if" pound instruction as in:

    # Deny access if = {$contexte{date}>=20060612}

Discussion

The "Deny access if" pound instruction contains a logical condition which denies access to the questionnaire if it is true. This condition is tested every time callweb.cgi receives a request. In the example above, access is denied if the current date is June 12, 2006 or later. Other $contexte information can also be used to control access.

In the example above, the logical expression must use Perl syntax in order to make use of the $contexte data — hence the use of the braces around the condition.

The "Deny access if" pound instruction is the strongest barrier to entry since it is tested with every call to callweb.cgi. Alternative methods (using questionnaire logic) can only be implemented at specific places in the script.

This instruction displays system message 28 which is fully customizable, like any other system message.

Closing data collection at a particular date or time

Problem

You want to forbid access to a questionnaire past a certain date or time.

Solution

Use the "Deny access if" pound instruction as in:

    # Deny access if = {$contexte{date}>=20060612}

Discussion

The "Deny access if" pound instruction contains a logical condition which denies access to the questionnaire if it is true. This condition is tested every time callweb.cgi receives a request. In the example above, access is denied if the current date is June 12, 2006 or later. Other $contexte information can also be used to control access.

In the example above, the logical expression must use Perl syntax in order to make use of the $contexte data — hence the use of the braces around the condition.

The "Deny access if" pound instruction is the strongest barrier to entry since it is tested with every call to callweb.cgi. Alternative methods (using questionnaire logic) can only be implemented at specific places in the script.

This instruction displays system message 28 which is fully customizable, like any other system message.