[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @enrol @enrol_meta @javascript 2 Feature: Enrolments are synchronised with meta courses 3 In order to simplify enrolments in parent courses 4 As a teacher 5 I need to be able to set up meta enrolments 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@asd.com | 11 | student2 | Student | 2 | student2@asd.com | 12 | student3 | Student | 3 | student3@asd.com | 13 | student4 | Student | 4 | student4@asd.com | 14 And the following "courses" exist: 15 | fullname | shortname | 16 | Course 1 | C1C1 | 17 | Course 2 | C2C2 | 18 | Course 3 | C3C3 | 19 And the following "groups" exist: 20 | name | course | idnumber | 21 | Groupcourse 1 | C3C3 | G1 | 22 | Groupcourse 2 | C3C3 | G2 | 23 And the following "course enrolments" exist: 24 | user | course | role | 25 | student1 | C1C1 | student | 26 | student2 | C1C1 | student | 27 | student3 | C1C1 | student | 28 | student4 | C1C1 | student | 29 | student1 | C2C2 | student | 30 | student2 | C2C2 | student | 31 And I log in as "admin" 32 And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" 33 And I click on "Enable" "link" in the "Course meta link" "table_row" 34 And I am on homepage 35 And I follow "Courses" 36 37 Scenario: Add meta enrolment instance without groups 38 When I follow "Course 3" 39 And I add "Course meta link" enrolment method with: 40 | Link course | C1C1 | 41 And I navigate to "Enrolled users" node in "Course administration > Users" 42 Then I should see "Student 1" 43 And I should see "Student 4" 44 And I should not see "Groupcourse" in the "table.userenrolment" "css_element" 45 46 Scenario: Add meta enrolment instance with groups 47 When I follow "Course 3" 48 And I add "Course meta link" enrolment method with: 49 | Link course | C1C1 | 50 | Add to group | Groupcourse 1 | 51 And I follow "Course 3" 52 And I add "Course meta link" enrolment method with: 53 | Link course | C2C2 | 54 | Add to group | Groupcourse 2 | 55 And I navigate to "Enrolled users" node in "Course administration > Users" 56 Then I should see "Groupcourse 1" in the "Student 1" "table_row" 57 And I should see "Groupcourse 1" in the "Student 2" "table_row" 58 And I should see "Groupcourse 1" in the "Student 3" "table_row" 59 And I should see "Groupcourse 1" in the "Student 4" "table_row" 60 And I should see "Groupcourse 2" in the "Student 1" "table_row" 61 And I should see "Groupcourse 2" in the "Student 2" "table_row" 62 And I should not see "Groupcourse 2" in the "Student 3" "table_row" 63 And I should not see "Groupcourse 2" in the "Student 4" "table_row" 64 65 Scenario: Add meta enrolment instance with auto-created groups 66 When I follow "Course 3" 67 And I add "Course meta link" enrolment method with: 68 | Link course | C1C1 | 69 | Add to group | Create new group | 70 And I navigate to "Enrolled users" node in "Course administration > Users" 71 Then I should see "Course 1 course" in the "Student 1" "table_row" 72 And I should see "Course 1 course" in the "Student 2" "table_row" 73 And I should see "Course 1 course" in the "Student 3" "table_row" 74 And I should see "Course 1 course" in the "Student 4" "table_row" 75 And I navigate to "Groups" node in "Course administration > Users" 76 And the "Groups" select box should contain "Course 1 course (4)" 77 78 Scenario: Backup and restore of meta enrolment instance 79 When I follow "Course 3" 80 And I add "Course meta link" enrolment method with: 81 | Link course | C1C1 | 82 | Add to group | Groupcourse 1 | 83 And I follow "Course 3" 84 And I add "Course meta link" enrolment method with: 85 | Link course | C2C2 | 86 When I backup "Course 3" course using this options: 87 | Confirmation | Filename | test_backup.mbz | 88 And I click on "Restore" "link" in the "test_backup.mbz" "table_row" 89 And I press "Continue" 90 And I set the field "targetid" to "1" 91 And I click on "Continue" "button" in the ".bcs-new-course" "css_element" 92 And I press "Next" 93 And I set the field "Course name" to "Course 4" 94 And I press "Next" 95 And I press "Perform restore" 96 And I trigger cron 97 And I am on homepage 98 And I follow "Courses" 99 And I follow "Course 4" 100 And I navigate to "Enrolment methods" node in "Course administration > Users" 101 Then I should see "Course meta link (Course 1)" 102 And I should see "Course meta link (Course 2)" 103 And I navigate to "Enrolled users" node in "Course administration > Users" 104 And I should see "Groupcourse 1" in the "Student 1" "table_row" 105 And I should see "Groupcourse 1" in the "Student 2" "table_row" 106 And I should see "Groupcourse 1" in the "Student 3" "table_row" 107 And I should see "Groupcourse 1" in the "Student 4" "table_row" 108 And I should see "Course 2" in the "Student 1" "table_row" 109 And I should not see "Course 2" in the "Student 3" "table_row"
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 |