Skip to content

Commit

Permalink
Merge branch 'MDL-59227' of https://github.com/rlorenzo/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 18, 2018
2 parents 457047d + e372389 commit ead7a53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backup/util/ui/tests/behat/duplicate_activities.feature
Expand Up @@ -20,12 +20,13 @@ Feature: Duplicate activities
| Name | Test database name |
| Description | Test database description |
And I duplicate "Test database name" activity
And I should see "Test database name (copy)"
And I wait until section "1" is available
And I click on "Edit settings" "link" in the "Test database name" activity
And I set the following fields to these values:
| Name | Original database name |
And I press "Save and return to course"
And I click on "Edit settings" "link" in the "Test database name" activity
And I click on "Edit settings" "link" in the "Test database name (copy)" activity
And I set the following fields to these values:
| Name | Duplicated database name |
| Description | Duplicated database description |
Expand Down
3 changes: 3 additions & 0 deletions course/lib.php
Expand Up @@ -3469,6 +3469,9 @@ function duplicate_module($course, $cm) {
$newcm = get_fast_modinfo($cm->course)->get_cm($newcmid);
$event = \core\event\course_module_created::create_from_cm($newcm);
$event->trigger();

// Add ' (copy)' to duplicates.
set_coursemodule_name($newcm->id, get_string('duplicatedmodule', 'moodle', $newcm->name));
}

return isset($newcm) ? $newcm : null;
Expand Down
1 change: 1 addition & 0 deletions lang/en/moodle.php
Expand Up @@ -537,6 +537,7 @@
$string['doyouagree'] = 'Have you read these conditions and understood them?';
$string['droptoupload'] = 'Drop files here to upload';
$string['duplicate'] = 'Duplicate';
$string['duplicatedmodule'] = '{$a} (copy)';
$string['edhelpaspellpath'] = 'To use spell-checking within the editor, you MUST have <strong>aspell 0.50</strong> or later installed on your server, and you must specify the correct path to access the aspell binary. On Unix/Linux systems, this path is usually <strong>/usr/bin/aspell</strong>, but it might be something else.';
$string['edhelpbgcolor'] = 'Define the edit area\'s background color.<br />Valid values are, for example: #FFFFFF or white';
$string['edhelpcleanword'] = 'This setting enables or disables Word-specific format filtering.';
Expand Down

0 comments on commit ead7a53

Please sign in to comment.