Skip to content

Commit

Permalink
MDL-70854 core: Fix error with stored progress bars in cron web ui.
Browse files Browse the repository at this point in the history
  • Loading branch information
cwarwicker committed May 10, 2024
1 parent 725a3f9 commit 593fa7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/classes/stored_progress_bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ protected function _update($percent, $msg): void {
protected function render_update(): void {
global $OUTPUT;

// If no output buffering, don't render it at all.
if (defined('NO_OUTPUT_BUFFERING') && NO_OUTPUT_BUFFERING) {
$this->auto_update(false);
}

// If we want the screen to auto update, render it.
if ($this->autoupdate) {
echo $OUTPUT->render_progress_bar_update(
$this->idnumber, sprintf("%.1f", $this->percent), $this->message, $this->get_estimate_message($this->percent)
Expand Down

0 comments on commit 593fa7b

Please sign in to comment.