Skip to content

Commit

Permalink
Allow progress check to run on cli
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Jan 30, 2024
1 parent b825476 commit cf0220e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion progress.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
*/
define('NO_OUTPUT_BUFFERING', true); // Progress bar is used here.

if (isset($argv)) {
define('CLI_SCRIPT', true);
}

// @codingStandardsIgnoreStart
require(__DIR__ . '/../../../config.php');
// @codingStandardsIgnoreEnd
Expand All @@ -35,7 +39,7 @@
$PAGE->set_cacheable(false);
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('progress', 'tool_heartbeat'));
echo get_string('progresshelp', 'tool_heartbeat');
echo $OUTPUT->paragraph(get_string('progresshelp', 'tool_heartbeat'));
$progressbar = new progress_bar();
$progressbar->create();
echo $OUTPUT->footer();
Expand Down

0 comments on commit cf0220e

Please sign in to comment.