[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_group 2 Feature: Organize students into groups 3 In order to organize course activities in groups 4 As a teacher 5 I need to group students 6 7 @javascript 8 Scenario: Assign students to groups 9 Given the following "courses" exist: 10 | fullname | shortname | category | groupmode | 11 | Course 1 | C1 | 0 | 1 | 12 And the following "users" exist: 13 | username | firstname | lastname | email | 14 | teacher1 | Teacher | 1 | teacher1@example.com | 15 | student0 | Student | 0 | student0@example.com | 16 | student1 | Student | 1 | student1@example.com | 17 | student2 | Student | 2 | student2@example.com | 18 | student3 | Student | 3 | student3@example.com | 19 And the following "course enrolments" exist: 20 | user | course | role | 21 | teacher1 | C1 | editingteacher | 22 | student0 | C1 | student | 23 | student1 | C1 | student | 24 | student2 | C1 | student | 25 | student3 | C1 | student | 26 And I log in as "teacher1" 27 And I follow "Course 1" 28 And I expand "Users" node 29 And I follow "Groups" 30 And I press "Create group" 31 And I set the following fields to these values: 32 | Group name | Group 1 | 33 And I press "Save changes" 34 And I press "Create group" 35 And I set the following fields to these values: 36 | Group name | Group 2 | 37 And I press "Save changes" 38 When I add "Student 0 (student0@example.com)" user to "Group 1" group members 39 And I add "Student 1 (student1@example.com)" user to "Group 1" group members 40 And I add "Student 2 (student2@example.com)" user to "Group 2" group members 41 And I add "Student 3 (student3@example.com)" user to "Group 2" group members 42 Then I set the field "groups" to "Group 1 (2)" 43 And the "members" select box should contain "Student 0" 44 And the "members" select box should contain "Student 1" 45 And the "members" select box should not contain "Student 2" 46 And I set the field "groups" to "Group 2 (2)" 47 And the "members" select box should contain "Student 2" 48 And the "members" select box should contain "Student 3" 49 And the "members" select box should not contain "Student 0" 50 And I follow "Participants" 51 And I set the field "Separate groups" to "Group 1" 52 And I should see "Student 0" 53 And I should see "Student 1" 54 And I should not see "Student 2" 55 And I set the field "Separate groups" to "Group 2" 56 And I should see "Student 2" 57 And I should see "Student 3" 58 And I should not see "Student 0" 59 60 Scenario: Create groups and groupings without the 'moodle/course:changeidnumber' capability 61 Given the following "courses" exist: 62 | fullname | shortname | category | groupmode | 63 | Course 1 | C1 | 0 | 1 | 64 And the following "users" exist: 65 | username | firstname | lastname | email | 66 | teacher1 | Teacher | 1 | teacher1@example.com | 67 And the following "course enrolments" exist: 68 | user | course | role | 69 | teacher1 | C1 | editingteacher | 70 And I log in as "admin" 71 And I set the following system permissions of "Teacher" role: 72 | moodle/course:changeidnumber | Prevent | 73 And I log out 74 And I log in as "teacher1" 75 And I follow "Course 1" 76 And I expand "Users" node 77 And I follow "Groups" 78 When I press "Create group" 79 Then the "idnumber" "field" should be readonly 80 And I set the following fields to these values: 81 | Group name | The greatest group that never existed | 82 And I press "Save changes" 83 And I should see "The greatest group that never existed" 84 And I follow "Groupings" 85 And I press "Create grouping" 86 And the "idnumber" "field" should be readonly 87 And I set the following fields to these values: 88 | Grouping name | Not the greatest grouping, but it's ok! | 89 And I press "Save changes" 90 And I should see "Not the greatest grouping, but it's ok!" 91 92 Scenario: Create groups with enrolment key 93 Given the following "courses" exist: 94 | fullname | shortname | category | groupmode | 95 | Course 1 | C1 | 0 | 1 | 96 | Course 2 | C2 | 0 | 1 | 97 And I log in as "admin" 98 And I am on site homepage 99 And I follow "Course 1" 100 And I expand "Users" node 101 And I follow "Groups" 102 When I press "Create group" 103 And I set the following fields to these values: 104 | Group name | Group A | 105 | Enrolment key | badpasswd | 106 And I press "Save changes" 107 And I should see "Passwords must have at least 1 digit(s)" 108 And I set the following fields to these values: 109 | Group name | Group A | 110 | Enrolment key | Abcdef-1 | 111 And I press "Save changes" 112 And I press "Create group" 113 And I set the following fields to these values: 114 | Group name | Group B | 115 | Enrolment key | Abcdef-1 | 116 And I press "Save changes" 117 Then I should see "This enrolment key is already used for another group." 118 And I set the following fields to these values: 119 | Enrolment key | Abcdef-2 | 120 And I press "Save changes" 121 And the "groups" select box should contain "Group B (0)" 122 And I am on site homepage 123 And I follow "Course 2" 124 And I expand "Users" node 125 And I follow "Groups" 126 And I press "Create group" 127 And I set the following fields to these values: 128 | Group name | Group A | 129 | Enrolment key | Abcdef-1 | 130 And I should not see "This enrolment key is already used for another group."
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 |