forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-64032 enrol_manual: Make consistent the UI for setting enrolment
Add end date/duration for the UI for setting enrolment should be consistent
- Loading branch information
Showing
12 changed files
with
189 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,11 +108,11 @@ Feature: Teacher can search and enrol users one by one into the course | |
| student098 | Student | 098 | student098@example.com | | ||
| student099 | Student | 099 | student099@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 001 | C001 | | ||
| fullname | shortname | format | startdate | | ||
| Course 001 | C001 | weeks | ##1 month ago## | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher001 | C001 | editingteacher | | ||
| user | course | role | timestart | | ||
| teacher001 | C001 | editingteacher | ##1 month ago## | | ||
And I log in as "teacher001" | ||
And I am on "Course 001" course homepage | ||
|
||
|
@@ -178,3 +178,47 @@ Feature: Teacher can search and enrol users one by one into the course | |
When I set the field "Select users" to "[email protected]" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
Then I should see "[email protected], 1234567892, 1234567893, ABC1, ABC2" | ||
|
||
@javascript | ||
Scenario: Enrol user from participants page | ||
Given I navigate to course participants | ||
# Enrol user to course | ||
And I press "Enrol users" | ||
And I set the field "Select users" to "example.com" | ||
And I expand the "Select users" autocomplete | ||
When I click on "Student 099" item in the autocomplete list | ||
Then I should see "Student 099" in the list of options for the "Select users" autocomplete | ||
And I click on "Show more" "button" | ||
# Fill data to input duration | ||
And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist | ||
And the "Enrolment duration" "select" should be enabled | ||
And I set the field "duration" to "2" | ||
# Fill data to input end time | ||
And I set the field "Starting from" to "2" | ||
And I set the field "timeend[enabled]" to "1" | ||
And I set the field "timeend[day]" to "10" | ||
And the "Enrolment duration" "select" should be disabled | ||
And I click on "Enrol users" "button" in the "Enrol users" "dialogue" | ||
And I am on "Course 001" course homepage | ||
And I navigate to course participants | ||
And I should see "Student 099" in the "participants" "table" | ||
And I click on "Edit enrolment" "icon" in the "Student 099" "table_row" | ||
And the field "timeend[day]" matches value "10" | ||
|
||
@javascript | ||
Scenario: Update Enrol user | ||
Given I am on "Course 001" course homepage | ||
And I navigate to course participants | ||
When I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row" | ||
Then the "Enrolment duration" "select" should be enabled | ||
# Fill duration | ||
And "input[name='timeend[enabled]'][checked=checked]" "css_element" should not exist | ||
And the "Enrolment duration" "select" should be enabled | ||
And I set the field "duration" to "2" | ||
# Fill end time | ||
And I set the field "timeend[enabled]" to "1" | ||
And I set the field "timeend[day]" to "28" | ||
And the "Enrolment duration" "select" should be disabled | ||
And I press "Save changes" | ||
And I click on "Edit enrolment" "icon" in the "Teacher 001" "table_row" | ||
And the field "timeend[day]" matches value "28" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.