MDL-69174 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.
This commit is contained in:
Sara Arjona
2020-09-02 12:12:25 +02:00
parent 2874c6d5a1
commit 31d3fd27fc
+2 -5
View File
@@ -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();