mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-79226 questions: check for UTF-8 encoding of the import file
This commit is contained in:
parent
748814dc61
commit
767e147dac
@ -61,6 +61,18 @@ class qformat_aiken extends qformat_default {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
public function readquestions($lines) {
|
||||
$questions = array();
|
||||
$question = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user