| Línea 39... |
Línea 39... |
| 39 |
$preview = optional_param('preview', null, PARAM_ALPHANUM);
|
39 |
$preview = optional_param('preview', null, PARAM_ALPHANUM);
|
| 40 |
// Offline means download the file from the repository and serve it, even if it was an external link.
|
40 |
// Offline means download the file from the repository and serve it, even if it was an external link.
|
| 41 |
// The repository may have to export the file to an offline format.
|
41 |
// The repository may have to export the file to an offline format.
|
| 42 |
$offline = optional_param('offline', 0, PARAM_BOOL);
|
42 |
$offline = optional_param('offline', 0, PARAM_BOOL);
|
| 43 |
$embed = optional_param('embed', 0, PARAM_BOOL);
|
43 |
$embed = optional_param('embed', 0, PARAM_BOOL);
|
| - |
|
44 |
|
| - |
|
45 |
// We need to set the page URL here because there are cases where file_pluginfile may display an
|
| - |
|
46 |
// error directly on the page instead of throwing an exception, and this will generate a server
|
| - |
|
47 |
// error if $PAGE->url is not defined.
|
| - |
|
48 |
$PAGE->set_url(new \moodle_url($FULLME));
|
| - |
|
49 |
|
| 44 |
file_pluginfile($relativepath, $forcedownload, $preview, $offline, $embed);
|
50 |
file_pluginfile($relativepath, $forcedownload, $preview, $offline, $embed);
|