Skip to content

Commit

Permalink
in case the action column is empty display a string
Browse files Browse the repository at this point in the history
  • Loading branch information
NinaHerrmann committed Jun 11, 2024
1 parent bd2aca6 commit 225ad61
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions classes/local/table/interaction_attention_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public function col_tools($row) {
$step = step_manager::get_step_instance($row->stepinstanceid);

$tools = interaction_manager::get_action_tools($step->subpluginname, $row->processid);
if (empty($tools)) {
return get_string('noactiontools', 'tool_lifecycle');
}
foreach ($tools as $tool) {
$output .= $this->format_icon_link($tool['action'], $row->processid, $step->id, $tool['alt']);
}
Expand Down
4 changes: 3 additions & 1 deletion classes/local/table/interaction_remaining_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public function col_tools($row) {
if ($row->processid !== null) {
return '';
}

if (empty($this->availabletools)) {
return get_string('noactiontools', 'tool_lifecycle');
}
$actions = [];
foreach ($this->availabletools as $tool) {
if (has_capability($tool->capability, \context_course::instance($row->courseid), null, false)) {
Expand Down
2 changes: 2 additions & 0 deletions lang/de/tool_lifecycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
$string['manual_trigger_success'] = 'Workflow erfolgreich gestartet.';
$string['move_down'] = 'Nach unten bewegen';
$string['move_up'] = 'Nach oben bewegen';
$string['name_until_date'] = '"{$a->name}" bis {$a->date}';
$string['noactiontools'] = 'Keine Aktionen verfügbar';
$string['nocoursestodisplay'] = 'Es gibt derzeit keine Kurse, die Ihre Aufmerksamkeit erfordern!';
$string['nointeractioninterface'] = 'Keine Interaktionsschnittstelle verfügbar!';
$string['noprocesserrors'] = 'Es gibt keine fehlerhaften Prozesse, die behandelt werden müssen!';
Expand Down
1 change: 1 addition & 0 deletions lang/en/tool_lifecycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
$string['move_down'] = 'Move down';
$string['move_up'] = 'Move up';
$string['name_until_date'] = '"{$a->name}" until {$a->date}';
$string['noactiontools'] = 'No tools available';
$string['nocoursestodisplay'] = 'There are currently no courses which require your attention!';
$string['nointeractioninterface'] = 'No interaction interface available!';
$string['noprocesserrors'] = 'There are no process errors to handle!';
Expand Down

0 comments on commit 225ad61

Please sign in to comment.