MDL-41580 SCORM: allow imsmanifest.xml to be used in file system repos

This commit is contained in:
Dan Marsden 2013-09-04 18:46:35 +12:00
parent 7f3836d15a
commit 361a47d409
11 changed files with 153 additions and 14 deletions

View file

@ -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;
}
}
/**