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
This commit is contained in:
Sara Arjona
2020-09-08 13:08:44 -04:00
committed by Eric Merrill
parent 874bdf2035
commit 97e0452344
+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();