diff --git a/lib/weblib.php b/lib/weblib.php index 601a477c9638b..03570f5462f32 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3162,7 +3162,7 @@ private function _update($percent, $msg, $es){ if ($es === null){ $es = "Infinity"; } - echo $PAGE->requires->js_function_call('update_progress_bar', Array($this->html_id, $w, $this->percent, $msg, $es))->asap(); + echo html_writer::script(js_writer::function_call('update_progress_bar', Array($this->html_id, $w, $this->percent, $msg, $es))); flush(); } /**