MDL-80768 output: stricter progress bar component percentage type.
Avoid mixing float/string types, where the decimal separator could vary according to current locale.
This commit is contained in:
@@ -5140,7 +5140,12 @@ EOD;
|
||||
* @return string ascii fragment
|
||||
*/
|
||||
public function render_progress_bar_update(string $id, float $percent, string $msg, string $estimate) : string {
|
||||
return html_writer::script(js_writer::function_call('updateProgressBar', [$id, $percent, $msg, $estimate]));
|
||||
return html_writer::script(js_writer::function_call('updateProgressBar', [
|
||||
$id,
|
||||
round($percent, 1),
|
||||
$msg,
|
||||
$estimate,
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user