Skip to content
Snippets Groups Projects
Commit 2481dc48 authored by yorickreum's avatar yorickreum
Browse files

redirect to deactived workflows table after disabling

parent d4cfedfe
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ class active_automatic_workflows_table extends workflow_table { ...@@ -103,7 +103,7 @@ class active_automatic_workflows_table extends workflow_table {
$output = ''; $output = '';
if( workflow_manager::is_disableable($row->id) ) { if( workflow_manager::is_disableable($row->id) ) {
$url = new \moodle_url('/admin/tool/lifecycle/workflowsettings.php', $url = new \moodle_url('/admin/tool/lifecycle/deactivatedworkflows.php',
array('workflowid' => $row->id, 'action' => ACTION_WORKFLOW_DISABLE, 'sesskey' => sesskey())); array('workflowid' => $row->id, 'action' => ACTION_WORKFLOW_DISABLE, 'sesskey' => sesskey()));
$output .= $output .=
'<div>' . $OUTPUT->single_button( '<div>' . $OUTPUT->single_button(
...@@ -111,7 +111,7 @@ class active_automatic_workflows_table extends workflow_table { ...@@ -111,7 +111,7 @@ class active_automatic_workflows_table extends workflow_table {
get_string('disableworkflow', 'tool_lifecycle')) get_string('disableworkflow', 'tool_lifecycle'))
. '</div>'; . '</div>';
$url = new \moodle_url('/admin/tool/lifecycle/workflowsettings.php', $url = new \moodle_url('/admin/tool/lifecycle/deactivatedworkflows.php',
array('workflowid' => $row->id, 'action' => ACTION_WORKFLOW_ABORTDISABLE, 'sesskey' => sesskey())); array('workflowid' => $row->id, 'action' => ACTION_WORKFLOW_ABORTDISABLE, 'sesskey' => sesskey()));
$output .= $output .=
'<div>' . $OUTPUT->single_button( '<div>' . $OUTPUT->single_button(
......
...@@ -34,13 +34,19 @@ require_capability('moodle/site:config', context_system::instance()); ...@@ -34,13 +34,19 @@ require_capability('moodle/site:config', context_system::instance());
$PAGE->set_url(new \moodle_url('/admin/tool/lifecycle/deactivatedworkflows.php')); $PAGE->set_url(new \moodle_url('/admin/tool/lifecycle/deactivatedworkflows.php'));
$table = new deactivated_workflows_table('tool_lifecycle_deactivated_workflows');
$PAGE->set_title(get_string('deactivated_workflows_list_header', 'tool_lifecycle')); $PAGE->set_title(get_string('deactivated_workflows_list_header', 'tool_lifecycle'));
$PAGE->set_heading(get_string('deactivated_workflows_list_header', 'tool_lifecycle')); $PAGE->set_heading(get_string('deactivated_workflows_list_header', 'tool_lifecycle'));
$workflowid = optional_param('workflowid', null, PARAM_INT);
$action = optional_param('action', null, PARAM_TEXT);
if ($workflowid && $action) {
\tool_lifecycle\manager\workflow_manager::handle_action($action, $workflowid);
}
$renderer = $PAGE->get_renderer('tool_lifecycle'); $renderer = $PAGE->get_renderer('tool_lifecycle');
$table = new deactivated_workflows_table('tool_lifecycle_deactivated_workflows');
echo $renderer->header(); echo $renderer->header();
$table->out(50, false); $table->out(50, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment