====== setStatus() ====== The function ''setStatus()'' sets the interview status and triggers a panel redirect, if a "Panel Redirects" element was included in the questionnaire or if a suitable redirect was specified by means of ''%%option('redirect.*', ...)%%''. By default, calling ''setStatus()'' with ''%%'quota full'%%'', ''%%'screenout'%%'', or ''%%'quality fail'%%'' stops the execution of the current PHP code. ''void **setStatus**(string //statusCode//, [bool //continue//])'' The parameter //statusCode// must be passed as a string with one of the following values. * //statusCode// * ''%%'complete'%%'' -- The case is considered complete (redirect complete). * ''%%'quality fail'%%'' -- The record was identified as invalid (redirect quality fail). * ''%%'quota count'%%'' -- The case is considered complete (counted for the quota) but there is no redirect (yet). * ''%%'quota full'%%'' -- The quota group is already full, the respondent is rejected (redirect quota full). * ''%%'screenout'%%'' -- The person does not meet the participation requirements (redirect screenout). * ''%%'speeder'%%'' -- The interview was completed faster than plausible (redirect speeder). * //continue// -- If ''true'' is specified here, the call with ''%%'quality fail'%%'', ''%%'quota full'%%'', ''%%'screenout'%%'', or ''%%'speeder'%%'' does __not__ stop the execution of the current PHP code. The interview status is available in the dataset as variable STATUS. If multiple statuses were stored for the interview, the first one in the following order is returned. * quality fail * speeder * screenout * quota full * complete * quota count ==== Quality Fail for Fast Completion ==== The following example code for the last questionnaire page marks the questionnaire as "quality fail" if the respondent took less than 300 seconds (5 minutes) to complete it. Otherwise, the case is counted as "complete". if(caseTime('hitherto') < 300) { setStatus('quality fail'); } setStatus('complete');