diff --git a/lang/en/tool_lifecycle.php b/lang/en/tool_lifecycle.php index 123f744343e4cee9f3e160ed37812083006e45c4..2254025d0ce92b388c7d2149d515c32f2cc477e0 100644 --- a/lang/en/tool_lifecycle.php +++ b/lang/en/tool_lifecycle.php @@ -29,25 +29,25 @@ $string['plugintitle'] = 'Course Life Cycle'; $string['lifecycle:managecourses'] = 'May manage courses in tool_lifecycle'; $string['managecourses_link'] = 'Manage courses'; -$string['general_config_header'] = "General & Subplugins"; +$string['general_config_header'] = "General & subplugins"; $string['config_delay_duration'] = 'Default duration of a course delay'; $string['config_delay_duration_desc'] = 'This setting defines the default delay duration of a workflow in case one of its processes is rolled back or finishes. The delay duration determines how long a course will be excepted from being processed again in either of the cases.'; -$string['active_processes_list_header'] = 'Active Processes'; -$string['adminsettings_heading'] = 'Workflow Settings'; -$string['active_manual_workflows_heading'] = 'Active Manual Workflows'; -$string['active_automatic_workflows_heading'] = 'Active Automatic Workflows'; -$string['workflow_definition_heading'] = 'Workflow Definitions'; -$string['adminsettings_edit_workflow_definition_heading'] = 'Workflow Definition'; -$string['adminsettings_workflow_definition_steps_heading'] = 'Workflow Steps'; +$string['active_processes_list_header'] = 'Active processes'; +$string['adminsettings_heading'] = 'Workflow settings'; +$string['active_manual_workflows_heading'] = 'Active manual workflows'; +$string['active_automatic_workflows_heading'] = 'Active automatic workflows'; +$string['workflow_definition_heading'] = 'Workflow definitions'; +$string['adminsettings_edit_workflow_definition_heading'] = 'Workflow definition'; +$string['adminsettings_workflow_definition_steps_heading'] = 'Workflow steps'; $string['adminsettings_edit_trigger_instance_heading'] = 'Trigger for workflow \'{$a}\''; -$string['adminsettings_edit_step_instance_heading'] = 'Step Instance for workflow \'{$a}\''; -$string['add_new_step_instance'] = 'Add New Step Instance...'; -$string['add_new_trigger_instance'] = 'Add New Trigger Instance...'; +$string['adminsettings_edit_step_instance_heading'] = 'Step instance for workflow \'{$a}\''; +$string['add_new_step_instance'] = 'Add new step instance...'; +$string['add_new_trigger_instance'] = 'Add new trigger instance...'; $string['step_settings_header'] = 'Specific settings of the step type'; $string['trigger_settings_header'] = 'Specific settings of the trigger type'; -$string['general_settings_header'] = 'General Settings'; +$string['general_settings_header'] = 'General settings'; $string['followedby_none'] = 'None'; $string['invalid_workflow'] = 'Invalid workflow configuration'; $string['invalid_workflow_details'] = 'Go to details view, to create a trigger for this workflow'; @@ -61,17 +61,17 @@ $string['error_wrong_trigger_selected'] = 'You tried to request a non-manual tri $string['lifecycle_task'] = 'Run the life cycle processes'; -$string['trigger_subpluginname'] = 'Subplugin Name'; +$string['trigger_subpluginname'] = 'Subplugin name'; $string['trigger_subpluginname_help'] = 'Step subplugin/trigger title (visible for admins only).'; -$string['trigger_instancename'] = 'Instance Name'; +$string['trigger_instancename'] = 'Instance name'; $string['trigger_instancename_help'] = 'Trigger instance title (visible for admins only).'; $string['trigger_enabled'] = 'Enabled'; $string['trigger_sortindex'] = 'Up/Down'; $string['trigger_workflow'] = 'Workflow'; $string['workflow'] = 'Workflow'; -$string['add_workflow'] = 'Add Workflow'; -$string['upload_workflow'] = 'Upload Workflow'; +$string['add_workflow'] = 'Add workflow'; +$string['upload_workflow'] = 'Upload workflow'; $string['workflow_title'] = 'Title'; $string['workflow_title_help'] = 'Workflow title (visible for admins only).'; $string['workflow_displaytitle'] = 'Displayed workflow title'; @@ -82,7 +82,7 @@ this value describes the time until a process for this combination of course and $string['workflow_finishdelay'] = 'Delay in case of finished course'; $string['workflow_finishdelay_help'] = 'If a course has finished a process instance of this workflow, this value describes the time until a process for this combination of course and workflow can be started again.'; -$string['workflow_delayforallworkflows'] = 'Delay for all Workflows?'; +$string['workflow_delayforallworkflows'] = 'Delay for all workflows?'; $string['workflow_delayforallworkflows_help'] = 'If ticked, the durations on top do not only delay the execution of this workflow for a course, but for all other workflows as well. Thus, until the time passes no process can be started for the respective course.'; @@ -91,16 +91,16 @@ $string['workflow_processes'] = 'Active processes'; $string['workflow_timeactive'] = 'Active since'; $string['workflow_sortindex'] = 'Up/Down'; $string['workflow_tools'] = 'Actions'; -$string['viewsteps'] = 'View Workflow Steps'; -$string['editworkflow'] = 'Edit General Settings'; -$string['backupworkflow'] = 'Backup Workflow'; -$string['duplicateworkflow'] = 'Duplicate Workflow'; -$string['deleteworkflow'] = 'Delete Workflow'; +$string['viewsteps'] = 'View workflow steps'; +$string['editworkflow'] = 'Edit general settings'; +$string['backupworkflow'] = 'Backup workflow'; +$string['duplicateworkflow'] = 'Duplicate workflow'; +$string['deleteworkflow'] = 'Delete workflow'; $string['deleteworkflow_confirm'] = 'The workflow is going to be deleted. This can\'t be undone. Are you sure?'; $string['activateworkflow'] = 'Activate'; -$string['disableworkflow'] = 'Disable Workflow (processes keep running)'; +$string['disableworkflow'] = 'Disable workflow (processes keep running)'; $string['disableworkflow_confirm'] = 'The workflow is going to be disabled. Are you sure?'; -$string['abortdisableworkflow'] = 'Disable Workflow (abort processes, maybe unsafe!)'; +$string['abortdisableworkflow'] = 'Disable workflow (abort processes, maybe unsafe!)'; $string['abortdisableworkflow_confirm'] = 'The workflow is going to be disabled and all running processes of this workflow will be aborted. Are you sure?'; $string['abortprocesses'] = 'Abort running processes (maybe unsafe!)'; $string['abortprocesses_confirm'] = 'All running processes of this workflow will be aborted. Are you sure?'; @@ -113,9 +113,9 @@ $string['workflow_timedeactive'] = 'Deactivated since'; $string['active_workflows_list'] = 'List active workflows and workflow definitions'; $string['step_type'] = 'Type'; -$string['step_subpluginname'] = 'Subplugin Name'; +$string['step_subpluginname'] = 'Subplugin name'; $string['step_subpluginname_help'] = 'Step subplugin/trigger title (visible for admins only).'; -$string['step_instancename'] = 'Instance Name'; +$string['step_instancename'] = 'Instance name'; $string['step_instancename_help'] = 'Step instance title (visible for admins only).'; $string['step_sortindex'] = 'Up/Down'; $string['step_edit'] = 'Edit'; @@ -135,7 +135,7 @@ $string['subplugintype_lifecycletrigger_plural'] = 'Triggers for starting a life $string['subplugintype_lifecyclestep'] = 'Step within a lifecycle process'; $string['subplugintype_lifecyclestep_plural'] = 'Steps within a lifecycle process'; -$string['nointeractioninterface'] = 'No Interaction Interface available!'; +$string['nointeractioninterface'] = 'No interaction interface available!'; $string['tools'] = 'Tools'; $string['status'] = 'Status'; $string['date'] = 'Due date'; @@ -145,7 +145,7 @@ $string['noprocessfound'] = 'A process with the given processid could not be fou $string['nocoursestodisplay'] = 'There are currently no courses which require your attention!'; -$string['course_backups_list_header'] = 'Course Backups'; +$string['course_backups_list_header'] = 'Course backups'; $string['backupcreated'] = 'Created at'; $string['restore'] = 'Restore'; $string['download'] = 'Download'; @@ -155,7 +155,7 @@ $string['workflownotfound'] = 'Workflow with id {$a} could not be found'; // View.php. $string['tablecoursesrequiringattention'] = 'Courses that require your attention'; $string['tablecoursesremaining'] = 'Remaining courses'; -$string['tablecourseslog'] = 'Past Actions'; +$string['tablecourseslog'] = 'Past actions'; $string['viewheading'] = 'Manage courses'; $string['interaction_success'] = 'Action successfully saved.'; $string['manual_trigger_success'] = 'Workflow started successfully.'; @@ -175,4 +175,4 @@ $string['restore_trigger_does_not_exist'] = 'The trigger {$a} is not installed, $string['process_triggered_event'] = 'A process has been triggered'; $string['process_proceeded_event'] = 'A process has been proceeded'; -$string['process_rollback_event'] = 'A process has been rolled back'; \ No newline at end of file +$string['process_rollback_event'] = 'A process has been rolled back'; diff --git a/step/createbackup/lang/en/lifecyclestep_createbackup.php b/step/createbackup/lang/en/lifecyclestep_createbackup.php index c8dbbb4c98994c9ed2a89c7b65939420357af497..7f811a5cd8e279a9c9817fef846f008522f37e3f 100644 --- a/step/createbackup/lang/en/lifecyclestep_createbackup.php +++ b/step/createbackup/lang/en/lifecyclestep_createbackup.php @@ -22,6 +22,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Create Backup Step'; +$string['pluginname'] = 'Create backup step'; -$string['maximumbackupspercron'] = 'Maximum number of Backups per cron'; +$string['maximumbackupspercron'] = 'Maximum number of backups per cron'; diff --git a/step/deletecourse/lang/en/lifecyclestep_deletecourse.php b/step/deletecourse/lang/en/lifecyclestep_deletecourse.php index 82ffeb4ee5316e5c0678e80f483785578a692392..1246a2e9451bf07bfb9fd5c73720466adcae3815 100644 --- a/step/deletecourse/lang/en/lifecyclestep_deletecourse.php +++ b/step/deletecourse/lang/en/lifecyclestep_deletecourse.php @@ -22,6 +22,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Delete Course Step'; +$string['pluginname'] = 'Delete course step'; $string['deletecourse_maximumdeletionspercron'] = 'Maximum number of courses deleted per cron'; diff --git a/step/duplicate/lang/en/lifecyclestep_duplicate.php b/step/duplicate/lang/en/lifecyclestep_duplicate.php index cf90c5d6eac70910bb27f179fd475f5da8e3cce3..3eb2e06d96afad0e36b6eeb3e2db750b795cc063 100644 --- a/step/duplicate/lang/en/lifecyclestep_duplicate.php +++ b/step/duplicate/lang/en/lifecyclestep_duplicate.php @@ -22,11 +22,11 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Duplicate Step'; +$string['pluginname'] = 'Duplicate step'; $string['duplicate_form'] = 'Enter data'; -$string['duplicate_course_header'] = 'Duplicate Course'; +$string['duplicate_course_header'] = 'Duplicate course'; $string['status_message_duplication'] = 'Duplicated course will be available shortly.'; $string['status_message_form'] = 'Additional information required'; $string['action_new_course_data'] = '{$a} supplied new course name'; diff --git a/step/email/lang/en/lifecyclestep_email.php b/step/email/lang/en/lifecyclestep_email.php index 529f0a926823c9d14cc809eb7b0c60934187dcbf..15a77d5ccc7ccef5b1d08c046cd93cac7fbf4857 100644 --- a/step/email/lang/en/lifecyclestep_email.php +++ b/step/email/lang/en/lifecyclestep_email.php @@ -22,10 +22,10 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Email Step'; +$string['pluginname'] = 'Email step'; $string['email_responsetimeout'] = 'Time the user has for the response'; -$string['email_subject'] = 'Subject Template'; +$string['email_subject'] = 'Subject template'; $emailplaceholdersnohtml = '<p>' . 'You can use the following placeholders:' . '<br>' . 'First name of recipient: ##firstname##' . '<br>' . 'Last name of recipient: ##lastname##' @@ -44,8 +44,8 @@ $emailplaceholdershtml = '<p>' . 'You can use the following placeholders:' $string['email_content_html'] = 'Content HTML Template'; $string['email_content_html_help'] = 'Set the html template for the content of the email (HTML email, will be used instead of plaintext field if not empty!)' . $emailplaceholdershtml; -$string['email:preventdeletion'] = 'Prevent Deletion'; +$string['email:preventdeletion'] = 'Prevent deletion'; -$string['keep_course'] = 'Keep Course'; +$string['keep_course'] = 'Keep course'; $string['status_message_requiresattention'] = 'Course is marked for deletion'; $string['action_prevented_deletion'] = '{$a} prevented deletion'; diff --git a/tests/behat/activate_workflow.feature b/tests/behat/activate_workflow.feature index a0cd3c6b929303ae038d48003fc81803b2163efa..485dbd4c5e9d4005bc9b37e6b9e975f6c442e4d7 100644 --- a/tests/behat/activate_workflow.feature +++ b/tests/behat/activate_workflow.feature @@ -4,13 +4,13 @@ Feature: Add a workflow definition activate it Scenario: Add a new workflow definition with steps and rearrange Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | When I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" When I select "Start date delay trigger" from the "triggername" singleselect Then I should see "Trigger for workflow 'My Workflow'" And I should see "Specific settings of the trigger type" @@ -19,41 +19,41 @@ Feature: Add a workflow definition activate it | delay[number] | 2 | | delay[timeunit] | days | And I press "Save changes" - Then I should see "Workflow Steps" - And I should see "Add New Step Instance" + Then I should see "Workflow steps" + And I should see "Add new step instance" And I should see "Start date delay trigger" - When I select "Email Step" from the "stepname" singleselect + When I select "Email step" from the "stepname" singleselect And I set the following fields to these values: - | Instance Name | Email Step | + | Instance name | Email step | | responsetimeout[number] | 14 | | responsetimeout[timeunit] | days | - | Subject Template | Subject | + | Subject template | Subject | | Content plain text template | Content | | Content HTML Template | Content HTML | And I press "Save changes" - And I select "Create Backup Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Create Backup Step" + And I select "Create backup step" from the "stepname" singleselect + And I set the field "Instance name" to "Create backup step" And I press "Save changes" - And I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 2" + And I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 2" And I press "Save changes" And I press "Back" - Then I should see the tool "View Workflow Steps" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table - And I should see the tool "Duplicate Workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table - And I should see the tool "Edit General Settings" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table - And I should see the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + Then I should see the tool "View workflow steps" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + And I should see the tool "Duplicate workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + And I should see the tool "Edit general settings" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + And I should see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table And I should not see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table When I press "Activate" - Then I should see the tool "View Workflow Steps" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + Then I should see the tool "View workflow steps" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table And I should not see the table "tool_lifecycle_workflow_definitions" # And I should not see the tool "View Workflow Steps" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table # won't work because table doesnt exist when only workflow - # And I should see the tool "Duplicate Workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + # And I should see the tool "Duplicate workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table # And I should see the tool "Edit General Settings" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table - # And I should not see the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table - When I click on the tool "View Workflow Steps" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + # And I should not see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_workflow_definitions" table + When I click on the tool "View workflow steps" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table Then I should not see the tool "Edit" in any row of the "tool_lifecycle_workflows" table And I should not see the tool "Delete" in any row of the "tool_lifecycle_workflows" table And I should not see the tool "Up" in any row of the "tool_lifecycle_workflows" table And I should not see the tool "Down" in any row of the "tool_lifecycle_workflows" table And I should see the tool "View" in all rows of the "tool_lifecycle_workflows" table - And I should not see "Add New Step Instance" \ No newline at end of file + And I should not see "Add new step instance" \ No newline at end of file diff --git a/tests/behat/add_workflow.feature b/tests/behat/add_workflow.feature index 6673861e8ee02dffd997d75a7dfed35e7199af28..428e0bdf1085e9ae2253172b9ccd0bab702bd34d 100644 --- a/tests/behat/add_workflow.feature +++ b/tests/behat/add_workflow.feature @@ -5,17 +5,17 @@ Feature: Add a workflow definition Scenario: Add a new workflow definition without steps For displaying the additional trigger settings the "Save changes" button is used. Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | When I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" When I select "Manual trigger" from the "triggername" singleselect Then I should see "Trigger for workflow 'My Workflow'" When I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | And I press "Save changes" # The manual trigger requires additional settings. For that reason the form reloads with some more fields. Then I should see "Required" @@ -25,7 +25,7 @@ Feature: Add a workflow definition | Action name | Delete course | | Capability | moodle/course:manageactivities | And I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" And I should see "Manual trigger" When I press "Back" Then I should see "My Workflow" @@ -33,94 +33,94 @@ Feature: Add a workflow definition Scenario: Add a new workflow definition with steps For displaying the additional trigger settings the "reload" button is used. Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | When I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" When I select "Start date delay trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 2 | | delay[timeunit] | days | And I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" And I should see "Start date delay trigger" - When I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course" + When I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course" And I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" And I should see "Delete Course" Scenario: Add a new workflow definition and alter trigger Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | When I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" When I select "Start date delay trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 2 | | delay[timeunit] | days | And I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" And I should see "Start date delay trigger" When I click on the tool "Edit" in the "Trigger" row of the "tool_lifecycle_workflows" table Then the following fields match these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 2 | | delay[timeunit] | days | And I set the following fields to these values: - | Instance Name | Other Trigger | + | Instance name | Other Trigger | | delay[number] | 4 | | delay[timeunit] | weeks | And I press "Save changes" When I click on the tool "Edit" in the "Trigger" row of the "tool_lifecycle_workflows" table Then the following fields match these values: - | Instance Name | Other Trigger | + | Instance name | Other Trigger | | delay[number] | 4 | | delay[timeunit] | weeks | Scenario: Add a new workflow definition with steps and rearange Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | When I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" When I select "Start date delay trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 2 | | delay[timeunit] | days | And I press "Save changes" - Then I should see "Workflow Steps" + Then I should see "Workflow steps" And I should see "Start date delay trigger" - When I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 1" + When I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 1" And I press "Save changes" - And I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 2" + And I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 2" And I press "Save changes" - And I select "Create Backup Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Create Backup Step" + And I select "Create backup step" from the "stepname" singleselect + And I set the field "Instance name" to "Create backup step" And I press "Save changes" Then the step "Delete Course 1" should be at the 1 position And the step "Delete Course 2" should be at the 2 position - And the step "Create Backup Step" should be at the 3 position + And the step "Create backup step" should be at the 3 position And I click on the tool "Down" in the "Delete Course 1" row of the "tool_lifecycle_workflows" table Then the step "Delete Course 1" should be at the 2 position And the step "Delete Course 2" should be at the 1 position - And the step "Create Backup Step" should be at the 3 position - And I click on the tool "Up" in the "Create Backup Step" row of the "tool_lifecycle_workflows" table + And the step "Create backup step" should be at the 3 position + And I click on the tool "Up" in the "Create backup step" row of the "tool_lifecycle_workflows" table Then the step "Delete Course 1" should be at the 3 position And the step "Delete Course 2" should be at the 1 position - And the step "Create Backup Step" should be at the 2 position + And the step "Create backup step" should be at the 2 position diff --git a/tests/behat/disable_workflow.feature b/tests/behat/disable_workflow.feature index 2ee7b3c88d8cb6af02e4de69f4de5c8d2deed042..dc4c14c6ec537d9f67c65e1e34cf67cc189fd324 100644 --- a/tests/behat/disable_workflow.feature +++ b/tests/behat/disable_workflow.feature @@ -7,29 +7,29 @@ Feature: Disable a workflow | fullname | shortname | category | startdate | | Course 1 | C1 | 0 | ##4 days ago## | And I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | And I press "Save changes" And I select "Start date delay trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 3 | | delay[timeunit] | days | And I press "Save changes" - And I select "Email Step" from the "stepname" singleselect + And I select "Email step" from the "stepname" singleselect And I set the following fields to these values: - | Instance Name | Email Step | + | Instance name | Email step | | responsetimeout[number] | 42 | | responsetimeout[timeunit] | days | - | Subject Template | Subject | + | Subject template | Subject | | Content plain text template | Content | | Content HTML Template | Content HTML | And I press "Save changes" - And I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 1" + And I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 1" And I press "Save changes" And I press "Back" And I press "Activate" @@ -39,39 +39,39 @@ Feature: Disable a workflow Scenario: Disable an workflow, keep processes running, then abort all processes and delete workflow Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration Then I should see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table - And I should see the tool "Disable Workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table - When I click on the tool "Disable Workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + And I should see the tool "Disable workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + When I click on the tool "Disable workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table # Here a confirming dialog would appear, but we can't test it without javascript (it just doesn't show). Then I should see the tool "Abort running processes (maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table - And I should not see the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + And I should not see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table When I click on the tool "Abort running processes (maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table # Here a confirming dialog would appear, but we can't test it without javascript (it just doesn't show). - Then I should see the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + Then I should see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table And I should not see the tool "Abort running processes (maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table - When I click on the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + When I click on the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table # Here a confirming dialog would appear, but we can't test it without javascript (it just doesn't show). Then I should see "Nothing to display" Scenario: Disable an workflow and kill processes (abort), then delete workflow Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration Then I should see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table - And I should see the tool "Disable Workflow (abort processes, maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table - When I click on the tool "Disable Workflow (abort processes, maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + And I should see the tool "Disable workflow (abort processes, maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + When I click on the tool "Disable workflow (abort processes, maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table # Here a confirming dialog would appear, but we can't test it without javascript (it just doesn't show). - Then I should see the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + Then I should see the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table And I should not see the tool "Abort running processes (maybe unsafe!)" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table - When I click on the tool "Delete Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + When I click on the tool "Delete workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table Then I should see "Nothing to display" Scenario: Disable an workflow then create (duplicate) a new one with the same configuration Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration Then I should see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table - When I click on the tool "Disable Workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table - When I click on the tool "Duplicate Workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table + When I click on the tool "Disable workflow (processes keep running)" in the "My Workflow" row of the "tool_lifecycle_active_automatic_workflows" table + When I click on the tool "Duplicate workflow" in the "My Workflow" row of the "tool_lifecycle_deactivated_workflows" table Then I should see the row "My Workflow" in the "tool_lifecycle_workflow_definitions" table And I should not see the row "My Workflow" in the "tool_lifecycle_active_automatic_workflows" table When I press "Activate" diff --git a/tests/behat/interaction.feature b/tests/behat/interaction.feature index 6c69741c20a17ca36d3f04098f93f70b9bf80125..68f28ef1a725a3be7b338e91d9db8d9a08c35472 100644 --- a/tests/behat/interaction.feature +++ b/tests/behat/interaction.feature @@ -16,29 +16,29 @@ Feature: Add a workflow with an email step and test the interaction as a teacher | teacher1 | C2 | editingteacher | | teacher1 | C3 | editingteacher | And I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | And I press "Save changes" And I select "Start date delay trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | delay[number] | 3 | | delay[timeunit] | days | And I press "Save changes" - And I select "Email Step" from the "stepname" singleselect + And I select "Email step" from the "stepname" singleselect And I set the following fields to these values: - | Instance Name | Email Step | + | Instance name | Email step | | responsetimeout[number] | 8 | | responsetimeout[timeunit] | seconds | - | Subject Template | Subject | + | Subject template | Subject | | Content plain text template | Content | | Content HTML Template | Content HTML | And I press "Save changes" - And I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 2" + And I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 2" And I press "Save changes" And I press "Back" And I press "Activate" @@ -55,9 +55,9 @@ Feature: Add a workflow with an email step and test the interaction as a teacher Then I should see "Course 1" in the "tool_lifecycle_remaining" "table" And I should see "Course 2" in the "tool_lifecycle_interaction" "table" And I should see "Course 3" in the "tool_lifecycle_interaction" "table" - And I should see the tool "Keep Course" in the "Course 2" row of the "tool_lifecycle_interaction" table - And I should see the tool "Keep Course" in the "Course 3" row of the "tool_lifecycle_interaction" table - When I click on the tool "Keep Course" in the "Course 2" row of the "tool_lifecycle_interaction" table + And I should see the tool "Keep course" in the "Course 2" row of the "tool_lifecycle_interaction" table + And I should see the tool "Keep course" in the "Course 3" row of the "tool_lifecycle_interaction" table + When I click on the tool "Keep course" in the "Course 2" row of the "tool_lifecycle_interaction" table Then I should see "Course 1" in the "tool_lifecycle_remaining" "table" And I should see "Course 2" in the "tool_lifecycle_remaining" "table" And I should see "Course 3" in the "tool_lifecycle_interaction" "table" diff --git a/tests/behat/interaction_forms.feature b/tests/behat/interaction_forms.feature index 131dadfa8a57d9a005f935a3adefe4c8c715f080..1d564fad38449f6cbbcaa6997dd8f8065f7a426a 100644 --- a/tests/behat/interaction_forms.feature +++ b/tests/behat/interaction_forms.feature @@ -12,22 +12,22 @@ Feature: Add a workflow with a manual trigger and a duplicate step and test the | user | course | role | | teacher1 | C1 | editingteacher | And I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | And I press "Save changes" And I select "Manual trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | Icon | t/delete | | Action name | Duplicate course | | Capability | moodle/course:manageactivities | And I press "Save changes" - And I select "Duplicate Step" from the "stepname" singleselect + And I select "Duplicate step" from the "stepname" singleselect And I set the following fields to these values: - | Instance Name | Duplicate Step | + | Instance name | Duplicate step | And I press "Save changes" And I press "Back" And I press "Activate" @@ -39,7 +39,7 @@ Feature: Add a workflow with a manual trigger and a duplicate step and test the Then I should see "Course 1" in the "tool_lifecycle_remaining" "table" And I should see the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table When I click on the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table - Then I should see "Duplicate Course" + Then I should see "Duplicate course" When I set the following fields to these values: | Course short name | C2 | | Course full name | Course 2 | @@ -60,11 +60,11 @@ Feature: Add a workflow with a manual trigger and a duplicate step and test the Then I should see "Course 1" in the "tool_lifecycle_remaining" "table" And I should see the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table When I click on the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table - Then I should see "Duplicate Course" + Then I should see "Duplicate course" When I am on lifecycle view Then I should see the tool "Enter data" in the "Course 1" row of the "tool_lifecycle_interaction" table When I click on the tool "Enter data" in the "Course 1" row of the "tool_lifecycle_interaction" table - Then I should see "Duplicate Course" + Then I should see "Duplicate course" When I set the following fields to these values: | Course short name | C2 | | Course full name | Course 2 | @@ -85,7 +85,7 @@ Feature: Add a workflow with a manual trigger and a duplicate step and test the Then I should see "Course 1" in the "tool_lifecycle_remaining" "table" And I should see the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table When I click on the tool "Duplicate course" in the "Course 1" row of the "tool_lifecycle_remaining" table - Then I should see "Duplicate Course" + Then I should see "Duplicate course" When I press "Cancel" Then I should not see "Duplicated course will be available shortly." in the "tool_lifecycle_remaining" "table" And I should see "Course 1" in the "tool_lifecycle_remaining" "table" \ No newline at end of file diff --git a/tests/behat/manual_trigger.feature b/tests/behat/manual_trigger.feature index da3da87ba863f78ca460ff989a15bd396b4496ed..098aa2464afc914dd075fe4ee1db39627dc9bf5e 100644 --- a/tests/behat/manual_trigger.feature +++ b/tests/behat/manual_trigger.feature @@ -24,15 +24,15 @@ Feature: Add a manual trigger and test view and actions as a teacher And I set the following system permissions of "Non-editing teacher" role: | capability | permission | | tool/lifecycle:managecourses | Allow | - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | And I press "Save changes" And I select "Manual trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | Icon | t/delete | | Action name | Delete course | | Capability | moodle/course:manageactivities | @@ -52,24 +52,24 @@ Feature: Add a manual trigger and test view and actions as a teacher @javascript Scenario: Manually trigger backup and course deletion Given I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Workflow Settings" in site administration - And I press "Add Workflow" + And I navigate to "Plugins > Admin tools > Life Cycle > Workflow settings" in site administration + And I press "Add workflow" And I set the following fields to these values: | Title | My Workflow | | Displayed workflow title | Teachers view on workflow | And I press "Save changes" And I select "Manual trigger" from the "triggername" singleselect And I set the following fields to these values: - | Instance Name | My Trigger | + | Instance name | My Trigger | | Icon | t/delete | | Action name | Delete course | | Capability | moodle/course:manageactivities | And I press "Save changes" - And I select "Create Backup Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Create Backup Step" + And I select "Create backup step" from the "stepname" singleselect + And I set the field "Instance name" to "Create backup step" And I press "Save changes" - And I select "Delete Course Step" from the "stepname" singleselect - And I set the field "Instance Name" to "Delete Course 2" + And I select "Delete course step" from the "stepname" singleselect + And I set the field "Instance name" to "Delete Course 2" And I press "Save changes" And I press "Back" And I press "Activate" @@ -88,6 +88,6 @@ Feature: Add a manual trigger and test view and actions as a teacher And I should see "Course 2" When I log out And I log in as "admin" - And I navigate to "Plugins > Admin tools > Life Cycle > Course Backups" in site administration + And I navigate to "Plugins > Admin tools > Life Cycle > Course backups" in site administration Then I should see "Course 1" And I should not see "Course 2" \ No newline at end of file diff --git a/trigger/manual/lang/en/lifecycletrigger_manual.php b/trigger/manual/lang/en/lifecycletrigger_manual.php index 94b3c1185974d4916993db3080b2a0b76a9fb1c8..0185529a02e293b14bade9a92dae55ce7b1082d2 100644 --- a/trigger/manual/lang/en/lifecycletrigger_manual.php +++ b/trigger/manual/lang/en/lifecycletrigger_manual.php @@ -24,7 +24,7 @@ $string['pluginname'] = 'Manual trigger'; $string['setting_capability'] = 'Capability'; -$string['setting_capability_help'] = 'The Moodle Capability needed to see and invoke a workflow using this trigger, e.g. "enrol/manual:enrol". Please see Moodle Access API documentation for details.'; +$string['setting_capability_help'] = 'The Moodle capability needed to see and invoke a workflow using this trigger, e.g. "enrol/manual:enrol". Please see Moodle access API documentation for details.'; $string['setting_icon'] = 'Icon'; $string['setting_icon_help'] = 'The Moodle icon to be showed to the user for this trigger, e.g. "core/tick". A full list of possible icons can be found at Moodle documentation.'; $string['setting_displayname'] = 'Action name';