MDL-84072 output: correct progress bar component percentage parameter.
Avoid mixing float/string types, where the decimal separator could vary according to current locale (as per previous fix5a1aef5a, which was subsequently re-broken byb92886ad).
This commit is contained in:
@@ -181,7 +181,7 @@ class progress_bar implements renderable, templatable {
|
||||
$this->lastupdate = microtime(true);
|
||||
|
||||
if ($this->autoupdate) {
|
||||
echo $OUTPUT->render_progress_bar_update($this->idnumber, sprintf("%.1f", $this->percent), $msg, $estimatemsg);
|
||||
echo $OUTPUT->render_progress_bar_update($this->idnumber, $this->percent, $msg, $estimatemsg);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class progress_bar implements renderable, templatable {
|
||||
$this->message = $errormsg;
|
||||
|
||||
if ($this->autoupdate) {
|
||||
echo $OUTPUT->render_progress_bar_update($this->idnumber, sprintf("%.1f", $this->percent), $errormsg, '', true);
|
||||
echo $OUTPUT->render_progress_bar_update($this->idnumber, $this->percent, $errormsg, '', true);
|
||||
flush();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user