AutorÃa | Ultima modificación | Ver Log |
@core @core_userFeature: View course participants groupsIn order to know who is on a courseAs a teacherI need to be able to view the participants groups on a courseBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher1x | Teacher | 1x | teacher1x@example.com || student1x | Student | 1x | student1x@example.com || student2x | Student | 2x | student2x@example.com || student3x | Student | 3x | student3x@example.com || student4x | Student | 4x | student4x@example.com |And the following "courses" exist:| fullname | shortname | format | groupmode || Course 1 | C1 | topics | 1 |And the following "course enrolments" exist:| user | course | role || teacher1x | C1 | editingteacher || student1x | C1 | student || student2x | C1 | student || student3x | C1 | student || student4x | C1 | student |And the following "groups" exist:| name | course | idnumber || Group A | C1 | G1 || Group B | C1 | G2 |And the following "group members" exist:| user | group || student1x | G1 || student2x | G1 || student3x | G2 || student4x | G2 |Scenario: User should not be able to see other groups in separated group modeGiven I log in as "student1x"And I am on "Course 1" course homepageWhen I navigate to course participantsThen I should see "Group A"And I should see "Student 1x"And I should see "Student 2x"And I should not see "Group B"And I should not see "Student 3x"And I should not see "Student 4x"@javascriptScenario: User should be able to see other groups in visible group modeGiven I log in as "admin"And I am on "Course 1" course homepageAnd I navigate to "Settings" in current page administrationAnd I expand all fieldsetsAnd I set the field "Group mode" to "Visible groups"And I press "Save and display"And I log outAnd I log in as "student1x"And I am on "Course 1" course homepageWhen I navigate to course participantsThen I should see "Group A"And I should see "Student 1x"And I should see "Student 2x"And I set the field "type" in the "Filter 1" "fieldset" to "Groups"And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group B"And I click on "Apply filters" "button"And I should see "Student 3x"And I should see "Student 4x"Scenario: User should be able to see all users in no groups modeGiven I log in as "admin"And I am on "Course 1" course homepageAnd I navigate to "Settings" in current page administrationAnd I expand all fieldsetsAnd I set the field "Group mode" to "No groups"And I press "Save and display"And I log outAnd I log in as "student1x"And I am on "Course 1" course homepageWhen I navigate to course participantsThen I should see "Group A"And I should see "Student 1x"And I should see "Student 2x"And I should see "Group B"And I should see "Student 3x"And I should see "Student 4x"And I should see "Teacher 1x"And I should see "No groups"