[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_backup 2 Feature: Restore Moodle 2 course backups 3 In order to continue using my stored course contents 4 As a teacher and an admin 5 I need to restore them inside other Moodle courses or in new courses 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | category | format | numsections | coursedisplay | 10 | Course 1 | C1 | 0 | topics | 15 | 1 | 11 | Course 2 | C2 | 0 | topics | 5 | 0 | 12 | Course 3 | C3 | 0 | topics | 2 | 0 | 13 And the following "activities" exist: 14 | activity | course | idnumber | name | intro | section | 15 | assign | C3 | assign1 | Test assign name | Assign description | 1 | 16 | data | C3 | data1 | Test database name | Database description | 2 | 17 And I log in as "admin" 18 And I am on site homepage 19 And I follow "Course 1" 20 And I turn editing mode on 21 And I add a "Forum" to section "1" and I fill the form with: 22 | Forum name | Test forum name | 23 | Description | Test forum description | 24 And I add the "Community finder" block 25 26 @javascript 27 Scenario: Restore a course in another existing course 28 When I backup "Course 1" course using this options: 29 | Confirmation | Filename | test_backup.mbz | 30 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 31 Then I should see "Course 2" 32 And I should see "Community finder" in the "Community finder" "block" 33 And I should see "Test forum name" 34 35 @javascript 36 Scenario: Restore a course in a new course 37 When I backup "Course 1" course using this options: 38 | Confirmation | Filename | test_backup.mbz | 39 And I restore "test_backup.mbz" backup into a new course using this options: 40 | Schema | Course name | Course 1 restored in a new course | 41 Then I should see "Course 1 restored in a new course" 42 And I should see "Community finder" in the "Community finder" "block" 43 And I should see "Test forum name" 44 And I click on "Edit settings" "link" in the "Administration" "block" 45 And I expand all fieldsets 46 And the field "id_format" matches value "Topics format" 47 And the field "Number of sections" matches value "15" 48 And the field "Course layout" matches value "Show one section per page" 49 And I press "Cancel" 50 51 @javascript 52 Scenario: Restore a backup into the same course 53 When I backup "Course 3" course using this options: 54 | Confirmation | Filename | test_backup.mbz | 55 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 56 | Schema | Test database name | 0 | 57 | Schema | Section 2 | 0 | 58 Then I should see "Course 2" 59 And I should see "Test assign name" 60 And I should not see "Test database name" 61 62 @javascript 63 Scenario: Restore a backup into the same course removing it's contents before that 64 When I backup "Course 1" course using this options: 65 | Confirmation | Filename | test_backup.mbz | 66 And I follow "Course 1" 67 And I add a "Forum" to section "1" and I fill the form with: 68 | Forum name | Test forum post backup name | 69 | Description | Test forum post backup description | 70 And I follow "Restore" 71 And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: 72 | Schema | Section 3 | 0 | 73 Then I should see "Course 1" 74 And I should not see "Section 3" 75 And I should not see "Test forum post backup name" 76 And I should see "Community finder" in the "Community finder" "block" 77 And I should see "Test forum name" 78 79 @javascript 80 Scenario: Restore a backup into a new course changing the course format afterwards 81 Given I backup "Course 1" course using this options: 82 | Confirmation | Filename | test_backup.mbz | 83 When I restore "test_backup.mbz" backup into a new course using this options: 84 Then I should see "Topic 1" 85 And I should see "Test forum name" 86 And I click on "Edit settings" "link" in the "Administration" "block" 87 And I expand all fieldsets 88 And the field "id_format" matches value "Topics format" 89 And I set the following fields to these values: 90 | id_startdate_day | 1 | 91 | id_startdate_month | January | 92 | id_startdate_year | 2020 | 93 | id_format | Weekly format | 94 And I press "Save and display" 95 And I should see "1 January - 7 January" 96 And I should see "Test forum name" 97 And I click on "Edit settings" "link" in the "Administration" "block" 98 And I expand all fieldsets 99 And the field "id_format" matches value "Weekly format" 100 And I set the following fields to these values: 101 | id_format | Social format | 102 And I press "Save and display" 103 And I should see "An open forum for chatting about anything you want to" 104 And I click on "Edit settings" "link" in the "Administration" "block" 105 And I expand all fieldsets 106 And the field "id_format" matches value "Social format" 107 And I press "Cancel" 108 109 @javascript 110 Scenario: Restore a backup in an existing course retaining the backup course settings 111 Given I add a "URL" to section "3" and I fill the form with: 112 | Name | Test URL name | 113 | Description | Test URL description | 114 | id_externalurl | http://www.moodle.org | 115 And I hide section "3" 116 And I hide section "7" 117 When I backup "Course 1" course using this options: 118 | Confirmation | Filename | test_backup.mbz | 119 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 120 | Schema | Overwrite course configuration | Yes | 121 And I click on "Edit settings" "link" in the "Administration" "block" 122 And I expand all fieldsets 123 Then the field "id_format" matches value "Topics format" 124 And the field "Number of sections" matches value "15" 125 And the field "Course layout" matches value "Show one section per page" 126 And I press "Cancel" 127 And section "3" should be hidden 128 And section "7" should be hidden 129 And section "15" should be visible 130 And I should see "Test URL name" in the "Topic 3" "section" 131 And I should see "Test forum name" in the "Topic 1" "section"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |