From 5cdb09d10c9d181dc6656fc7904a72fc5e0898f4 Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Fri, 24 Mar 2023 12:55:55 +0100 Subject: [PATCH] MDL-77734 core_courseformat: add title to bulk duplicate activities --- course/format/classes/output/local/content/bulkedittools.php | 1 + course/format/tests/behat/bulk_activity_actions.feature | 2 +- lang/en/courseformat.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/course/format/classes/output/local/content/bulkedittools.php b/course/format/classes/output/local/content/bulkedittools.php index 69dbe3f6638..2dfb95b3d41 100644 --- a/course/format/classes/output/local/content/bulkedittools.php +++ b/course/format/classes/output/local/content/bulkedittools.php @@ -106,6 +106,7 @@ class bulkedittools implements named_templatable, renderable { 'icon' => 't/copy', 'action' => 'cmDuplicate', 'name' => get_string('duplicate'), + 'title' => get_string('cmsduplicate', 'core_courseformat'), 'bulk' => 'cm', ]; } diff --git a/course/format/tests/behat/bulk_activity_actions.feature b/course/format/tests/behat/bulk_activity_actions.feature index 5951e5f7efb..ec9c39c2f99 100644 --- a/course/format/tests/behat/bulk_activity_actions.feature +++ b/course/format/tests/behat/bulk_activity_actions.feature @@ -102,7 +102,7 @@ Feature: Bulk course activity actions. Given I click on "Select activity Activity sample 1" "checkbox" And I click on "Select activity Activity sample 3" "checkbox" And I should see "2 selected" in the "sticky-footer" "region" - When I click on "Duplicate" "button" in the "sticky-footer" "region" + When I click on "Duplicate activities" "button" in the "sticky-footer" "region" Then I should see "Activity sample 1" in the "Topic 1" "section" And I should see "Activity sample 1 (copy)" in the "Topic 1" "section" And "Activity sample 1 (copy)" "activity" should appear after "Activity sample 1" "activity" diff --git a/lang/en/courseformat.php b/lang/en/courseformat.php index 57e79b7b25f..d7f1bca111c 100644 --- a/lang/en/courseformat.php +++ b/lang/en/courseformat.php @@ -38,6 +38,7 @@ $string['cmdelete_title'] = 'Delete activity?'; $string['cmsdelete'] = 'Delete activities'; $string['cmsdelete_info'] = 'This will delete {$a->count} activities and any user data they contain'; $string['cmsdelete_title'] = 'Delete selected activities?'; +$string['cmsduplicate'] = 'Duplicate activities'; $string['cmsmove'] = 'Move activities'; $string['cmmove_title'] = 'Move activity'; $string['cmmove_info'] = 'Move "{$a}" activity after';