Skip to content

Commit 966008d

Browse files
committed
Provide download action for deactivated workflows as well
1 parent 4e15c09 commit 966008d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

classes/local/table/active_workflows_table.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ public function col_tools($row) {
6060
$output .= $OUTPUT->action_icon($overviewurl, new \pix_icon($icon, $alt, 'moodle', ['title' => $alt]),
6161
null, ['title' => $alt]);
6262

63+
$action = action::WORKFLOW_BACKUP;
64+
$alt = get_string('downloadworkflow', 'tool_lifecycle');
65+
$icon = 't/backup';
66+
$output .= $this->format_icon_link($action, $row->id, $icon, $alt);
67+
6368
if (workflow_manager::is_disableable($row->id)) {
64-
$action = action::WORKFLOW_BACKUP;
65-
$alt = get_string('downloadworkflow', 'tool_lifecycle');
66-
$icon = 't/backup';
67-
$output .= $this->format_icon_link($action, $row->id, $icon, $alt);
6869

6970
$alt = get_string('disableworkflow', 'tool_lifecycle');
7071
$icon = 't/disable';

classes/local/table/deactivated_workflows_table.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ public function col_tools($row) {
106106
);
107107
}
108108

109+
$action = action::WORKFLOW_BACKUP;
110+
$alt = get_string('downloadworkflow', 'tool_lifecycle');
111+
$icon = 't/backup';
112+
$output .= $this->format_icon_link($action, $row->id, $icon, $alt);
113+
109114
// The check for is_deprecated is temporary to make deprecated sitecourse and coursedelayed trigger workflows removable.
110115
if (workflow_manager::is_removable($row->id) || workflow_manager::is_deprecated($row->id)) {
111116
$alt = get_string('deleteworkflow', 'tool_lifecycle');

0 commit comments

Comments
 (0)