MDL-59487 task: Add run again button.

Co-authored-by: Brendan Heywood <[email protected]>
This commit is contained in:
Syed Nayab Bukhari
2019-11-24 16:58:30 +11:00
committed by Brendan Heywood
co-authored by Brendan Heywood
parent a5f618d6a9
commit 55d0cd969c
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -43,6 +43,7 @@ $string['pluginname'] = 'Scheduled task configuration';
$string['resettasktodefaults'] = 'Reset task schedule to defaults';
$string['resettasktodefaults_help'] = 'This will discard any local changes and revert the schedule for this task back to its original settings.';
$string['runnow'] = 'Run now';
$string['runagain'] = 'Run again';
$string['runnow_confirm'] = 'Are you sure you want to run this task \'{$a}\' now? The task will run on the web server and may take some time to complete.';
$string['runpattern'] = 'Run pattern';
$string['scheduledtasks'] = 'Scheduled tasks';
+5
View File
@@ -92,6 +92,11 @@ $CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
echo html_writer::end_tag('pre');
$output = $PAGE->get_renderer('tool_task');
// Re-run the specified task (this will output an error if it doesn't exist).
echo $OUTPUT->single_button(new moodle_url('/admin/tool/task/schedule_task.php',
array('task' => $taskname, 'confirm' => 1, 'sesskey' => sesskey())),
get_string('runagain', 'tool_task'));
echo $output->link_back();
echo $OUTPUT->footer();