function qformat_qti2::file_full_path in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format/qti2/format.php \qformat_qti2::file_full_path()
File
- includes/
moodle/ question/ format/ qti2/ format.php, line 915
Class
Code
function file_full_path($file, $courseid) {
global $CFG;
if (substr(strtolower($file), 0, 7) == 'http://') {
$url = $file;
}
else {
if ($CFG->slasharguments) {
// Use this method if possible for better caching
$url = "{$CFG->wwwroot}/file.php/{$courseid}/{$file}";
}
else {
$url = "{$CFG->wwwroot}/file.php?file=/{$courseid}/{$file}";
}
}
return $url;
}