MDL-28364 handle question formats that support multiple file types
This commit is contained in:
@@ -102,6 +102,20 @@ class qformat_default {
|
||||
public function export_file_extension() {
|
||||
return '.txt';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given file is capable of being imported by this plugin.
|
||||
*
|
||||
* Note that expensive or detailed integrity checks on the file should
|
||||
* not be performed by this method. Simple file type or magic-number tests
|
||||
* would be suitable.
|
||||
*
|
||||
* @param stored_file $file the file to check
|
||||
* @return bool whether this plugin can import the file
|
||||
*/
|
||||
public function can_import_file($file) {
|
||||
return ($file->get_mimetype() == $this->mime_type());
|
||||
}
|
||||
|
||||
// Accessor methods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user