[ Index ] |
PHP Cross Reference of moodle-2.8 |
[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 follow "Course 1" 19 And I turn editing mode on 20 And I add a "Forum" to section "1" and I fill the form with: 21 | Forum name | Test forum name | 22 | Description | Test forum description | 23 And I add the "Community finder" block 24 25 @javascript 26 Scenario: Restore a course in another existing course 27 When I backup "Course 1" course using this options: 28 | Confirmation | Filename | test_backup.mbz | 29 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 30 Then I should see "Course 2" 31 And I should see "Community finder" in the "Community finder" "block" 32 And I should see "Test forum name" 33 34 @javascript 35 Scenario: Restore a course in a new course 36 When I backup "Course 1" course using this options: 37 | Confirmation | Filename | test_backup.mbz | 38 And I restore "test_backup.mbz" backup into a new course using this options: 39 | Schema | Course name | Course 1 restored in a new course | 40 Then I should see "Course 1 restored in a new course" 41 And I should see "Community finder" in the "Community finder" "block" 42 And I should see "Test forum name" 43 And I click on "Edit settings" "link" in the "Administration" "block" 44 And I expand all fieldsets 45 And the field "id_format" matches value "Topics format" 46 And the field "Number of sections" matches value "15" 47 And the field "Course layout" matches value "Show one section per page" 48 And I press "Cancel" 49 50 @javascript 51 Scenario: Restore a backup into the same course 52 When I backup "Course 3" course using this options: 53 | Confirmation | Filename | test_backup.mbz | 54 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 55 | Schema | Test database name | 0 | 56 | Schema | Section 2 | 0 | 57 Then I should see "Course 2" 58 And I should see "Test assign name" 59 And I should not see "Test database name" 60 61 @javascript 62 Scenario: Restore a backup into the same course removing it's contents before that 63 When I backup "Course 1" course using this options: 64 | Confirmation | Filename | test_backup.mbz | 65 And I follow "Course 1" 66 And I add a "Forum" to section "1" and I fill the form with: 67 | Forum name | Test forum post backup name | 68 | Description | Test forum post backup description | 69 And I follow "Restore" 70 And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options: 71 | Schema | Section 3 | 0 | 72 Then I should see "Course 1" 73 And I should not see "Section 3" 74 And I should not see "Test forum post backup name" 75 And I should see "Community finder" in the "Community finder" "block" 76 And I should see "Test forum name" 77 78 @javascript 79 Scenario: Restore a backup into a new course changing the course format afterwards 80 Given I backup "Course 1" course using this options: 81 | Confirmation | Filename | test_backup.mbz | 82 When I restore "test_backup.mbz" backup into a new course using this options: 83 Then I should see "Topic 1" 84 And I should see "Test forum name" 85 And I click on "Edit settings" "link" in the "Administration" "block" 86 And I expand all fieldsets 87 And the field "id_format" matches value "Topics format" 88 And I set the following fields to these values: 89 | id_startdate_day | 1 | 90 | id_startdate_month | January | 91 | id_startdate_year | 2020 | 92 | id_format | Weekly format | 93 And I press "Save changes" 94 And I should see "1 January - 7 January" 95 And I should see "Test forum name" 96 And I click on "Edit settings" "link" in the "Administration" "block" 97 And I expand all fieldsets 98 And the field "id_format" matches value "Weekly format" 99 And I set the following fields to these values: 100 | id_format | Social format | 101 And I press "Save changes" 102 And I should see "An open forum for chatting about anything you want to" 103 And I click on "Edit settings" "link" in the "Administration" "block" 104 And I expand all fieldsets 105 And the field "id_format" matches value "Social format" 106 And I press "Cancel" 107 108 @javascript 109 Scenario: Restore a backup in an existing course retaining the backup course settings 110 Given I add a "URL" to section "3" and I fill the form with: 111 | Name | Test URL name | 112 | Description | Test URL description | 113 | id_externalurl | http://www.moodle.org | 114 And I hide section "3" 115 And I hide section "7" 116 When I backup "Course 1" course using this options: 117 | Confirmation | Filename | test_backup.mbz | 118 And I restore "test_backup.mbz" backup into "Course 2" course using this options: 119 | Schema | Overwrite course configuration | Yes | 120 And I click on "Edit settings" "link" in the "Administration" "block" 121 And I expand all fieldsets 122 Then the field "id_format" matches value "Topics format" 123 And the field "Number of sections" matches value "15" 124 And the field "Course layout" matches value "Show one section per page" 125 And I press "Cancel" 126 And section "3" should be hidden 127 And section "7" should be hidden 128 And section "15" should be visible 129 And I should see "Test URL name" in the "#section-3" "css_element" 130 And I should see "Test forum name" in the "#section-1" "css_element"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |