Skip to content

Commit 536cb74

Browse files
committed
shorter tab texts and introduce tab titles
1 parent 4839b52 commit 536cb74

13 files changed

+103
-39
lines changed

classes/tabs.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,49 +112,50 @@ public static function get_tabrow($activelink = false, $deactivatelink = false,
112112
// General Settings and Subplugins.
113113
$targeturl = new \moodle_url('/admin/category.php', ['category' => 'lifecycle']);
114114
$tabrow[] = new \tabobject('settings', $targeturl,
115-
get_string('general_config_header', 'tool_lifecycle'));
115+
get_string('general_config_header', 'tool_lifecycle'),
116+
get_string('general_config_header_title', 'tool_lifecycle'));
116117

117118
// Tab to the draft workflows page.
118119
$targeturl = new \moodle_url('/admin/tool/lifecycle/workflowdrafts.php', ['id' => 'workflowdrafts']);
119120
$tabrow[] = new \tabobject('workflowdrafts', $targeturl,
120121
get_string('workflow_drafts_header', 'tool_lifecycle').$drafts,
121-
get_string('workflow_drafts_header', 'tool_lifecycle'), $draftlink);
122+
get_string('workflow_drafts_header_title', 'tool_lifecycle'), $draftlink);
122123

123124
// Tab to the active workflows page.
124125
$targeturl = new \moodle_url('/admin/tool/lifecycle/activeworkflows.php', ['id' => 'activeworkflows']);
125126
$tabrow[] = new \tabobject('activeworkflows', $targeturl,
126127
get_string('active_workflows_header', 'tool_lifecycle').$activewf,
127-
get_string('active_workflows_header', 'tool_lifecycle'), $activelink);
128+
get_string('active_workflows_header_title', 'tool_lifecycle'), $activelink);
128129

129130
// Tab to the deactivated workflows page.
130131
$targeturl = new \moodle_url('/admin/tool/lifecycle/deactivatedworkflows.php', ['id' => 'deactivatedworkflows']);
131132
$tabrow[] = new \tabobject('deactivatedworkflows', $targeturl,
132133
get_string('deactivated_workflows_header', 'tool_lifecycle').$deactivatedewf,
133-
get_string('deactivated_workflows_header', 'tool_lifecycle'), $deactivatelink);
134+
get_string('deactivated_workflows_header_title', 'tool_lifecycle'), $deactivatelink);
134135

135136
// Tab to the delayed courses list page.
136137
$targeturl = new \moodle_url('/admin/tool/lifecycle/delayedcourses.php', ['id' => 'delayedcourses']);
137138
$tabrow[] = new \tabobject('delayedcourses', $targeturl,
138139
get_string('delayed_courses_header', 'tool_lifecycle').$delayedcourses,
139-
get_string('delayed_courses_header', 'tool_lifecycle'));
140+
get_string('delayed_courses_header_title', 'tool_lifecycle'));
140141

141142
// Tab to the admin approval list page.
142143
$targeturl = new \moodle_url('/admin/tool/lifecycle/step/adminapprove/index.php', ['id' => 'adminapprove']);
143144
$tabrow[] = new \tabobject('adminapprove', $targeturl,
144-
get_string('adminapprovals', 'lifecyclestep_adminapprove').$adminapprovals,
145-
get_string('adminapprovals', 'lifecyclestep_adminapprove'));
145+
get_string('adminapprovals_header', 'tool_lifecycle').$adminapprovals,
146+
get_string('adminapprovals_header_title', 'tool_lifecycle'));
146147

147148
// Tab to the course backups list page.
148149
$targeturl = new \moodle_url('/admin/tool/lifecycle/coursebackups.php', ['id' => 'coursebackups']);
149150
$tabrow[] = new \tabobject('coursebackups', $targeturl,
150151
get_string('course_backups_list_header', 'tool_lifecycle').$coursebackups,
151-
get_string('course_backups_list_header', 'tool_lifecycle'));
152+
get_string('course_backups_list_header_title', 'tool_lifecycle'));
152153

153154
// Tab to the lifecycle errors page.
154155
$targeturl = new \moodle_url('/admin/tool/lifecycle/errors.php', ['id' => 'errors']);
155156
$tabrow[] = new \tabobject('errors', $targeturl,
156157
get_string('process_errors_header', 'tool_lifecycle').$lcerrors,
157-
get_string('process_errors_header', 'tool_lifecycle'));
158+
get_string('process_errors_header_title', 'tool_lifecycle'));
158159

159160
return $tabrow;
160161

lang/de/tool_lifecycle.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@
3232
$string['active_manual_workflows_heading'] = 'Aktive manuelle Workflows';
3333
$string['active_workflow_not_changeable'] = 'Die Workflow-Instanz wurde bereits aktiviert. Je nach Schritt-Typ können dessen Einstellungen eventuell noch geändert werden. Änderungen an Trigger-Instanzen wirken sich nicht auf bereits getriggerte Kurse aus.';
3434
$string['active_workflow_not_removeable'] = 'Die Workflow-Instanz ist aktiv. Es ist nicht möglich, sie zu entfernen.';
35-
$string['active_workflows_header'] = 'Aktive Workflows';
35+
$string['active_workflows_header'] = 'Aktive';
36+
$string['active_workflows_header_title'] = 'Liste der derzeit aktiven Workflows';
3637
$string['active_workflows_list'] = 'Zeige aktive Workflows';
3738
$string['add_new_step_instance'] = 'Füge neue Schritt-Instanz hinzu...';
3839
$string['add_new_trigger_instance'] = 'Füge neue Trigger-Instanz...';
3940
$string['add_workflow'] = 'Neuen Workflow hinzufügen';
41+
$string['adminapprovals_header'] = 'Sysadmin';
42+
$string['adminapprovals_header_title'] = 'Liste der offenen Sysadmin-Bestätigungen';
4043
$string['adminsettings_edit_step_instance_heading'] = 'Schritt-Instanz für Workflow \'{$a}\'';
4144
$string['adminsettings_edit_trigger_instance_heading'] = 'Trigger-Instanz für Workflow \'{$a}\'';
4245
$string['adminsettings_edit_workflow_definition_heading'] = 'Workflowdefinition';
@@ -69,7 +72,8 @@
6972
$string['config_showcoursecounts_desc'] = 'Die Workflow-Konfigurationsseite zeigt normalerweise die Anzahl an Kursen, die durch
7073
die konfigurierten Trigger getriggert werden, was Performance-Probleme verursachen kann. Bei Performance-Problemen kann dies hiermit
7174
deaktiviert werden';
72-
$string['course_backups_list_header'] = 'Kurssicherungen';
75+
$string['course_backups_list_header'] = 'Sicherungen';
76+
$string['course_backups_list_header_title'] = 'Liste der lifecycle-Kurssicherungen';
7377
$string['courseid'] = 'Kurs-ID';
7478
$string['coursename'] = 'Kursname';
7579
$string['courses_are_delayed'] = '{$a} Kurse sind verzögert';
@@ -93,10 +97,12 @@
9397
$string['create_workflow_from_existing'] = 'Kopie von bestehendem Workflow erstellen';
9498
$string['date'] = 'Fällligkeitsdatum';
9599
$string['deactivated'] = 'Deaktiviert';
96-
$string['deactivated_workflows_header'] = 'Deaktivierte Workflows';
100+
$string['deactivated_workflows_header'] = 'Inaktive';
101+
$string['deactivated_workflows_header_title'] = 'Liste der deaktivierten Workflows';
97102
$string['deactivated_workflows_list'] = 'Zeige deaktivierte Workflows';
98103
$string['deactivated_workflows_list_header'] = 'Deaktivierte Workflows';
99-
$string['delayed_courses_header'] = 'Verzögerte Kurse';
104+
$string['delayed_courses_header'] = 'Verzögerungen';
105+
$string['delayed_courses_header_title'] = 'Liste von allen verzögerten Kursen';
100106
$string['delayed_for_workflow_until'] = 'Verzögert für "{$a->name}" bis {$a->date}';
101107
$string['delayed_for_workflows'] = 'Verzögert für {$a} Workflows';
102108
$string['delayed_globally'] = 'Global verzögert bis {$a}';
@@ -134,7 +140,8 @@
134140
$string['followedby_none'] = 'Keine';
135141
$string['force_import'] = 'Die Fehler ignorieren und den Workflow trotzdem importieren. Das kann zu unerwünschten Effekten führen.';
136142
$string['forselected'] = 'Für alle ausgewählten Prozesse';
137-
$string['general_config_header'] = 'Allgemein & Subplugins';
143+
$string['general_config_header'] = 'Allgemein';
144+
$string['general_config_header_title'] = "Allgemeine Einstellungen & Subplugins";
138145
$string['general_settings_header'] = 'Allgemeine Einstellungen';
139146
$string['globally'] = 'Globale Verzögerungen';
140147
$string['globally_until_date'] = 'Global bis {$a}';
@@ -188,7 +195,8 @@
188195
$string['privacy:metadata:tool_lifecycle_action_log:userid'] = 'ID der/des Benutzer:in, der/die die Aktion angestoßen hat.';
189196
$string['privacy:metadata:tool_lifecycle_action_log:workflowid'] = 'ID des Worflows innerhalb dessen die Aktion durchgeführt wurde.';
190197
$string['proceed'] = 'Fortfahren';
191-
$string['process_errors_header'] = 'Fehlermanagement';
198+
$string['process_errors_header'] = 'Fehler';
199+
$string['process_errors_header_title'] = 'Liste der Bearbeitungsfehler';
192200
$string['process_proceeded_event'] = 'Ein Prozess wurde fortgeführt';
193201
$string['process_rollback_event'] = 'Ein Prozess wurde zurückgesetzt';
194202
$string['process_triggered_event'] = 'Ein Prozess wurde ausgelöst';
@@ -252,7 +260,8 @@
252260
von allen Workflows ausgeschlossen. Das heißt, bis die Zeit abgelaufen ist, kann kein Prozess für den Kurs gestartet werden.';
253261
$string['workflow_displaytitle'] = 'Angezeigter Titel des Workflows';
254262
$string['workflow_displaytitle_help'] = 'Dieser Titel wird Nutzern beim Verwalten ihrer Kurse angezeigt.';
255-
$string['workflow_drafts_header'] = 'Workflow-Entwürfe';
263+
$string['workflow_drafts_header'] = 'Entwürfe';
264+
$string['workflow_drafts_header_title'] = 'Liste von Workflow-Entwürfen';
256265
$string['workflow_drafts_list'] = 'Zeige Workflow-Entwürfe';
257266
$string['workflow_duplicate_title'] = '{$a} (Kopie)';
258267
$string['workflow_finishdelay'] = 'Kursauschluss bei Beendigung';

lang/en/tool_lifecycle.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@
3232
$string['active_manual_workflows_heading'] = 'Active manual workflows';
3333
$string['active_workflow_not_changeable'] = 'The workflow instance was already activated. Depending on the step type, some of its settings might be still editable. Changes to triggers will not affect already triggered courses.';
3434
$string['active_workflow_not_removeable'] = 'The workflow instance is active. It is not possible to remove it.';
35-
$string['active_workflows_header'] = 'Active workflows';
35+
$string['active_workflows_header'] = 'Active';
36+
$string['active_workflows_header_title'] = 'Active workflows';
3637
$string['active_workflows_list'] = 'List active workflows';
3738
$string['add_new_step_instance'] = 'Add new step instance...';
3839
$string['add_new_trigger_instance'] = 'Add new trigger instance...';
3940
$string['add_workflow'] = 'Create new workflow';
41+
$string['adminapprovals_header'] = 'Approvals';
42+
$string['adminapprovals_header_title'] = 'List of pending administrator approvals';
4043
$string['adminsettings_edit_step_instance_heading'] = 'Step instance for workflow \'{$a}\'';
4144
$string['adminsettings_edit_trigger_instance_heading'] = 'Trigger for workflow \'{$a}\'';
4245
$string['adminsettings_edit_workflow_definition_heading'] = 'Workflow definition';
@@ -69,7 +72,8 @@
6972
$string['config_showcoursecounts_desc'] = 'The workflow overview page by default shows the amount of courses which will be
7073
triggered by the configured triggers which can be load heavy. Disable this option if you experience issues loading the workflow
7174
overview.';
72-
$string['course_backups_list_header'] = 'Course backups';
75+
$string['course_backups_list_header'] = 'Backups';
76+
$string['course_backups_list_header_title'] = 'List of lifecycle course backups';
7377
$string['courseid'] = 'Course ID';
7478
$string['coursename'] = 'Course name';
7579
$string['courses_are_delayed'] = '{$a} delayed courses';
@@ -93,10 +97,12 @@
9397
$string['create_workflow_from_existing'] = 'Copy new workflow from existing';
9498
$string['date'] = 'Due date';
9599
$string['deactivated'] = 'Deactivated';
96-
$string['deactivated_workflows_header'] = 'Deactivated workflows';
100+
$string['deactivated_workflows_header'] = 'Deactivated';
101+
$string['deactivated_workflows_header_title'] = 'List of deactivated workflows';
97102
$string['deactivated_workflows_list'] = 'List deactivated workflows';
98103
$string['deactivated_workflows_list_header'] = 'Deactivated workflows';
99-
$string['delayed_courses_header'] = 'Delayed courses';
104+
$string['delayed_courses_header'] = 'Delayed';
105+
$string['delayed_courses_header_title'] = 'List of all delayed courses';
100106
$string['delayed_for_workflow_until'] = 'Delayed for "{$a->name}" until {$a->date}';
101107
$string['delayed_for_workflows'] = 'Delayed for {$a} workflows';
102108
$string['delayed_globally'] = 'Delayed globally until {$a}';
@@ -133,7 +139,8 @@
133139
$string['followedby_none'] = 'None';
134140
$string['force_import'] = 'Try ignoring errors and import the workflow anyway. Use this at your own risk!';
135141
$string['forselected'] = 'For all selected processes';
136-
$string['general_config_header'] = "General & Subplugins";
142+
$string['general_config_header'] = "General";
143+
$string['general_config_header_title'] = "General settings & subplugins";
137144
$string['general_settings_header'] = 'General settings';
138145
$string['globally'] = 'Global delays';
139146
$string['globally_until_date'] = 'Globally until {$a}';
@@ -188,7 +195,8 @@
188195
$string['privacy:metadata:tool_lifecycle_action_log:userid'] = 'ID of the user that did the action.';
189196
$string['privacy:metadata:tool_lifecycle_action_log:workflowid'] = 'ID of the Workflow the action was done in.';
190197
$string['proceed'] = 'Proceed';
191-
$string['process_errors_header'] = 'Error handling';
198+
$string['process_errors_header'] = 'Errors';
199+
$string['process_errors_header_title'] = 'List of process errors';
192200
$string['process_proceeded_event'] = 'A process has been proceeded';
193201
$string['process_rollback_event'] = 'A process has been rolled back';
194202
$string['process_triggered_event'] = 'A process has been triggered';
@@ -253,7 +261,8 @@
253261
for the respective course.';
254262
$string['workflow_displaytitle'] = 'Displayed workflow title';
255263
$string['workflow_displaytitle_help'] = 'This title is displayed to users when managing their courses.';
256-
$string['workflow_drafts_header'] = 'Workflow drafts';
264+
$string['workflow_drafts_header'] = 'Drafts';
265+
$string['workflow_drafts_header_title'] = 'List of workflow drafts';
257266
$string['workflow_drafts_list'] = 'List workflow drafts';
258267
$string['workflow_duplicate_title'] = '{$a} (Copy)';
259268
$string['workflow_finishdelay'] = 'Delay in case of finished course';

step/adminapprove/tests/admin_approve_test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ public function test_admin_mail(): void {
7777
$this->assertCount(1, $sink->get_messages());
7878
$sink->close();
7979
}
80+
8081
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
// This file is part of Moodle - http://moodle.org/
3+
//
4+
// Moodle is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// (at your option) any later version.
8+
//
9+
// Moodle is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
// GNU General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU General Public License
15+
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16+
17+
/**
18+
* Step definition for life cycle step adminapprove.
19+
*
20+
* @package lifecyclestep_adminapprove
21+
* @category test
22+
* @copyright 2025 Thomas Niedermaier University Münster
23+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24+
*/
25+
26+
require_once(__DIR__ . '/../../../../../../../lib/behat/behat_base.php');
27+
28+
/**
29+
* Step definition for life cycle.
30+
*
31+
* @package lifecyclestep_adminapprove
32+
* @category test
33+
* @copyright 2025 Thomas Niedermaier University Münster
34+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
35+
*/
36+
class behat_lifecyclestep_adminapprove extends behat_base {
37+
/**
38+
* Opens Admin Approvals page.
39+
*
40+
* @Given /^I am on adminapprove page$/
41+
*/
42+
public function i_am_on_adminapprove_page() {
43+
$this->getSession()->visit($this->locate_path('/admin/tool/lifecycle/step/adminapprove/index.php'));
44+
}
45+
}

step/adminapprove/tests/behat/proceedtest.feature

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: Add a workflow with an adminapprove step and test it
1010
| Course 4 | C4 |
1111
And I log in as "admin"
1212
And I navigate to "Plugins > Admin tools > Life Cycle" in site administration
13-
And I click on "Workflow drafts" "link"
13+
And I am on workflowdrafts page
1414
And I click on "Create new workflow" "link"
1515
And I set the following fields to these values:
1616
| Title | Admin Approve Step WF #1 |
@@ -30,12 +30,11 @@ Feature: Add a workflow with an adminapprove step and test it
3030
And I select "Delete course step" from the "tool_lifecycle-choose-step" singleselect
3131
And I set the field "Instance name" to "Delete Course #1"
3232
And I press "Save changes"
33-
And I click on "Workflow drafts" "link"
33+
And I am on workflowdrafts page
3434
And I press "Activate"
3535

3636
Scenario: Test interaction of admin approve step
37-
When I navigate to "Plugins > Admin tools > Life Cycle" in site administration
38-
And I click on "Admin Approvals" "link"
37+
When I am on adminapprove page
3938
Then I should see "There are currently no courses waiting for interaction in any Admin Approve step."
4039
When I run the scheduled task "tool_lifecycle\task\lifecycle_task"
4140
And I reload the page

step/adminapprove/tests/behat/teacherview.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Add a workflow with an adminapprove step and test the status in the tea
1313
| teacher | C1 | editingteacher |
1414
And I log in as "admin"
1515
And I navigate to "Plugins > Admin tools > Life Cycle" in site administration
16-
And I click on "Workflow drafts" "link"
16+
And I am on workflowdrafts page
1717
And I click on "Create new workflow" "link"
1818
And I set the following fields to these values:
1919
| Title | Admin Approve Step WF #1 |
@@ -30,7 +30,7 @@ Feature: Add a workflow with an adminapprove step and test the status in the tea
3030
| Instance name | Admin Approve Step #1 |
3131
| Status message | My status |
3232
And I press "Save changes"
33-
And I click on "Workflow drafts" "link"
33+
And I am on workflowdrafts page
3434
And I press "Activate"
3535
And I run the scheduled task "tool_lifecycle\task\lifecycle_task"
3636
And I log out

tests/behat/activate_workflow.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Feature: Add a workflow definition activate it
3636
And I select "Delete course step" from the "tool_lifecycle-choose-step" singleselect
3737
And I set the field "Instance name" to "Delete Course 2"
3838
And I press "Save changes"
39-
And I click on "Workflow drafts" "link"
39+
And I am on workflowdrafts page
4040
Then I should see the tool "View workflow steps" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table
4141
And I should see the tool "Backup workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table
4242
And I should see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table

tests/behat/add_workflow.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Feature: Add a workflow definition
2626
| Capability | moodle/course:manageactivities |
2727
And I press "Save changes"
2828
Then I should see "manual"
29-
When I click on "Workflow drafts" "link"
29+
And I am on workflowdrafts page
3030
Then I should see "My Workflow"
3131

3232
Scenario: Add a new workflow definition with steps

tests/behat/disable_workflow.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Feature: Disable a workflow
3131
And I select "Delete course step" from the "tool_lifecycle-choose-step" singleselect
3232
And I set the field "Instance name" to "Delete Course 1"
3333
And I press "Save changes"
34-
And I click on "Workflow drafts" "link"
34+
And I am on workflowdrafts page
3535
And I press "Activate"
3636
When I wait "10" seconds
3737
And I run the scheduled task "tool_lifecycle\task\lifecycle_task"
@@ -71,14 +71,14 @@ Feature: Disable a workflow
7171
And I am on activeworkflows page
7272
Then I should see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table
7373
And I click on the tool "Disable workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table
74-
When I click on "Workflow drafts" "link"
74+
And I am on workflowdrafts page
7575
And I click on "Copy new workflow from existing" "link"
7676
And I click on the tool "Create copy" in the "My Workflow" row of the "tool_lifecycle-select-workflow" table
7777
And I press "Save changes"
78-
And I click on "Workflow drafts" "link"
78+
And I am on workflowdrafts page
7979
Then I should see the row "My Workflow" in the "tool_lifecycle_workflow_definitions" table
8080
When I press "Activate"
8181
# Since no element is left, the table is not displayed anymore.
8282
Then I should see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table
83-
And I click on "Workflow drafts" "link"
83+
When I am on workflowdrafts page
8484
Then I should not see the table "tool_lifecycle_workflow_definitions"

0 commit comments

Comments
 (0)