This commit is contained in:
Eloy Lafuente (stronk7)
2018-09-18 23:11:34 +02:00
3 changed files with 6 additions and 1 deletions
@@ -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 |
+3
View File
@@ -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;
+1
View File
@@ -537,6 +537,7 @@ $string['downloadtext'] = 'Download in text format';
$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.';