mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-71921 scorm: Sanitize element names before outputting track details
This commit is contained in:
parent
aebd3576a6
commit
2ccd1e773c
@ -499,7 +499,7 @@ function scorm_user_complete($course, $user, $mod, $scorm) {
|
||||
$report .= html_writer::start_tag('li').html_writer::start_tag('ul', array('class' => $liststyle));
|
||||
foreach ($usertrack as $element => $value) {
|
||||
if (substr($element, 0, 3) == 'cmi') {
|
||||
$report .= html_writer::tag('li', $element.' => '.s($value));
|
||||
$report .= html_writer::tag('li', s($element) . ' => ' . s($value));
|
||||
}
|
||||
}
|
||||
$report .= html_writer::end_tag('ul').html_writer::end_tag('li');
|
||||
|
@ -152,9 +152,9 @@ foreach ($trackdata as $element => $value) {
|
||||
}
|
||||
|
||||
if (empty($string) || $table->is_downloading()) {
|
||||
$row[] = $element;
|
||||
$row[] = s($element);
|
||||
} else {
|
||||
$row[] = $element.$OUTPUT->help_icon($string, 'scorm');
|
||||
$row[] = s($element) . $OUTPUT->help_icon($string, 'scorm');
|
||||
}
|
||||
if (strpos($element, '_time') === false) {
|
||||
$row[] = s($value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user