mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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
|
@ -997,4 +997,19 @@ class stored_file {
|
|||
$this->repository->import_external_file_contents($this, $maxbytes);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a file relative to this file in the repository and sends it to the browser.
|
||||
* Checks the function repository::supports_relative_file() to make sure it can be used.
|
||||
*
|
||||
* @param string $relativepath the relative path to the file we are trying to access
|
||||
*/
|
||||
public function send_relative_file($relativepath) {
|
||||
if ($this->repository && $this->repository->supports_relative_file()) {
|
||||
$relativepath = clean_param($relativepath, PARAM_PATH);
|
||||
$this->repository->send_relative_file($this, $relativepath);
|
||||
} else {
|
||||
send_file_not_found();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue