Merge branch 'MDL-74042-master' of https://github.com/jleyva/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2022-03-04 12:19:22 +01:00
commit c111717ffb

View File

@ -40,6 +40,7 @@ $token = required_param('token', PARAM_ALPHANUM);
$video = required_param('video', PARAM_ALPHANUM); // Video ids are numeric, but it's more solid to expect things like 00001.
$width = optional_param('width', 0, PARAM_INT);
$height = optional_param('height', 0, PARAM_INT);
$h = optional_param('h', '', PARAM_ALPHANUM); // Security hash for restricted videos.
// Authenticate the user.
$webservicelib = new webservice();
@ -52,6 +53,10 @@ if (empty($width) && empty($height)) {
$display = "width=\"$width\" height=\"$height\"";
}
if (!empty($h)) {
$video .= '?h=' . $h;
}
$output = <<<OET
<html>
<head>