/** * Transform a QTI Datatype value to a value compliant * with result server. * * @param mixed $value * @return string */ private static function transformValue($value) { if (gettype($value) === 'object') { if ($value instanceof File) { return taoQtiCommon_helpers_Utils::qtiFileToString($value); } else { return $value->__toString(); } } else { return $value; } }