From 97e0452344c1fe6511c7e37210bdf4cbce7db566 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Wed, 2 Sep 2020 12:09:27 +0200 Subject: [PATCH] MDL-69657 mod_h5pactivity: component passed always The $component = 'mod_h5pactivity' will be passed always to the H5P player because it's required for being able to call these activities from outside using embed code. The xAPI implementation checks whether the information should be tracked or not. Backport of MDL-69174 --- mod/h5pactivity/view.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mod/h5pactivity/view.php b/mod/h5pactivity/view.php index 9feac0046c8..d79308b6d00 100644 --- a/mod/h5pactivity/view.php +++ b/mod/h5pactivity/view.php @@ -88,14 +88,11 @@ if (isset($reviewurl)) { echo $OUTPUT->render($widget); } -if ($manager->is_tracking_enabled()) { - $trackcomponent = 'mod_h5pactivity'; -} else { - $trackcomponent = ''; +if (!$manager->is_tracking_enabled()) { $message = get_string('previewmode', 'mod_h5pactivity'); echo $OUTPUT->notification($message, \core\output\notification::NOTIFY_WARNING); } -echo player::display($fileurl, $config, true, $trackcomponent); +echo player::display($fileurl, $config, true, 'mod_h5pactivity'); echo $OUTPUT->footer();