$response) { try { $var = $filler->fill($id, $response); // Do not take into account QTI Files at preview time. Simply delete the created file. if (taoQtiCommon_helpers_Utils::isQtiFile($var, false) === true) { $fileManager = new FileSystemFileManager(); $fileManager->delete($var->getValue()); } else { $variables[] = $var; } } catch (OutOfRangeException $e) { // Variable value could not be converted, ignore it. $this->logDebug( sprintf('Client-side value for variable "%s" is ignored due to data malformation.', $id) ); } catch (OutOfBoundsException $e) { $this->logDebug( sprintf('The variable with identifier "%s" is not declared in the item definition.', $id) ); } } return $variables; } }