MDL-69078 questions: check for UTF-8 encoding of the import file
Signed-off-by: Daniel Ziegenberg <[email protected]>
This commit is contained in:
@@ -58,6 +58,18 @@ class qformat_xml extends qformat_default {
|
||||
return 'application/xml';
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the given file.
|
||||
*
|
||||
* For more expensive or detailed integrity checks.
|
||||
*
|
||||
* @param stored_file $file the file to check
|
||||
* @return string the error message that occurred while validating the given file
|
||||
*/
|
||||
public function validate_file(stored_file $file): string {
|
||||
return $this->validate_is_utf8_file($file);
|
||||
}
|
||||
|
||||
// IMPORT FUNCTIONS START HERE.
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user