if (!isset($time0)) {
$time0 = time();
registerVariable($time0); // Die Variable $time0 auch nach Ende des PHP-Codes aufbewahren
}
Ich habe diesen Teil des Codes des Timers nun mit ihren Angaben ersetzt und mir wird folgende Fehlermeldung angezeigt:
There is an error in the PHP code:
Questionnaire Error: The PHP variable $i has been used but the variable is yet undefined (the variable has no value).
PHP code
004 $time0 = [];
005 registerVariable('time0');
006 }
007 if (!isset($time0[$i])) {
008 $time0[$i] = time();
009 }
010 $timer = 60;
Questionnaire Error: The PHP variable $i has been used but the variable is yet undefined (the variable has no value).
PHP code
005 registerVariable('time0');
006 }
007 if (!isset($time0[$i])) {
008 $time0[$i] = time();
009 }
010 $timer = 60;
011 if (time() >= $time0[$i] + $timer) {
Questionnaire Error: The PHP variable $i has been used but the variable is yet undefined (the variable has no value).
PHP code
008 $time0[$i] = time();
009 }
010 $timer = 60;
011 if (time() >= $time0[$i] + $timer) {
012 return 'go:next';
013 }
014 $remain = $time0[$i] + $timer - time();
Questionnaire Error: The PHP variable $i has been used but the variable is yet undefined (the variable has no value).
PHP code
011 if (time() >= $time0[$i] + $timer) {
012 return 'go:next';
013 }
014 $remain = $time0[$i] + $timer - time();
015 replace('%remain%', $remain);
016 if (!isset($fragen)) {$fragen = array( 'KD01', 'KD02', 'KD06', 'KD07', 'KD10', 'KD11', 'KD12', 'KD13',); shuffle($fragen); registerVariable('fragen');}$i = loopPage(count($fragen));question($fragen[$i]);
017 return 'ok';