mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-81656' of https://github.com/paulholden/moodle
This commit is contained in:
commit
dc2f500573
@ -154,7 +154,7 @@ class player {
|
||||
* Get the encoded URL for embeding this H5P content.
|
||||
*
|
||||
* @param string $url Local URL of the H5P file to display.
|
||||
* @param stdClass $config Configuration for H5P buttons.
|
||||
* @param \stdClass $config Configuration for H5P buttons.
|
||||
* @param bool $preventredirect Set to true in scripts that can not redirect (CLI, RSS feeds, etc.), throws exceptions
|
||||
* @param string $component optional moodle component to sent xAPI tracking
|
||||
* @param bool $displayedit Whether the edit button should be displayed below the H5P content.
|
||||
@ -163,7 +163,8 @@ class player {
|
||||
* @return string The embedable code to display a H5P file.
|
||||
*/
|
||||
public static function display(
|
||||
string $url, \stdClass $config,
|
||||
string $url,
|
||||
\stdClass $config,
|
||||
bool $preventredirect = true,
|
||||
string $component = '',
|
||||
bool $displayedit = false,
|
||||
@ -193,7 +194,7 @@ class player {
|
||||
if ($originalfile) {
|
||||
// Check if the user can edit this content.
|
||||
if (api::can_edit_content($originalfile)) {
|
||||
$template->editurl = $CFG->wwwroot . '/h5p/edit.php?url=' . $url;
|
||||
$template->editurl = (new \moodle_url('/h5p/edit.php', ['url' => $url]))->out(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user