Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in case the action column is empty display a string #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading