__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@core @core_cohort @_file_upload
Feature: Upload users to a cohort
In order to quickly fill site-wide groups with users
As an admin
I need to upload a file with users data containing cohort assigns
@javascript @skip_chrome_zerosize
Scenario: Upload users and assign them to a course with cohort enrolment method enabled
Given the following "cohorts" exist:
| name | idnumber |
| Cohort 1 | ASD |
| Cohort 2 | DSA |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
And I log in as "admin"
And I add "Cohort sync" enrolment method in "Course 1" with:
| Cohort | Cohort 1 |
And I should see "Cohort sync (Cohort 1 - Student)"
And I add "Cohort sync" enrolment method in "Course 2" with:
| Cohort | Cohort 2 |
And I should see "Cohort sync (Cohort 2 - Student)"
When I navigate to "Users > Accounts > Upload users" in site administration
And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager
And I press "Upload users"
And I press "Upload users"
And I press "Continue"
And I navigate to "Users > Accounts > Cohorts" in site administration
And I press "Assign" action in the "Cohort 1" report row
Then the "Current users" select box should contain "Tom Jones (tomjones@example.com)"
And the "Current users" select box should contain "Bob Jones (bobjones@example.com)"
And I press "Back to cohorts"
And I press "Assign" action in the "Cohort 2" report row
And the "Current users" select box should contain "Mary Smith (marysmith@example.com)"
And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)"
And I am on the "Course 1" "enrolled users" page
And I should see "Tom Jones"
And I should see "Bob Jones"
And I should not see "Mary Smith"
And I am on the "Course 2" "enrolled users" page
And I should see "Mary Smith"
And I should see "Alice Smith"
And I should not see "Tom Jones"
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| access_visible_cohorts.feature | File | 7.19 KB | 0777 |
|
| add_cohort.feature | File | 7.04 KB | 0777 |
|
| behat_cohort.php | File | 2.8 KB | 0777 |
|
| customfields.feature | File | 1.9 KB | 0777 |
|
| delete_cohorts.feature | File | 2.15 KB | 0777 |
|
| upload_cohort_users.feature | File | 2.03 KB | 0777 |
|
| upload_cohorts.feature | File | 12.5 KB | 0777 |
|
| view_cohorts.feature | File | 4.67 KB | 0777 |
|