| 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 |
$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;
$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.';