mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-09 14:37:22 -04:00
a
This commit is contained in:
@@ -208,6 +208,7 @@ class text_filter extends \core_filters\text_filter {
|
||||
$launch_url = new moodle_url('/filter/mediacms/launch.php', [
|
||||
'token' => $token,
|
||||
'courseid' => isset($COURSE->id) ? (int)$COURSE->id : 0,
|
||||
'show_media_page' => 'true',
|
||||
]);
|
||||
|
||||
if (!self::$textlink_js_added) {
|
||||
|
||||
@@ -28,6 +28,7 @@ $showRelated = optional_param('showRelated', '', PARAM_TEXT);
|
||||
$showUserAvatar = optional_param('showUserAvatar', '', PARAM_TEXT);
|
||||
$linkTitle = optional_param('linkTitle', '', PARAM_TEXT);
|
||||
$startTime = optional_param('t', '', PARAM_TEXT);
|
||||
$show_media_page = optional_param('show_media_page', '', PARAM_TEXT);
|
||||
|
||||
// Get configuration
|
||||
$mediacmsurl = get_config('filter_mediacms', 'mediacmsurl');
|
||||
@@ -89,6 +90,9 @@ if ($linkTitle !== '') {
|
||||
if ($startTime !== '') {
|
||||
$custom_params[] = "embed_start_time=" . $startTime;
|
||||
}
|
||||
if ($show_media_page === 'true') {
|
||||
$custom_params[] = "show_media_page=true";
|
||||
}
|
||||
|
||||
$instance->instructorcustomparameters = implode("\n", $custom_params);
|
||||
$instance->name = 'MediaCMS Video: ' . $mediatoken;
|
||||
@@ -117,6 +121,9 @@ if ($linkTitle !== '') {
|
||||
if ($startTime !== '') {
|
||||
$page_params['t'] = $startTime;
|
||||
}
|
||||
if ($show_media_page === 'true') {
|
||||
$page_params['show_media_page'] = 'true';
|
||||
}
|
||||
|
||||
$PAGE->set_url(new moodle_url('/filter/mediacms/launch.php', $page_params));
|
||||
$PAGE->set_context($context);
|
||||
@@ -149,6 +156,9 @@ if ($linkTitle !== '') {
|
||||
if ($startTime !== '') {
|
||||
$hidden_fields .= '<input type="hidden" name="embed_start_time" value="' . htmlspecialchars($startTime, ENT_QUOTES) . '" />';
|
||||
}
|
||||
if ($show_media_page === 'true') {
|
||||
$hidden_fields .= '<input type="hidden" name="show_media_page" value="true" />';
|
||||
}
|
||||
if ($width) {
|
||||
$hidden_fields .= '<input type="hidden" name="embed_width" value="' . htmlspecialchars($width, ENT_QUOTES) . '" />';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user