Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@enrol @enrol_cohortFeature: Unenrol action to disable course enrolmentBackground:Given the following "users" exist:| username | firstname | lastname | email || teacher001 | Teacher | 001 | teacher001@example.com || student001 | Student | 001 | student001@example.com || student002 | Student | 002 | student002@example.com || student003 | Student | 003 | student003@example.com || student004 | Student | 004 | student004@example.com |And the following "cohorts" exist:| name | idnumber | visible || System cohort | CVO | 1 |And the following "cohort members" exist:| user | cohort || student001 | CVO || student002 | CVO || student003 | CVO || student004 | CVO |And the following "courses" exist:| fullname | shortname | format | startdate || Course 001 | C001 | weeks | ##1 month ago## |And the following "course enrolments" exist:| user | course | role | timestart || teacher001 | C001 | editingteacher | ##1 month ago## |@javascript @skip_chrome_zerosizeScenario: Removing the user from the cohort will suspend the enrolment but keep the roleWhen I log in as "teacher001"And I am on the "Course 001" "enrolment methods" pageAnd I select "Cohort sync" from the "Add method" singleselectAnd I open the autocomplete suggestions listThen "System cohort" "autocomplete_suggestions" should existAnd I set the field "Cohort" to "System cohort"And I press "Add method"And I am on the "Course 001" "enrolled users" pageAnd I should see "student001@example.com"And I should see "student002@example.com"And I should see "student003@example.com"And I should see "student004@example.com"And I log outWhen I log in as "admin"Then I navigate to "Plugins > Enrolments > Cohort sync" in site administrationAnd I select "Disable course enrolment" from the "External unenrol action" singleselectAnd I press "Save changes"And I navigate to "Users > Accounts > Cohorts" in site administrationWhen I press "Assign" action in the "System cohort" report rowAnd I set the field "removeselect_searchtext" to "Student 001"And I set the field "Current users" to "Student 001 (student001@example.com)"And I wait "1" secondsAnd I press "Remove"And I am on "Course 001" course homepageAnd I navigate to course participantsAnd I should see "Suspended" in the "Student 001" "table_row"And I should see "Active" in the "Student 002" "table_row"And I should see "Active" in the "Student 003" "table_row"And I should see "Active" in the "Student 004" "table_row"@javascript @skip_chrome_zerosizeScenario: Deleting non-empty cohort will suspend the enrolment but keep the roleWhen I log in as "teacher001"And I am on the "Course 001" "enrolment methods" pageAnd I select "Cohort sync" from the "Add method" singleselectAnd I open the autocomplete suggestions listThen "System cohort" "autocomplete_suggestions" should existAnd I set the field "Cohort" to "System cohort"And I press "Add method"And I am on the "Course 001" "enrolled users" pageAnd I should see "student001@example.com"And I should see "student002@example.com"And I should see "student003@example.com"And I should see "student004@example.com"And I log outWhen I log in as "admin"Then I navigate to "Plugins > Enrolments > Cohort sync" in site administrationAnd I select "Disable course enrolment" from the "External unenrol action" singleselectAnd I press "Save changes"And I navigate to "Users > Accounts > Cohorts" in site administrationWhen I press "Delete" action in the "System cohort" report rowAnd I press "Continue"And I am on "Course 001" course homepageAnd I navigate to course participantsAnd I should see "Suspended" in the "Student 001" "table_row"And I should see "Suspended" in the "Student 002" "table_row"And I should see "Suspended" in the "Student 003" "table_row"And I should see "Suspended" in the "Student 004" "table_row"