mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-41580 SCORM: allow imsmanifest.xml to be used in file system repos
This commit is contained in:
parent
7f3836d15a
commit
361a47d409
11 changed files with 153 additions and 14 deletions
|
@ -2866,6 +2866,31 @@ abstract class repository implements cacheable_object {
|
|||
$classname = $data['class'];
|
||||
return new $classname($data['id'], $data['ctxid'], $data['options'], $data['readonly']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a file relative to this file in the repository and sends it to the browser.
|
||||
* Used to allow relative file linking within a repository without creating file records
|
||||
* for linked files
|
||||
*
|
||||
* Repositories that overwrite this must be very careful - see filesystem repository for example.
|
||||
*
|
||||
* @param stored_file $mainfile The main file we are trying to access relative files for.
|
||||
* @param string $relativepath the relative path to the file we are trying to access.
|
||||
*
|
||||
*/
|
||||
public function send_relative_file(stored_file $mainfile, $relativepath) {
|
||||
// This repository hasn't implemented this so send_file_not_found.
|
||||
send_file_not_found();
|
||||
}
|
||||
|
||||
/**
|
||||
* helper function to check if the repository supports send_relative_file.
|
||||
*
|
||||
* @return true|false
|
||||
*/
|
||||
public function supports_relative_file() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue