diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 19bf84211d0..0a9cfd13356 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -100,8 +100,7 @@ Feature: Set up contextual data for tests And the following "course enrolments" exist: | user | course | role | | student1 | C1 | student | - When I log in as "student1" - And I am on "Course 1" course homepage + When I am on the "Course 1" course page logged in as student1 Then I should see "Topic 1" Scenario: Add role assigns @@ -135,17 +134,11 @@ Feature: Set up contextual data for tests When I log in as "user1" And I am on site homepage Then edit mode should be available on the current page - And I log out - And I log in as "user2" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as user2 Then edit mode should be available on the current page - And I log out - And I log in as "user3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as user3 Then edit mode should be available on the current page - And I log out - And I log in as "user4" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as user4 Then edit mode should be available on the current page And I log out And I log in as "user5" @@ -187,8 +180,7 @@ Feature: Set up contextual data for tests And the following "activities" exist: | activity | name | intro | course | idnumber | grade | | assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 | - When I log in as "admin" - And I am on "Course 1" course homepage + When I am on the "Course 1" course page logged in as admin Then I should see "Test assignment name" # Assignment 2.2 module type is disabled by default # And I should see "Test assignment22 name" @@ -304,9 +296,7 @@ Feature: Set up contextual data for tests And the following "grade categories" exist: | fullname | course | gradecategory | | Grade sub category 2 | C1 | Grade category 1 | - When I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + When I am on the "Course 1" "grades > Grader report > View" page logged in as "admin" Then I should see "Grade category 1" And I should see "Grade sub category 2" @@ -327,9 +317,7 @@ Feature: Set up contextual data for tests | itemname | course | gradecategory | | Test Grade Item 2 | C1 | Grade category 1 | | Test Grade Item 3 | C1 | Grade sub category 2 | - When I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + When I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" Then I should see "Test Grade Item 1" And I open the action menu in "Test Grade Item 1" "table_row" And I choose "Edit" in the open action menu @@ -358,9 +346,7 @@ Feature: Set up contextual data for tests And the following "scales" exist: | name | scale | | Test Scale 1 | Disappointing, Good, Very good, Excellent | - When I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Scales" in the course gradebook + When I am on the "Course 1" "grades > scales" page logged in as admin Then I should see "Test Scale 1" And I should see "Disappointing, Good, Very good, Excellent" @@ -379,9 +365,7 @@ Feature: Set up contextual data for tests | Grade outcome 2 | OT2 | C1 | Test Scale 1 | And the following config values are set as admin: | enableoutcomes | 1 | - When I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "More > Outcomes" in the course gradebook + When I am on the "Course 1" "grades > outcomes" page logged in as admin Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element" And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element" And I press "Manage outcomes" @@ -407,9 +391,7 @@ Feature: Set up contextual data for tests | Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 | And the following config values are set as admin: | enableoutcomes | 1 | - When I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + When I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" Then I should see "Test Outcome Grade Item 1" And I open the action menu in "Test Outcome Grade Item 1" "table_row" And I choose "Edit" in the open action menu @@ -425,6 +407,5 @@ Feature: Set up contextual data for tests And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | online_users | Course | C1 | course-view-* | site-pre | - When I log in as "admin" - And I am on "Course 1" course homepage + When I am on the "Course 1" course page logged in as admin Then I should see "Online users" diff --git a/admin/tool/recyclebin/tests/behat/backup_user_data.feature b/admin/tool/recyclebin/tests/behat/backup_user_data.feature index b6012e84eef..0eccc5944df 100644 --- a/admin/tool/recyclebin/tests/behat/backup_user_data.feature +++ b/admin/tool/recyclebin/tests/behat/backup_user_data.feature @@ -54,10 +54,7 @@ Feature: Backup user data And I navigate to "Recycle bin" in current page administration And I should see "Quiz 1" And I click on "Restore" "link" in the "region-main" "region" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - When I navigate to "User report" in the course gradebook + When I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then "Quiz 1" row "Grade" column of "user-grade" table should contain "50" And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50" diff --git a/blocks/activity_results/tests/behat/addblockinactivity.feature b/blocks/activity_results/tests/behat/addblockinactivity.feature index c9d32db7c27..e80658cbe58 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -32,18 +32,15 @@ Feature: The activity results block displays student scores And the following "activities" exist: | activity | name | content | course | section | idnumber | | page | Test page name | This is a page | C1 | 1 | page1 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment 1 | student1 | 90.00 | + | Test assignment 1 | student2 | 80.00 | + | Test assignment 1 | student3 | 70.00 | + | Test assignment 1 | student4 | 60.00 | + | Test assignment 1 | student5 | 50.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I should see "Test page name" - And I navigate to "View > Grader report" in the course gradebook - And I change window size to "large" - And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1" - And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1" - And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment 1" - And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment 1" - And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment 1" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on a non-graded activity to show 3 high scores Given I am on the "Test page name" "page activity" page diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index aba0c34c46e..97b6fe1c2f3 100644 --- a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature @@ -27,16 +27,15 @@ Feature: The activity results block displays student high scores And the following "activities" exist: | activity | name | intro | course | section | idnumber | assignsubmission_file_enabled | | assign | Test assignment | Offline text | C1 | 1 | assign1 | 0 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment | student1 | 90.00 | + | Test assignment | student2 | 80.00 | + | Test assignment | student3 | 70.00 | + | Test assignment | student4 | 60.00 | + | Test assignment | student5 | 50.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook - And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" - And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment" - And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" - And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 0 high scores Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/highscoreswithscales.feature b/blocks/activity_results/tests/behat/highscoreswithscales.feature index 0af28c4aee5..3e9caa8294f 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscales.feature @@ -31,23 +31,15 @@ Feature: The activity results block displays students high scores in group as sc | name | Test assignment | | intro | Offline text | | assignsubmission_file_enabled | 0 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Scales" in the course gradebook - And I press "Add a new scale" - And I set the following fields to these values: - | Name | My Scale | - | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | - And I press "Save changes" - And I am on "Course 1" course homepage - And I follow "Test assignment" - And I navigate to "Settings" in current page administration + And the following "scales" exist: + | name | scale | + | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | + And I am on the "Test assignment" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | And I press "Save and return to course" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature index d3b3b686341..fbada7aecd7 100644 --- a/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithscalesandgroups.feature @@ -44,25 +44,19 @@ Feature: The activity results block displays student in group high scores as sca And the following "activities" exist: | activity | name | intro | course | section | idnumber | | assign | Test assignment | Offline text | C1 | 1 | assign1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage with editing mode on - And I navigate to "Scales" in the course gradebook - And I press "Add a new scale" - And I set the following fields to these values: - | Name | My Scale | - | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | - And I press "Save changes" - And I am on "Course 1" course homepage - And I am on the "Test assignment" "assign activity" page - And I navigate to "Settings" in current page administration + And the following "scales" exist: + | name | scale | + | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | + And I change window size to "large" + And I am on the "Test assignment" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | assignsubmission_file_enabled | 0 | | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | | Group mode | Separate groups | And I press "Save and return to course" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I turn editing mode on + And I am on the "Course 1" "grades > Grader report > View" page And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment" @@ -83,9 +77,7 @@ Feature: The activity results block displays student in group high scores as sca And I press "Save changes" Then I should see "Group 1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "Student 1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" @@ -104,9 +96,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Very good" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out - And I log in as "student3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student3 And I should see "Student 3" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -127,10 +117,8 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Excellent!" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out # Students cannot see user identity fields. - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should not see "User S1" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" @@ -150,9 +138,7 @@ Feature: The activity results block displays student in group high scores as sca And I should see "Excellent!" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should see "Excellent!" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature index daa5d10a11d..52dab9dbb78 100644 --- a/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithseperategroups.feature @@ -46,21 +46,19 @@ Feature: The activity results block displays student in separate groups scores | course | C1 | | idnumber | 0001 | | name | Test assignment | - | intro | Offline text | | section | 1 | | assignsubmission_file_enabled | 0 | | groupmode | 1 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment | student1 | 100.00 | + | Test assignment | student2 | 90.00 | + | Test assignment | student3 | 90.00 | + | Test assignment | student4 | 80.00 | + | Test assignment | student5 | 80.00 | + | Test assignment | student6 | 70.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook - And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" - And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -88,9 +86,7 @@ Feature: The activity results block displays student in separate groups scores And I press "Save changes" Then I should see "Group 1" in the "Activity results" "block" And I should see "95.00/100.00" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "Student 1" in the "Activity results" "block" And I should see "100.00/100.00" in the "Activity results" "block" @@ -106,9 +102,7 @@ Feature: The activity results block displays student in separate groups scores And I press "Save changes" Then I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "Student 1" in the "Activity results" "block" And I should see "100.00" in the "Activity results" "block" @@ -129,9 +123,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "85%" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75%" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "Student 1" in the "Activity results" "block" And I should see "100%" in the "Activity results" "block" And I should see "Student 2" in the "Activity results" "block" @@ -153,9 +145,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "85.00/100.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00/100.00" in the "Activity results" "block" - And I log out - And I log in as "student3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student3 And I should see "Student 3" in the "Activity results" "block" And I should see "90.00/100.00" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -177,9 +167,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "85.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "Student 1" in the "Activity results" "block" And I should see "100.00" in the "Activity results" "block" And I should see "Student 2" in the "Activity results" "block" @@ -201,10 +189,8 @@ Feature: The activity results block displays student in separate groups scores And I should see "95.00%" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" - And I log out # Students cannot see user identity fields. - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should not see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" @@ -225,9 +211,7 @@ Feature: The activity results block displays student in separate groups scores And I should see "95.00%" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" And I should see "90.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature index 6b3103b0af3..32f247bcf2b 100644 --- a/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/highscoreswithvisiblegroups.feature @@ -42,17 +42,13 @@ Feature: The activity results block displays student in visible groups scores | student5 | G3 | | student6 | G3 | And the following "activities" exist: - | activity | name | intro | course | idnumber | section | assignsubmission_file_enabled | - | assign | Test assignment | Test assignment | C1 | assign1 | 1 | 0 | - And I log in as "teacher1" - And I am on "Course 1" course homepage with editing mode on - And I am on the "Test assignment" "assign activity" page - And I navigate to "Settings" in current page administration + | activity | name | course | idnumber | section | assignsubmission_file_enabled | + | assign | Test assignment | C1 | assign1 | 1 | 0 | + And I am on the "Test assignment" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | Group mode | Visible groups | And I press "Save and return to course" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" @@ -61,7 +57,7 @@ Feature: The activity results block displays student in visible groups scores And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" And I press "Save changes" - And I am on "Course 1" course homepage + And I am on "Course 1" course homepage with editing mode on Scenario: Configure the block on the course page to show 1 high score Given I add the "Activity results" block @@ -87,9 +83,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 1" in the "Activity results" "block" And I should see "95.00/100.00" in the "Activity results" "block" @@ -103,9 +97,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" @@ -120,9 +112,7 @@ Feature: The activity results block displays student in visible groups scores | config_decimalpoints | 0 | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 1" in the "Activity results" "block" And I should see "95%" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -140,9 +130,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 1" in the "Activity results" "block" And I should see "95.00/100.00" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -160,9 +148,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 1" in the "Activity results" "block" And I should see "95.00" in the "Activity results" "block" And I should see "Group 2" in the "Activity results" "block" @@ -182,9 +168,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Display only ID numbers | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group" in the "Activity results" "block" And I should see "95.00%" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" @@ -200,9 +184,7 @@ Feature: The activity results block displays student in visible groups scores | config_nameformat | Anonymous results | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group" in the "Activity results" "block" And I should see "95.00%" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index 4ed74d718d6..e3b890580d9 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature @@ -29,19 +29,16 @@ Feature: The activity results block displays student low scores | course | C1 | | idnumber | 0001 | | name | Test assignment | - | intro | Offline text | - | section | 1 | | assignsubmission_file_enabled | 0 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment | student1 | 90.00 | + | Test assignment | student2 | 80.00 | + | Test assignment | student3 | 70.00 | + | Test assignment | student4 | 60.00 | + | Test assignment | student5 | 50.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook - And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" - And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment" - And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" - And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block diff --git a/blocks/activity_results/tests/behat/lowscoreswithscales.feature b/blocks/activity_results/tests/behat/lowscoreswithscales.feature index 54b5654b232..0a615227f16 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscales.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscales.feature @@ -32,23 +32,16 @@ Feature: The activity results block displays student low scores as scales | idnumber | 0001 | | section | 1 | | assignsubmission_file_enabled | 0 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Scales" in the course gradebook - And I press "Add a new scale" - And I set the following fields to these values: - | Name | My Scale | - | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | - And I press "Save changes" - And I am on "Course 1" course homepage with editing mode on - And I am on the "Test assignment" "assign activity" page - And I navigate to "Settings" in current page administration + And the following "scales" exist: + | name | scale | + | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | + And I am on the "Test assignment" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | And I press "Save and return to course" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I turn editing mode on + And I am on the "Course 1" "grades > Grader report > View" page And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment" diff --git a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature index f0f20b47f2c..52df073fa53 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithscalesandgroups.feature @@ -49,23 +49,16 @@ Feature: The activity results block displays students in groups low scores as sc | description | Offline text | | assignsubmission_file_enabled | 0 | | groupmode | 1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Scales" in the course gradebook - And I press "Add a new scale" - And I set the following fields to these values: - | Name | My Scale | - | Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | - And I press "Save changes" - And I am on "Course 1" course homepage - And I follow "Test assignment" - And I navigate to "Settings" in current page administration + And the following "scales" exist: + | name | scale | + | My Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! | + And I change window size to "large" + And I am on the "Test assignment" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | id_grade_modgrade_type | Scale | | id_grade_modgrade_scale | My Scale | And I press "Save and return to course" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" @@ -87,9 +80,7 @@ Feature: The activity results block displays students in groups low scores as sc And I press "Save changes" Then I should see "Group 3" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "Student 6" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" @@ -106,9 +97,7 @@ Feature: The activity results block displays students in groups low scores as sc And I should see "Very good" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out - And I log in as "student3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student3 And I should see "Student 3" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -128,10 +117,8 @@ Feature: The activity results block displays students in groups low scores as sc Then I should see "Group" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out # Students cannot see user identity fields. - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "User" in the "Activity results" "block" And I should not see "User S5" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" @@ -150,9 +137,7 @@ Feature: The activity results block displays students in groups low scores as sc Then I should see "Group" in the "Activity results" "block" And I should see "Very good" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "User" in the "Activity results" "block" And I should see "Good" in the "Activity results" "block" And I should see "Average" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature index 2214a8704aa..589cdc8016a 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithseperategroups.feature @@ -42,19 +42,18 @@ Feature: The activity results block displays students in separate groups scores | student5 | G3 | | student6 | G3 | And the following "activities" exist: - | activity | course | idnumber | name | intro | assignsubmission_file_enabled | groupmode | - | assign | C1 | a1 | Test assignment | Offline text | 0 | 1 | + | activity | course | idnumber | name | assignsubmission_file_enabled | groupmode | + | assign | C1 | a1 | Test assignment | 0 | 1 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment | student1 | 100.00 | + | Test assignment | student2 | 90.00 | + | Test assignment | student3 | 90.00 | + | Test assignment | student4 | 80.00 | + | Test assignment | student5 | 80.00 | + | Test assignment | student6 | 70.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook - And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" - And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -82,9 +81,7 @@ Feature: The activity results block displays students in separate groups scores And I press "Save changes" Then I should see "Group 3" in the "Activity results" "block" And I should see "75.00/100.00" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "Student 6" in the "Activity results" "block" And I should see "70.00/100.00" in the "Activity results" "block" @@ -100,9 +97,7 @@ Feature: The activity results block displays students in separate groups scores And I press "Save changes" Then I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "Student 6" in the "Activity results" "block" And I should see "70.00" in the "Activity results" "block" @@ -121,9 +116,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "85%" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75%" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "Student 6" in the "Activity results" "block" And I should see "70%" in the "Activity results" "block" And I should see "Student 5" in the "Activity results" "block" @@ -143,9 +136,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "85.00/100.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00/100.00" in the "Activity results" "block" - And I log out - And I log in as "student3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student3 And I should see "Student 3" in the "Activity results" "block" And I should see "90.00/100.00" in the "Activity results" "block" And I should see "Student 4" in the "Activity results" "block" @@ -165,9 +156,7 @@ Feature: The activity results block displays students in separate groups scores And I should see "85.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 And I should see "Student 5" in the "Activity results" "block" And I should see "80.00" in the "Activity results" "block" And I should see "Student 6" in the "Activity results" "block" @@ -188,10 +177,8 @@ Feature: The activity results block displays students in separate groups scores Then I should see "Group" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" - And I log out # Students cannot see user identity fields. - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should not see "User S1" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" @@ -211,9 +198,7 @@ Feature: The activity results block displays students in separate groups scores Then I should see "Group" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student1 And I should see "User" in the "Activity results" "block" And I should see "100.00%" in the "Activity results" "block" And I should see "90.00%" in the "Activity results" "block" diff --git a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature index 253f1c5b3d9..a7f42c69804 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -46,21 +46,18 @@ Feature: The activity results block displays student in visible groups low score | course | C1 | | idnumber | 0001 | | name | Test assignment | - | intro | Offline text | - | section | 1 | | assignsubmission_file_enabled | 0 | | groupmode | 2 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment | student1 | 100.00 | + | Test assignment | student2 | 90.00 | + | Test assignment | student3 | 90.00 | + | Test assignment | student4 | 80.00 | + | Test assignment | student5 | 80.00 | + | Test assignment | student6 | 70.00 | And I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook - And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" - And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" - And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" - And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" - And I press "Save changes" - And I am on "Course 1" course homepage Scenario: Configure the block on the course page to show 1 low score Given I add the "Activity results" block @@ -86,9 +83,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 3" in the "Activity results" "block" And I should see "75.00/100.00" in the "Activity results" "block" @@ -102,9 +97,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 3" in the "Activity results" "block" And I should see "75.00" in the "Activity results" "block" @@ -123,9 +116,7 @@ Feature: The activity results block displays student in visible groups low score And I should see "85%" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" And I should see "75%" in the "Activity results" "block" - And I log out - And I log in as "student5" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student5 Then I should see "Group 2" in the "Activity results" "block" And I should see "85%" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -141,9 +132,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 2" in the "Activity results" "block" And I should see "85.00/100.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -159,9 +148,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Display full names | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group 2" in the "Activity results" "block" And I should see "85.00" in the "Activity results" "block" And I should see "Group 3" in the "Activity results" "block" @@ -179,9 +166,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Display only ID numbers | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" @@ -196,9 +181,7 @@ Feature: The activity results block displays student in visible groups low score | config_nameformat | Anonymous results | | config_usegroups | Yes | And I press "Save changes" - And I log out - Then I log in as "student1" - And I am on "Course 1" course homepage + Then I am on the "Course 1" course page logged in as student1 And I should see "Group" in the "Activity results" "block" And I should see "85.00%" in the "Activity results" "block" And I should see "75.00%" in the "Activity results" "block" diff --git a/completion/tests/behat/activity_completion_criteria.feature b/completion/tests/behat/activity_completion_criteria.feature index beb6ce8eaf8..50084de7c0b 100644 --- a/completion/tests/behat/activity_completion_criteria.feature +++ b/completion/tests/behat/activity_completion_criteria.feature @@ -22,7 +22,6 @@ Feature: Allow to mark course as completed without cron for activity completion | course | CC1 | | name | Test assignment name | | idnumber | assign1 | - | description | Test assignment description | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | completionstatus | Course | CC1 | course-view-* | side-pre | @@ -87,7 +86,6 @@ Feature: Allow to mark course as completed without cron for activity completion And I click on "Grade" "link" in the "student1@example.com" "table_row" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" - And I am on "Completion course" course homepage And I am on the "Completion course" course page logged in as student1 And I should see "Status: In progress" And I am on the "Test assignment name2" "assign activity" page logged in as teacher1 @@ -95,14 +93,12 @@ Feature: Allow to mark course as completed without cron for activity completion And I click on "Grade" "link" in the "student1@example.com" "table_row" And I set the field "Grade out of 100" to "40" And I click on "Save changes" "button" - And I am on "Completion course" course homepage When I am on the "Completion course" course page logged in as student1 Then I should see "Status: Complete" @javascript Scenario: Course completion should not be updated when teacher grades assignment on course grader report page - Given I am on the "Completion course" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook + Given I am on the "Completion course" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "57" to the user "Student First" for the grade item "Test assignment name" And I press "Save changes" @@ -116,8 +112,7 @@ Feature: Allow to mark course as completed without cron for activity completion @javascript Scenario: Course completion should not be updated when teacher grades assignment on activity grader report page - Given I am on the "Completion course" course page logged in as teacher1 - And I navigate to "View > Single view" in the course gradebook + Given I am on the "Completion course" "grades > Single View > View" page logged in as "teacher1" And I click on "Users" "link" in the ".page-toggler" "css_element" And I turn editing mode on And I click on "Student First" in the "user" search widget diff --git a/completion/tests/behat/enable_completion_on_pass_grade.feature b/completion/tests/behat/enable_completion_on_pass_grade.feature index 10087f72ec1..cf9846663c4 100644 --- a/completion/tests/behat/enable_completion_on_pass_grade.feature +++ b/completion/tests/behat/enable_completion_on_pass_grade.feature @@ -27,26 +27,18 @@ Feature: Students will be marked as completed if they have achieved a passing gr | completionpassgrade | 1 | | completionusegrade | 1 | | gradepass | 50 | - And I log in as "teacher1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as teacher1 And "Student First" user has not completed "Test assignment name" activity - And I log out Scenario: Passing grade completion - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + Given I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I give the grade "21" to the user "Student First" for the grade item "Test assignment name" And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name" And I press "Save changes" - And I log out - When I log in as "student1" - And I am on "Course 1" course homepage - And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" + When I am on the "Course 1" course page logged in as student1 + Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed" - And I log out - And I log in as "student2" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student2 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done" diff --git a/completion/tests/behat/enable_completion_on_view_and_grade.feature b/completion/tests/behat/enable_completion_on_view_and_grade.feature index f762c49dd91..69e06a3f8c0 100644 --- a/completion/tests/behat/enable_completion_on_view_and_grade.feature +++ b/completion/tests/behat/enable_completion_on_view_and_grade.feature @@ -23,7 +23,6 @@ Feature: Students will be marked as completed and pass/fail | course | C1 | | idnumber | a1 | | name | Test assignment name | - | intro | Submit your online text | | assignsubmission_onlinetext_enabled | 1 | | assignsubmission_file_enabled | 0 | | completion | 2 | @@ -31,61 +30,43 @@ Feature: Students will be marked as completed and pass/fail | completionusegrade | 1 | | gradepass | 50 | | completionpassgrade | 1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as teacher1 And "Student First" user has not completed "Test assignment name" activity - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student2 - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 - And I log out Scenario: Confirm completion (incomplete/pass/fail) are set correctly - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I give the grade "21" to the user "Student First" for the grade item "Test assignment name" - And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name" - And I give the grade "30" to the user "Student Third" for the grade item "Test assignment name" - And I press "Save changes" - And I log out - When I log in as "student1" - And I am on "Course 1" course homepage - And the "View" completion condition of "Test assignment name" is displayed as "done" + Given the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment name | student1 | 21.00 | + | Test assignment name | student2 | 50.00 | + | Test assignment name | student3 | 30.00 | + When I am on "Course 1" course homepage + Then the "View" completion condition of "Test assignment name" is displayed as "done" And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed" - And I log out - And I log in as "student2" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student2 And the "View" completion condition of "Test assignment name" is displayed as "done" And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done" - And I log out - And I log in as "student3" - And I am on "Course 1" course homepage + And I am on the "Course 1" course page logged in as student3 And the "View" completion condition of "Test assignment name" is displayed as "todo" And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed" @javascript Scenario: Keep current view completion condition when the teacher does the action 'Unlock completion settings'. - Given I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I give the grade "21" to the user "Student First" for the grade item "Test assignment name" - And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name" - And I press "Save changes" - And I am on the "Test assignment name" "assign activity" page logged in as teacher1 - And I navigate to "Settings" in current page administration + Given the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment name | student1 | 21.00 | + | Test assignment name | student2 | 50.00 | + And I am on the "Test assignment name" "assign activity editing" page logged in as teacher1 And I expand all fieldsets And I press "Unlock completion settings" And I expand all fieldsets And I should see "Completion options unlocked" And I click on "Save and display" "button" - And I log out When I am on the "Course 1" course page logged in as student1 Then the "View" completion condition of "Test assignment name" is displayed as "done" - And I log out - When I am on the "Course 1" course page logged in as student2 - Then the "View" completion condition of "Test assignment name" is displayed as "done" + And I am on the "Course 1" course page logged in as student2 + And the "View" completion condition of "Test assignment name" is displayed as "done" diff --git a/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature b/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature index 0e948611732..6fa91a78326 100644 --- a/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature +++ b/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature @@ -22,7 +22,6 @@ Feature: Students will be shown relevant completion state based on grade item vi | activity | assign | | course | C1 | | name | Test assignment name | - | intro | Submit your online text | | assignsubmission_onlinetext_enabled | 1 | | assignsubmission_file_enabled | 0 | | completion | 2 | @@ -31,34 +30,27 @@ Feature: Students will be shown relevant completion state based on grade item vi | gradepass | 50 | And I am on the "Course 1" course page logged in as teacher1 And "Student First" user has not completed "Test assignment name" activity - And I log out And I am on the "Course 1" course page logged in as student1 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "todo" - And I log out Scenario: Passing grade and receive a grade completions for visible grade item (passgrade completion enabled) - Given I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I give the grade "21" to the user "Student First" for the grade item "Test assignment name" - And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name" - And I press "Save changes" - And I am on "Course 1" course homepage + Given the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment name | student1 | 21.00 | + | Test assignment name | student2 | 50.00 | + And I am on the "Course 1" course page logged in as teacher1 And "Student First" user has completed "Test assignment name" activity And "Student Second" user has completed "Test assignment name" activity - And I log out When I am on the "Course 1" course page logged in as student1 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "failed" - And I log out And I am on the "Course 1" course page logged in as student2 Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done" Scenario: Passing grade and receive a grade completions for hidden grade item (passgrade completion enabled) - Given I am on the "Course 1" course page logged in as teacher1 - And I navigate to "Setup > Gradebook setup" in the course gradebook + Given I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I hide the grade item "Test assignment name" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on @@ -68,28 +60,22 @@ Feature: Students will be shown relevant completion state based on grade item vi And I am on "Course 1" course homepage And "Student First" user has not completed "Test assignment name" activity And "Student Second" user has completed "Test assignment name" activity - And I log out And I am on the "Course 1" course page logged in as student1 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "todo" - And I log out And I am on the "Course 1" course page logged in as student2 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And the "Receive a passing grade" completion condition of "Test assignment name" is displayed as "done" Scenario: Receive a grade completion for visible grade item (passgrade completion disabled) - Given I am on the "Test assignment name" Activity page logged in as teacher1 - When I navigate to "Settings" in current page administration + Given I am on the "Test assignment name" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | completionpassgrade | 0 | And I press "Save and display" - And I log out And I am on the "Course 1" course page logged in as student1 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo" And I should not see "Receive a passing grade" - And I log out - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "21" to the user "Student First" for the grade item "Test assignment name" And I give the grade "50" to the user "Student Second" for the grade item "Test assignment name" @@ -97,28 +83,22 @@ Feature: Students will be shown relevant completion state based on grade item vi And I am on "Course 1" course homepage And "Student First" user has completed "Test assignment name" activity And "Student Second" user has completed "Test assignment name" activity - And I log out When I am on the "Course 1" course page logged in as student1 # Once MDL-75582 is fixed "failed" should be changed to "done" And the "Receive a grade" completion condition of "Test assignment name" is displayed as "failed" And I should not see "Receive a passing grade" - And I log out And I am on the "Course 1" course page logged in as student2 Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" Scenario: Receive a grade completion for hidden grade item (passgrade completion disabled) - Given I am on the "Test assignment name" Activity page logged in as teacher1 - When I navigate to "Settings" in current page administration + Given I am on the "Test assignment name" "assign activity editing" page logged in as teacher1 And I set the following fields to these values: | completionpassgrade | 0 | And I press "Save and display" - And I log out And I am on the "Course 1" course page logged in as student1 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "todo" And I should not see "Receive a passing grade" - And I log out - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I hide the grade item "Test assignment name" And I navigate to "View > Grader report" in the course gradebook And I turn editing mode on @@ -128,10 +108,8 @@ Feature: Students will be shown relevant completion state based on grade item vi And I am on "Course 1" course homepage And "Student First" user has completed "Test assignment name" activity And "Student Second" user has completed "Test assignment name" activity - And I log out When I am on the "Course 1" course page logged in as student1 Then the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" And I should not see "Receive a passing grade" - And I log out And I am on the "Course 1" course page logged in as student2 And the "Receive a grade" completion condition of "Test assignment name" is displayed as "done" diff --git a/grade/export/txt/tests/behat/export.feature b/grade/export/txt/tests/behat/export.feature index 9ed149dced5..aadf1c629c0 100644 --- a/grade/export/txt/tests/behat/export.feature +++ b/grade/export/txt/tests/behat/export.feature @@ -20,13 +20,10 @@ Feature: I need to export grades as text | activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | | assign | C1 | a1 | Test assignment name | Submit your online text | 1 | | assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I change window size to "large" - And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" - And I press "Save changes" + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment name | student1 | 80.00 | + And I am on the "Course 1" course page logged in as teacher1 @javascript Scenario: Export grades as text diff --git a/grade/export/xml/tests/behat/export.feature b/grade/export/xml/tests/behat/export.feature index 60308cf2dc9..de88363aaf5 100644 --- a/grade/export/xml/tests/behat/export.feature +++ b/grade/export/xml/tests/behat/export.feature @@ -19,15 +19,13 @@ Feature: I need to export grades as xml | student1 | C1 | student | | student2 | C1 | student | And the following "activities" exist: - | activity | course | idnumber | name | intro | - | assign | C1 | a1 | Test assignment name | Submit something! | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" - And I give the grade "42.00" to the user "Student 2" for the grade item "Test assignment name" - And I press "Save changes" + | activity | course | idnumber | name | + | assign | C1 | a1 | Test assignment name | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment name | student1 | 80.00 | + | Test assignment name | student2 | 42.00 | + And I am on the "Course 1" course page logged in as teacher1 @javascript Scenario: Export grades as XML diff --git a/grade/report/grader/tests/behat/switch_views.feature b/grade/report/grader/tests/behat/switch_views.feature index ad68e12ced0..9f21eacabe7 100644 --- a/grade/report/grader/tests/behat/switch_views.feature +++ b/grade/report/grader/tests/behat/switch_views.feature @@ -75,8 +75,7 @@ Feature: We can change what we are viewing on the grader report And the following "role capability" exists: | role | editingteacher | | moodle/grade:viewhidden | prevent | - And I am on the "C1" "course" page logged in as "teacher1" - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" Then I should see "Test assignment name 1" in the "user-grades" "table" And I should see "Test assignment name 2" in the "user-grades" "table" And I should see "Manual grade" diff --git a/grade/report/history/tests/behat/basic_functionality.feature b/grade/report/history/tests/behat/basic_functionality.feature index d633f622bad..0889b4e176b 100644 --- a/grade/report/history/tests/behat/basic_functionality.feature +++ b/grade/report/history/tests/behat/basic_functionality.feature @@ -25,14 +25,12 @@ Feature: A teacher checks the grade history report in a course | student1 | C1 | student | | student2 | C1 | student | And the following "activities" exist: - | activity | course | section | name | intro | - | assign | C1 | 1 | The greatest assignment ever | Write a behat test for Moodle - it's amazing | - | assign | C1 | 1 | Rewarding assignment | After writing your behat test go grab a beer! | + | activity | course | name | + | assign | C1 | The greatest assignment ever | + | assign | C1 | Rewarding assignment | Given the following config values are set as admin: | showuseridentity | email,profile_field_food | - And I log in as "teacher1" - And I am on "Course 1" course homepage with editing mode on - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I should see "apple" in the "student1" "table_row" And I should see "orange" in the "student2" "table_row" And I turn editing mode on @@ -41,10 +39,7 @@ Feature: A teacher checks the grade history report in a course And I give the grade "50.00" to the user "Student 2" for the grade item "The greatest assignment ever" And I give the grade "60.00" to the user "Student 2" for the grade item "Rewarding assignment" And I press "Save changes" - And I log out - And I log in as "teacher2" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher2" And I should see "apple" in the "student1" "table_row" And I should see "orange" in the "student2" "table_row" And I turn editing mode on diff --git a/grade/report/singleview/tests/behat/gradeitemsearch.feature b/grade/report/singleview/tests/behat/gradeitemsearch.feature index b344ba6b0dd..2aed21e6c80 100644 --- a/grade/report/singleview/tests/behat/gradeitemsearch.feature +++ b/grade/report/singleview/tests/behat/gradeitemsearch.feature @@ -16,11 +16,9 @@ Feature: Given we have opted to search for a grade item, Lets find and search th | activity | course | idnumber | name | | assign | C1 | a1 | Test assignment one | | assign | C1 | a2 | Test assignment two | - And I am on the "Course 1" "Course" page logged in as "teacher1" - And I change window size to "large" Scenario: A teacher can search for and find a grade item to view - Given I navigate to "View > Single view" in the course gradebook + Given I am on the "Course 1" "grades > Single view > View" page logged in as "teacher1" And I click on "Grade items" "link" in the ".page-toggler" "css_element" When I click on ".search-widget[data-searchtype='grade']" "css_element" Then I confirm "Test assignment one" in "grade" search within the gradebook widget exists diff --git a/grade/report/singleview/tests/behat/reportswitching.feature b/grade/report/singleview/tests/behat/reportswitching.feature index feb106d8e45..2e1b61936c0 100644 --- a/grade/report/singleview/tests/behat/reportswitching.feature +++ b/grade/report/singleview/tests/behat/reportswitching.feature @@ -15,11 +15,9 @@ Feature: Given we land on the index page, select what type of report we wish to And the following "activities" exist: | activity | course | idnumber | name | | assign | C1 | a1 | Test assignment one | - And I am on the "Course 1" "Course" page logged in as "teacher1" - And I change window size to "large" Scenario: I switch between the two report types within singleview - Given I navigate to "View > Single view" in the course gradebook + Given I am on the "Course 1" "grades > Single view > View" page logged in as "teacher1" And I click on "Grade items" "link" in the ".page-toggler" "css_element" And ".search-widget[data-searchtype='user']" "css_element" should not exist And ".search-widget[data-searchtype='grade']" "css_element" should exist diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index 754d343fb2d..0364cdf7cbf 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -55,9 +55,7 @@ Feature: We can use Single view And the following config values are set as admin: | fullnamedisplay | firstnamephonetic,lastnamephonetic | | alternativefullnameformat | middlename, alternatename, firstname, lastname | - And I log in as "teacher1" - And I am on "Course 1" course homepage - Given I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" Scenario: I can update grades, add feedback and exclude grades. Given I navigate to "View > Single view" in the course gradebook @@ -97,10 +95,7 @@ Feature: We can use Single view And the following should exist in the "generaltable" table: | First name (Alternate name) Last name | Grade | | Ann, Jill, Grainne, Beauchamp | Very good | - And I log out - And I log in as "teacher2" - And I am on "Course 1" course homepage - Given I navigate to "View > Single view" in the course gradebook + And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher2" And I click on "Users" "link" in the ".page-toggler" "css_element" And I click on "Student" in the "user" search widget And I turn editing mode on @@ -173,27 +168,19 @@ Feature: We can use Single view And I should see "Select a user above to view all their grades" in the "region-main" "region" And I click on "Grade items" "link" And I should see "Select a grade item above" in the "region-main" "region" - And I am on "Course 1" course homepage - When I navigate to "View > Single view" in the course gradebook + When I am on the "Course 1" "grades > Single view > View" page Then I should see "Select a grade item above" in the "region-main" "region" - And I log out - And I log in as "teacher3" - And I am on "Course 1" course homepage - And I navigate to "View > Single view" in the course gradebook + And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3" And I should see "Select a user above to view all their grades" in the "region-main" "region" Scenario: Teacher sees his last viewed user report when navigating back to the gradebook singleview report. Given I navigate to "View > Single view" in the course gradebook And I click on "Gronya,Beecham" in the "user" search widget And I should see "Gronya,Beecham" in the "region-main" "region" - And I am on "Course 1" course homepage - When I navigate to "View > Single view" in the course gradebook + When I am on the "Course 1" "grades > Single view > View" page Then I should not see "Select a user above to view all their grades" in the "region-main" "region" And I should see "Gronya,Beecham" in the "region-main" "region" - And I log out - And I log in as "teacher3" - And I am on "Course 1" course homepage - And I navigate to "View > Single view" in the course gradebook + And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3" And I should see "Select a user above to view all their grades" in the "region-main" "region" Scenario: Teacher sees his last viewed grade item report when navigating back to the gradebook singleview report. @@ -201,14 +188,10 @@ Feature: We can use Single view And I click on "Grade items" "link" And I click on "Test assignment one" in the "grade" search widget And I should see "Test assignment one" in the "region-main" "region" - And I am on "Course 1" course homepage - When I navigate to "View > Single view" in the course gradebook + When I am on the "Course 1" "grades > Single view > View" page Then I should not see "Select a grade item above" in the "region-main" "region" And I should see "Test assignment one" in the "region-main" "region" - And I log out - And I log in as "teacher3" - And I am on "Course 1" course homepage - And I navigate to "View > Single view" in the course gradebook + And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher3" And I should see "Select a user above to view all their grades" in the "region-main" "region" Scenario: Teacher sees his last viewed user report if the user is a part of the the current group. @@ -237,8 +220,7 @@ Feature: We can use Single view And the following "group members" exist: | user | group | | student2 | G1 | - And I am on "Course 1" course homepage - And I navigate to "Settings" in current page administration + And I am on the "Course 1" "course editing" page And I expand all fieldsets And I set the field "Group mode" to "Visible groups" And I press "Save and display" @@ -256,8 +238,7 @@ Feature: We can use Single view And I navigate to course participants And I click on "Unenrol" "icon" in the "Gronya,Beecham" "table_row" And I click on "Unenrol" "button" in the "Unenrol" "dialogue" - And I am on "Course 1" course homepage - When I navigate to "View > Single view" in the course gradebook + When I am on the "Course 1" "grades > Single view > View" page Then I should see "Select a user above to view all their grades" in the "region-main" "region" And I should not see "Gronya,Beecham" in the "region-main" "region" diff --git a/grade/report/singleview/tests/behat/usersearch.feature b/grade/report/singleview/tests/behat/usersearch.feature index 8961ea0adc2..8dd508cecdc 100644 --- a/grade/report/singleview/tests/behat/usersearch.feature +++ b/grade/report/singleview/tests/behat/usersearch.feature @@ -16,11 +16,9 @@ Feature: Within the singleview report, a teacher can search for users. | student1 | C1 | student | | student2 | C1 | student | | student32 | C1 | student | - And I am on the "Course 1" "Course" page logged in as "teacher1" - And I change window size to "large" Scenario: A teacher can search for and find a user to view - Given I navigate to "View > Single view" in the course gradebook + Given I am on the "Course 1" "grades > Single view > View" page logged in as "teacher1" When I click on "Users" "link" in the ".page-toggler" "css_element" And I wait until the page is ready And I click on ".search-widget[data-searchtype='user']" "css_element" diff --git a/grade/report/user/tests/behat/groupsearch.feature b/grade/report/user/tests/behat/groupsearch.feature index 3bb763fd8e8..aabbd116172 100644 --- a/grade/report/user/tests/behat/groupsearch.feature +++ b/grade/report/user/tests/behat/groupsearch.feature @@ -25,14 +25,11 @@ Feature: Group searching functionality within the user report. | student1 | dg | And the "multilang" filter is "on" And the "multilang" filter applies to "content and headings" - And I am on the "C1" "Course" page logged in as "teacher1" - And I change window size to "large" + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" Scenario: A teacher can see the 'group' search widget only when group mode is enabled in the course - Given I navigate to "View > User report" in the course gradebook - And ".search-widget[data-searchtype='group']" "css_element" should exist - And I am on "Course 1" course homepage - And I navigate to "Settings" in current page administration + Given ".search-widget[data-searchtype='group']" "css_element" should exist + And I am on the "Course 1" "course editing" page And I set the following fields to these values: | id_groupmode | No groups | And I press "Save and display" @@ -40,8 +37,7 @@ Feature: Group searching functionality within the user report. Then ".search-widget[data-searchtype='group']" "css_element" should not exist Scenario: A teacher can search for and find a group to find a user in - Given I navigate to "View > User report" in the course gradebook - And I click on ".search-widget[data-searchtype='group']" "css_element" + Given I click on ".search-widget[data-searchtype='group']" "css_element" And I confirm "Tutor group" in "group" search within the gradebook widget exists And I confirm "Marker group" in "group" search within the gradebook widget exists When I set the field "Search groups" to "tutor" @@ -50,9 +46,8 @@ Feature: Group searching functionality within the user report. And I confirm "Marker group" in "group" search within the gradebook widget does not exist Scenario: A teacher can only see the group members in the 'user' search widget after selecting a group option - Given I navigate to "View > User report" in the course gradebook # Confirm that all users are initially displayed in the 'user' search widget. - And I confirm "Student 1" in "user" search within the gradebook widget exists + Given I confirm "Student 1" in "user" search within the gradebook widget exists And I confirm "Student 2" in "user" search within the gradebook widget exists # Select a particular group from the 'group' search widget. When I click on "Default group" in the "group" search widget diff --git a/grade/report/user/tests/behat/toggle_grade_categories.feature b/grade/report/user/tests/behat/toggle_grade_categories.feature index 9c24725e908..ddcd995c9e6 100644 --- a/grade/report/user/tests/behat/toggle_grade_categories.feature +++ b/grade/report/user/tests/behat/toggle_grade_categories.feature @@ -23,13 +23,11 @@ Feature: User can toggle the visibility of the grade categories within the user | activity | course | idnumber | name | intro | grade | | assign | C1 | a1 | Test assignment one | Submit something! | 300 | And the following "activities" exist: - | activity | course | idnumber | name | intro | gradecategory | grade | gradepass | - | assign | C1 | a2 | Test assignment two | Submit something! | Category 1 | 100 | 50 | - And I log in as "teacher1" - And I am on "Course" course homepage + | activity | course | idnumber | name | gradecategory | grade | gradepass | + | assign | C1 | a2 | Test assignment two | Category 1 | 100 | 50 | Scenario: A teacher can search for and find a user to view - Given I navigate to "View > User report" in the course gradebook + Given I am on the "Course" "grades > User report > View" page logged in as "teacher1" And I click on "Student 1" in the "user" search widget And I should see "Test assignment one" in the "user-grade" "table" And I should see "Test assignment two" in the "user-grade" "table" diff --git a/grade/report/user/tests/behat/user_report_navigation.feature b/grade/report/user/tests/behat/user_report_navigation.feature index 53afc34fae9..7de6c819b21 100644 --- a/grade/report/user/tests/behat/user_report_navigation.feature +++ b/grade/report/user/tests/behat/user_report_navigation.feature @@ -21,14 +21,12 @@ Feature: Teacher can navigate to the previous or next user report. | student2 | C1 | student | | student3 | C1 | student | And the following "activities" exist: - | activity | course | idnumber | name | intro | grade | - | assign | C1 | a1 | Test assignment one | Submit something! | 300 | - And I log in as "teacher1" - And I am on "Course" course homepage + | activity | course | idnumber | name | grade | + | assign | C1 | a1 | Test assignment one | 300 | + And I am on the "Course" "grades > User report > View" page logged in as "teacher1" Scenario: A teacher can navigate to the next user report - Given I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + Given I click on "Student 1" in the "user" search widget And I should see "Student 1" in the ".user-heading" "css_element" And ".previous" "css_element" should not exist in the ".user-navigation" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" @@ -46,8 +44,7 @@ Feature: Teacher can navigate to the previous or next user report. And ".next" "css_element" should not exist in the ".user-navigation" "css_element" Scenario: A teacher can navigate to the previous user report - Given I navigate to "View > User report" in the course gradebook - And I click on "Student 3" in the "user" search widget + Given I click on "Student 3" in the "user" search widget And I should see "Student 3" in the ".user-heading" "css_element" And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".previous" "css_element" diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index 162a9dbc7e1..e0ac4cbb4af 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -32,8 +32,7 @@ Feature: View the user report as the student will see it | assign | C1 | a6 | Test assignment six | Submit something! | 100 | And the "multilang" filter is "on" And the "multilang" filter applies to "content and headings" - When I am on the "C1" "Course" page logged in as "teacher1" - And I navigate to "Setup > Gradebook setup" in the course gradebook + When I am on the "C1" "grades > gradebook setup" page logged in as "teacher1" And I hide the grade item "Test assignment six" And I hide the grade item "Sub category 2" And I navigate to "View > Grader report" in the course gradebook diff --git a/grade/report/user/tests/behat/usersearch.feature b/grade/report/user/tests/behat/usersearch.feature index a726278df7c..88bbb8c97c6 100644 --- a/grade/report/user/tests/behat/usersearch.feature +++ b/grade/report/user/tests/behat/usersearch.feature @@ -16,11 +16,9 @@ Feature: Within the User report, a teacher can search for users. | student1 | C1 | student | | student2 | C1 | student | | student32 | C1 | student | - And I am on the "Course 1" "Course" page logged in as "teacher1" - And I change window size to "large" Scenario: A teacher can search for and find a user to view - Given I navigate to "View > User report" in the course gradebook + Given I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" When I click on ".search-widget[data-searchtype='user']" "css_element" Then I confirm "Student 1" in "user" search within the gradebook widget exists And I confirm "Student 2" in "user" search within the gradebook widget exists diff --git a/grade/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index f7e8a2fd7e0..f5c55379038 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -9,9 +9,7 @@ Feature: We can use the user report | Course 1 | C1 | 0 | 1 | Scenario: Verify we can view a user grade report with no users enrolled. - Given I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + When I am on the "Course 1" "grades > User report > View" page logged in as "admin" And I click on "All users (0)" in the "user" search widget Then I should see "There are no students enrolled in this course." @@ -26,20 +24,14 @@ Feature: We can use the user report | teacher1 | C1 | editingteacher | | teacher2 | C1 | editingteacher | | student1 | C1 | student | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I should see "Select a user above to view their report" in the "region-main" "region" And I click on "Student 1" in the "user" search widget And I should see "Student 1" in the "region-main" "region" - And I am on "Course 1" course homepage - When I navigate to "View > User report" in the course gradebook + When I am on the "Course 1" "grades > User report > View" page Then I should not see "Select a user above to view their report" in the "region-main" "region" And I should see "Student 1" in the "region-main" "region" - And I log out - And I log in as "teacher2" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher2" And I should see "Select a user above to view their report" in the "region-main" "region" Scenario: Teacher sees his last viewed user report if the user is a part of the the current group. @@ -59,9 +51,7 @@ Feature: We can use the user report And the following "group members" exist: | user | group | | student2 | G1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I click on "Student 2" in the "user" search widget And I navigate to "View > Grader report" in the course gradebook And I select "Group 1" from the "group" singleselect @@ -86,9 +76,7 @@ Feature: We can use the user report And the following "group members" exist: | user | group | | student2 | G1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I click on "Student 1" in the "user" search widget And I navigate to "View > Grader report" in the course gradebook And I select "Group 1" from the "group" singleselect @@ -107,9 +95,7 @@ Feature: We can use the user report | teacher1 | C1 | editingteacher | | student1 | C1 | student | | student2 | C1 | student | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I click on "Student 1" in the "user" search widget And I should see "Student 1" in the "region-main" "region" And I navigate to course participants diff --git a/grade/tests/behat/behat_grades.php b/grade/tests/behat/behat_grades.php index 16212fed070..9bba107e215 100644 --- a/grade/tests/behat/behat_grades.php +++ b/grade/tests/behat/behat_grades.php @@ -35,6 +35,8 @@ class behat_grades extends behat_base { * | [report] view | Course name | The view page for the specified course and report | * | gradebook setup | Course name | The gradebook setup page for the specified course | * | course grade settings | Course name | The grade settings page | + * | outcomes | Course name | The grade outcomes page | + * | scales | Course name | The grade scales page | * * @param string $type identifies which type of page this is - for example "Grader > View" * @param string $identifier identifies the particular page - for example "Course name" @@ -84,6 +86,16 @@ class behat_grades extends behat_base { "/grade/edit/settings/index.php", ['id' => $this->get_course_id($identifier)] ); + case 'outcomes': + return new moodle_url( + "/grade/edit/outcome/course.php", + ['id' => $this->get_course_id($identifier)] + ); + case 'scales': + return new moodle_url( + "/grade/edit/scale/index.php", + ['id' => $this->get_course_id($identifier)] + ); default: throw new \coding_exception( "Unknown page type '$type' for page identifier '$identifier'" diff --git a/grade/tests/behat/grade_UI_settings.feature b/grade/tests/behat/grade_UI_settings.feature index e609e75e828..a5a9f116a3e 100644 --- a/grade/tests/behat/grade_UI_settings.feature +++ b/grade/tests/behat/grade_UI_settings.feature @@ -17,9 +17,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI And the following "activities" exist: | activity | course | idnumber | name | intro | | assign | C1 | assign1 | Assignment1 | Assignment 1 intro | - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "admin" And I turn editing mode on @javascript @@ -29,8 +27,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI Then I navigate to "Grades > General settings" in site administration And I set the field "Show minimum grade" to "0" And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And I click on "Edit assign Assignment1" "link" And I should not see "Minimum grade" @@ -50,6 +47,5 @@ Feature: Site settings can be used to hide parts of the gradebook UI Then I navigate to "Grades > Grade category settings" in site administration And I set the field "Allow category grades to be manually overridden" to "0" And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And "tr .course input[type='text']" "css_element" should not exist diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index 79c028e4dc7..931add8d5fb 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -39,21 +39,18 @@ Feature: We can use calculated grade totals And I log in as "admin" And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment one & | student1 | 60.00 | + | Test assignment two | student1 | 20.00 | + | Test assignment three | student1 | 40.00 | + | Test assignment five | student1 | 10.00 | + | Test assignment six | student1 | 5.00 | + | Test assignment eight | student1 | 10.00 | + | Test assignment nine | student1 | 5.00 | + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I change window size to "large" - And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one &" - And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two" - And I give the grade "40.00" to the user "Student 1" for the grade item "Test assignment three" - And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment five" - And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment six" - And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment eight" - And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment nine" - And I press "Save changes" - And I change window size to "large" And I set the following settings for grade item "Test assignment two": | Hidden | 1 | And I set the following settings for grade item "Test assignment five": @@ -264,22 +261,16 @@ Feature: We can use calculated grade totals Then I should see "114.82 (18.27 %)" in the "overview-grade" "table" And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I set the following settings for grade item "Test outcome item one": - | Extra credit | 1 | + | Extra credit | 1 | And I log out And I log in as "student1" And I follow "Grades" in the user menu Then I should see "114.00 (18.39 %)" in the "overview-grade" "table" And I click on "Course 1" "link" in the "region-main" "region" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I set the following settings for grade item "Course 1": | Aggregation | Natural | | Include outcomes in aggregation | 0 | @@ -380,10 +371,7 @@ Feature: We can use calculated grade totals | Test assignment four | 30.93 % | - | 0–150 | 0.00 % | Scenario: Natural aggregation with drop lowest - When I log out - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + When I am on the "Course 1" "grades > Grader report > View" page logged in as "admin" And I turn editing mode on And I set the following settings for grade item "Sub category 1": | Aggregation | Natural | diff --git a/grade/tests/behat/grade_aggregation_changes.feature b/grade/tests/behat/grade_aggregation_changes.feature index 1feab4147d5..33827f97ac3 100644 --- a/grade/tests/behat/grade_aggregation_changes.feature +++ b/grade/tests/behat/grade_aggregation_changes.feature @@ -34,8 +34,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit And I change window size to "large" And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I follow "Edit Cat mean" And I set the following fields to these values: diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index 79136ec40de..8189e1d2ecf 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -18,9 +18,7 @@ Feature: Calculated grade items can be used in the gradebook | teacher1 | C1 | editingteacher | | student1 | C1 | student | | student2 | C1 | student | - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" @javascript Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed diff --git a/grade/tests/behat/grade_calculated_grade_items_20150627.feature b/grade/tests/behat/grade_calculated_grade_items_20150627.feature index 6437d519458..3da21b61dca 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -19,9 +19,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | teacher1 | C1 | editingteacher | | student1 | C1 | student | | student2 | C1 | student | - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" @javascript Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed diff --git a/grade/tests/behat/grade_calculated_weights.feature b/grade/tests/behat/grade_calculated_weights.feature index 18eae783b7c..61447f3505c 100644 --- a/grade/tests/behat/grade_calculated_weights.feature +++ b/grade/tests/behat/grade_calculated_weights.feature @@ -29,10 +29,7 @@ Feature: We can understand the gradebook user report And I log in as "admin" And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as teacher1 And I turn editing mode on And I give the grade "60.00" to the user "Student 1" for the grade item "EN Test assignment one" And I give the grade "20.00" to the user "Student 1" for the grade item "EN Test assignment two" diff --git a/grade/tests/behat/grade_category_validation.feature b/grade/tests/behat/grade_category_validation.feature index e27b702f9c3..c550e753fbd 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -16,41 +16,22 @@ Feature: Editing a grade item | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | + And the following "scales" exist: + | name | scale | + | ENFR ABCDEF | F,E,D,C,B,A | + | ENFR Letter scale | Disappointing, Good, Very good, Excellent | + And the following "grade categories" exist: + | fullname | course | aggregation | + | ENFR Cat 1 | C1 | 6 | + And the following "grade items" exist: + | itemname | course | category | + | ENFR Item 1 | C1 | ENFR Cat 1 | + | ENFR Item 2 | C1 | ENFR Cat 1 | + And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" And I log in as "admin" And the "multilang" filter is "on" And the "multilang" filter applies to "content and headings" - And I navigate to "Grades > Scales" in site administration - And I press "Add a new scale" - And I set the following fields to these values: - | Name | ENFR ABCDEF | - | Scale | F,E,D,C,B,A | - And I press "Save changes" - And I press "Add a new scale" - And I set the following fields to these values: - | Name | ENFR Letter scale | - | Scale | Disappointing, Good, Very good, Excellent | - And I press "Save changes" - And I set the following administration settings values: - | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook - And I press "Add category" - And I set the following fields to these values: - | Category name | ENFR Cat 1 | - | Aggregation | Highest grade | - And I press "Save changes" - And I press "Add grade item" - And I set the following fields to these values: - | Item name | ENFR Item 1 | - | Grade category | EN Cat 1 | - And I press "Save changes" - And I press "Add grade item" - And I set the following fields to these values: - | Item name | ENFR Item 2 | - | Grade category | EN Cat 1 | - And I press "Save changes" + And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades When I open the action menu in "EN Cat 1" "table_row" diff --git a/grade/tests/behat/grade_contribution_with_extra_credit.feature b/grade/tests/behat/grade_contribution_with_extra_credit.feature index 6998bbe42ff..17dfd092453 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -19,8 +19,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I log in as "admin" And I set the following administration settings values: | grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural | - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page And I press "Add grade item" And I set the following fields to these values: | Item name | Manual item 1 | @@ -42,10 +41,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I set the field "Show weighting" to "Show" And I set the field "Show contribution to course total" to "Show" And I press "Save changes" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2" diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index 61ec6baad59..91e8a6e067e 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -19,9 +19,7 @@ Feature: We can change the maximum and minimum number of points for manual items | teacher1 | C1 | editingteacher | | student1 | C1 | student | | student2 | C1 | student | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I press "Add grade item" And I set the following fields to these values: | Item name | Manual item 1 | @@ -34,8 +32,7 @@ Feature: We can change the maximum and minimum number of points for manual items And I press "Save changes" Scenario: Change maximum number of points on a graded item. - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + Given I am on the "Course 1" "grades > Grader report > View" page And I turn editing mode on And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index 35aa047654a..1cc7384821f 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -29,8 +29,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I log in as "admin" And the "multilang" filter is "on" And the "multilang" filter applies to "content and headings" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page And I press "Add grade item" And I set the following fields to these values: | Item name | calculated | @@ -42,10 +41,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I navigate to "Grades > Report settings > User report" in site administration And I set the field "s__grade_report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" And I press "Save changes" - When I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + When I am on the "Course 1" "grades > Grader report > View" page logged in as teacher1 And I turn editing mode on And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one" And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three" @@ -53,8 +49,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I set the following settings for grade item "Test assignment four": | Hidden | 1 | And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page And I click on "Student 1" in the "user" search widget And I set the field "View report as" to "Myself" Then the following should exist in the "user-grade" table: @@ -63,10 +58,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when | Test assignment two | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | | Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | | Course total | - | 100.00 | 0–200 | 50.00 % | - | - When I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + When I am on the "Course 1" "grades > User report > View" page logged in as student1 Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | diff --git a/grade/tests/behat/grade_hidden_items_locked_category.feature b/grade/tests/behat/grade_hidden_items_locked_category.feature index 264c7378880..80b66e2bfba 100644 --- a/grade/tests/behat/grade_hidden_items_locked_category.feature +++ b/grade/tests/behat/grade_hidden_items_locked_category.feature @@ -17,9 +17,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "admin" And I press "Add category" And I set the following fields to these values: | Category name | Test locked category | @@ -30,23 +28,16 @@ Feature: Hidden grade items should be hidden when grade category is locked, but | Hidden | 1 | | Grade category | Test locked category | And I press "Save changes" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "50.00" to the user "Student 1" for the grade item "Hidden item" And I press "Save changes" And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "Test locked category": | Locked | 1 | - And I press "Save changes" - And I log out Scenario: Hidden grade items in locked category is hidden for teacher - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + Given I am on the "Course 1" "grades > User report > View" page logged in as teacher1 And I click on "Student 1" in the "user" search widget When I set the field "View report as" to "Myself" Then the following should exist in the "user-grade" table: @@ -55,9 +46,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but | Course total | - | 50.00 | 0–100 | 50.00 % | - | Scenario: Hidden grade items in locked category is hidden for student - Given I log in as "student1" - And I am on "Course 1" course homepage - When I navigate to "User report" in the course gradebook + When I am on the "Course 1" "grades > User report > View" page logged in as student1 Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test locked category total | 100.00 % | - | 0–100 | - | - | @@ -65,9 +54,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but And I should not see "Hidden item" Scenario: Hidden grade items in overridden category should show - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + Given I am on the "Course 1" "grades > gradebook setup" page And I press "Add category" And I set the following fields to these values: | Category name | Test overridden category B| @@ -81,10 +68,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but And I turn editing mode on And I give the grade "50.00" to the user "Student 1" for the grade item "Test overridden category B total" And I press "Save changes" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test locked category total | 50.00 % | - | 0–100 | - | - | diff --git a/grade/tests/behat/grade_item_duplication.feature b/grade/tests/behat/grade_item_duplication.feature index 0a132ee5a67..2a34779590d 100644 --- a/grade/tests/behat/grade_item_duplication.feature +++ b/grade/tests/behat/grade_item_duplication.feature @@ -25,9 +25,7 @@ Feature: We can duplicate grade items that already exist. | Item1 | C1 | Category1 | 001 | Value | 80.00 | 5.00 | 40.00 | 1 | 1 | 0 | 1 | Scenario: Ensure the duplicated grade item settings match the original grade item - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + Given I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I should not see "Duplicate Category1" And I should not see "Duplicate Assignment1" When I duplicate the grade item "Item1" diff --git a/grade/tests/behat/grade_item_form_unhide.feature b/grade/tests/behat/grade_item_form_unhide.feature index f0bc5515791..cbe4ac3f58b 100644 --- a/grade/tests/behat/grade_item_form_unhide.feature +++ b/grade/tests/behat/grade_item_form_unhide.feature @@ -26,28 +26,19 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th | Grade out of 100 | 50 | | Feedback comments | I'm the teacher feedback | And I press "Save changes" - And I am on "Course 1" course homepage - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should see "50.00" And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" @javascript Scenario: Hiding the activity using the drop-down hide link and then unhiding the activity using the edit settings form page Given I click on "Edit" "link" in the "Test assignment name" "table_row" And I click on "Hide" "link" in the "Test assignment name" "table_row" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should not see "50.00" And I should not see "I'm the teacher feedback" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I click on "Edit" "link" in the "Test assignment name" "table_row" And I click on "Edit settings" "link" in the "Test assignment name" "table_row" And the field "Hidden" matches value "1" @@ -68,13 +59,9 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should not see "50.00" And I should not see "I'm the teacher feedback" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I click on "Edit" "link" in the "Test assignment name" "table_row" And I click on "Show" "link" in the "Test assignment name" "table_row" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 Then I should see "50.00" And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row" @@ -83,20 +70,15 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th Scenario: Hiding the category using the drop-down hide link and then unhiding the category using the edit settings form page Given I click on "Edit" "link" in the "Course 1" "table_row" And I click on "Hide" "link" in the "Course 1" "table_row" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should not see "50.00" And I should not see "I'm the teacher feedback" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I click on "Edit" "link" in the "Course 1" "table_row" And I click on "Edit settings" "link" in the "Course 1" "table_row" And the field "Hidden" matches value "1" And I set the field "Hidden" to "0" And I press "Save changes" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 Then I should see "50.00" And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row" @@ -107,17 +89,12 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th And I click on "Edit settings" "link" in the "Course 1" "table_row" And I set the field "Hidden" to "1" And I press "Save changes" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should not see "50.00" And I should not see "I'm the teacher feedback" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I click on "Edit" "link" in the "Course 1" "table_row" And I click on "Show" "link" in the "Course 1" "table_row" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 Then I should see "50.00" And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row" diff --git a/grade/tests/behat/grade_item_validation.feature b/grade/tests/behat/grade_item_validation.feature index 6faff35f514..a751e695ac0 100644 --- a/grade/tests/behat/grade_item_validation.feature +++ b/grade/tests/behat/grade_item_validation.feature @@ -30,8 +30,7 @@ Feature: Grade item validation | Name | ENFR Letter scale | | Scale | Disappointing, Good, Very good, Excellent | And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page And I press "Add grade item" And I set the following fields to these values: | Item name | ENFR MI 1 | diff --git a/grade/tests/behat/grade_letter_boundary.feature b/grade/tests/behat/grade_letter_boundary.feature index 7cac1e3beb9..cf1248ff7b9 100644 --- a/grade/tests/behat/grade_letter_boundary.feature +++ b/grade/tests/behat/grade_letter_boundary.feature @@ -20,9 +20,7 @@ Feature: We can customise the letter boundary of a course. And the following "activities" exist: | activity | course | idnumber | name | intro | grade | | assign | C1 | a1 | Test assignment one | Submit something! | 100 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Course grade settings" in the course gradebook + And I am on the "Course 1" "grades > course grade settings" page logged in as "teacher1" And I set the following fields to these values: | Grade display type | Letter | And I press "Save changes" diff --git a/grade/tests/behat/grade_letter_boundary_20160518.feature b/grade/tests/behat/grade_letter_boundary_20160518.feature index 9db235dc21e..ae25656003c 100644 --- a/grade/tests/behat/grade_letter_boundary_20160518.feature +++ b/grade/tests/behat/grade_letter_boundary_20160518.feature @@ -21,9 +21,7 @@ Feature: We can customise the letter boundary of a course in gradebook version 2 And the following "activities" exist: | activity | course | idnumber | name | intro | grade | | assign | C1 | a1 | Test assignment one | Submit something! | 100 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Course grade settings" in the course gradebook + And I am on the "Course 1" "grades > course grade settings" page logged in as "teacher1" And I set the following fields to these values: | Grade display type | Letter | And I press "Save changes" diff --git a/grade/tests/behat/grade_letter_logging.feature b/grade/tests/behat/grade_letter_logging.feature index 7d7426227ca..2e1d431fd48 100644 --- a/grade/tests/behat/grade_letter_logging.feature +++ b/grade/tests/behat/grade_letter_logging.feature @@ -8,9 +8,7 @@ Feature: We can view the logs for any changes to grade letters. Given the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | - And I log in as "admin" - And I am on "Course 1" course homepage - And I navigate to "Setup > Course grade settings" in the course gradebook + And I am on the "Course 1" "grades > course grade settings" page logged in as "admin" And I set the following fields to these values: | Grade display type | Letter | And I press "Save changes" diff --git a/grade/tests/behat/grade_mingrade.feature b/grade/tests/behat/grade_mingrade.feature index 5fdd5f4038a..b6007dc77d3 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -25,8 +25,7 @@ Feature: We can use a minimum grade different than zero And I log in as "admin" And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page And I press "Add grade item" And I set the following fields to these values: | Item name | Manual item 1 | @@ -81,10 +80,7 @@ Feature: We can use a minimum grade different than zero And I set the following settings for grade item "Course 1": | Aggregation | Natural | | Exclude empty grades | 0 | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 2" diff --git a/grade/tests/behat/grade_minmax.feature b/grade/tests/behat/grade_minmax.feature index 6d3be2f3e49..d1f991784f3 100644 --- a/grade/tests/behat/grade_minmax.feature +++ b/grade/tests/behat/grade_minmax.feature @@ -24,8 +24,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. And I log in as "admin" And I set the following administration settings values: | grade_minmaxtouse | Min and max grades as specified in grade item settings | - And I am on "C1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "C1" "grades > gradebook setup" page And I press "Add grade item" And I set the following fields to these values: | Item name | MI 1 | @@ -63,10 +62,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. And I navigate to "Setup > Gradebook setup" in the course gradebook And I set the following settings for grade item "CAT1": | Aggregation | Natural | - And I log out - And I log in as "teacher1" - And I am on "C1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "C1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1" And I give the grade "25.00" to the user "Student 1" for the grade item "MI 2" diff --git a/grade/tests/behat/grade_natural_exclude_empty.feature b/grade/tests/behat/grade_natural_exclude_empty.feature index 0304ca87eac..885baac0014 100644 --- a/grade/tests/behat/grade_natural_exclude_empty.feature +++ b/grade/tests/behat/grade_natural_exclude_empty.feature @@ -23,9 +23,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f | assign | C1 | a3 | Test assignment three | x | 200 | | assign | C1 | a4 | Test assignment four (extra) | x | 20 | | assign | C1 | a5 | Test assignment five (extra) | x | 10 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | And I set the following settings for grade item "Test assignment five (extra)": diff --git a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature index 039e3951695..91a441f4912 100644 --- a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature +++ b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature @@ -24,9 +24,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 | assign | C1 | a3 | Test assignment three | x | 200 | | assign | C1 | a4 | Test assignment four (extra) | x | 20 | | assign | C1 | a5 | Test assignment five (extra) | x | 10 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" And I set the following settings for grade item "Test assignment four (extra)": | Extra credit | 1 | And I set the following settings for grade item "Test assignment five (extra)": diff --git a/grade/tests/behat/grade_natural_normalisation.feature b/grade/tests/behat/grade_natural_normalisation.feature index e45982bfc16..4325c3ba421 100644 --- a/grade/tests/behat/grade_natural_normalisation.feature +++ b/grade/tests/behat/grade_natural_normalisation.feature @@ -32,9 +32,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota | assign | C1 | a7 | Test assignment seven | Submit nothing! | ENFR Sub category 1 | 15 | And the "multilang" filter is "on" And the "multilang" filter applies to "content and headings" - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" @javascript Scenario: Setting all weights in a category to exactly one hundred in total. diff --git a/grade/tests/behat/grade_natural_normalisation_20150619.feature b/grade/tests/behat/grade_natural_normalisation_20150619.feature index 887a5c0000e..f853db7ee7d 100644 --- a/grade/tests/behat/grade_natural_normalisation_20150619.feature +++ b/grade/tests/behat/grade_natural_normalisation_20150619.feature @@ -31,9 +31,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix | assign | C1 | a5 | Test assignment five | Submit something! | Sub category 1 | 20 | | assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 | | assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "Setup > Gradebook setup" in the course gradebook + And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1" @javascript Scenario: Grade items weights are normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set to zero (before the fix 20150619). diff --git a/grade/tests/behat/grade_regrade_do_not_override.feature b/grade/tests/behat/grade_regrade_do_not_override.feature index 946919cec58..a6f69fec048 100644 --- a/grade/tests/behat/grade_regrade_do_not_override.feature +++ b/grade/tests/behat/grade_regrade_do_not_override.feature @@ -30,8 +30,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden And I press "Save and show next" And I set the field "Grade out of 100" to "60" And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page And the following should exist in the "gradereport-grader-table" table: | | | | | First name / Last name | Assignment 1 | Course total | @@ -40,7 +39,6 @@ Feature: Regrading grades does not unnecessarily mark some as overriden And I turn editing mode on And I give the grade "80.00" to the user "Student 2" for the grade item "Course total" And I press "Save changes" - And I navigate to "View > Grader report" in the course gradebook And I navigate to "Setup > Gradebook setup" in the course gradebook And I click on "Edit" "link" in the ".coursecategory" "css_element" And I click on "Edit settings" "link" in the ".coursecategory" "css_element" @@ -64,8 +62,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden And I press "Save and show next" And I set the field "Grade out of 100" to "70" And I press "Save changes" - When I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + When I am on the "Course 1" "grades > Grader report > View" page Then the following should exist in the "gradereport-grader-table" table: | | | | | First name / Last name | Assignment 1 | Course total | diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index 05c27b186e8..55be3b23aaf 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -34,12 +34,9 @@ Feature: Control the aggregation of the scales | Scale me | C1 | Letterscale | And the following config values are set as admin: | grade_includescalesinaggregation | 0 | - And I log out Scenario Outline: Scales can be excluded from aggregation - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on When I give the grade "10" to the user "Student 1" for the grade item "Grade me" And I give the grade "B" to the user "Student 1" for the grade item "Scale me" @@ -57,10 +54,7 @@ Feature: Control the aggregation of the scales And I log in as "admin" And I set the following administration settings values: | grade_includescalesinaggregation | 1 | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I click on "Student 1" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | Contribution to course total | @@ -81,9 +75,7 @@ Feature: Control the aggregation of the scales | Mode of grades | Mode of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % | Scenario: Weights of scales cannot be edited when they are not aggregated - Given I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on When I set the following settings for grade item "Course 1": | Aggregation | Natural | diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index e1d0112fc7b..52351560f51 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -48,8 +48,7 @@ Feature: View gradebook when single item scales are used And I click on "Grade" "link" in the "Student 1" "table_row" And I set the field "Grade" to "A" And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "Setup > Course grade settings" in the course gradebook + When I am on the "Course 1" "grades > course grade settings" page And I set the field "Show weightings" to "Show" And I set the field "Show contribution to course total" to "Show" And I press "Save changes" diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index ec74521b2e8..7547da96f61 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -18,31 +18,13 @@ Feature: We can enter in grades and view reports from the gradebook | teacher1 | C1 | editingteacher | | student1 | C1 | student | And the following "activities" exist: - | activity | name | intro | course | section | idnumber | - | assign | Test assignment name 1 | Submit your online text | C1 | 1 | assign1 | - | assign | Test assignment name 2 | Submit your online text | C1 | 1 | assign2 | + | activity | name | course | idnumber | assignsubmission_onlinetext_enabled | + | assign | Test assignment name 1 | C1 | assign1 | 1 | + | assign | Test assignment name 2 | C1 | assign2 | 1 | And I log in as "admin" And I set the following administration settings values: | grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural | - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I follow "Test assignment name 1" - And I navigate to "Settings" in current page administration - And I set the following fields to these values: - | Description | Submit your online text | - | assignsubmission_onlinetext_enabled | 1 | - And I press "Save and return to course" - And I follow "Test assignment name 2" - And I navigate to "Settings" in current page administration - And I set the following fields to these values: - | Description | Submit your online text | - | assignsubmission_onlinetext_enabled | 1 | - And I press "Save and return to course" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I follow "Test assignment name 1" + And I am on the "Test assignment name 1" "assign activity" page logged in as student1 When I press "Add submission" And I set the following fields to these values: | Online text | This is a submission for assignment 1 | @@ -50,8 +32,7 @@ Feature: We can enter in grades and view reports from the gradebook And I press "Submit assignment" And I press "Continue" Then I should see "Submitted for grading" - And I am on "Course 1" course homepage - And I follow "Test assignment name 2" + And I am on the "Test assignment name 2" "assign activity" page When I press "Add submission" And I set the following fields to these values: | Online text | This is a submission for assignment 2 | @@ -59,10 +40,7 @@ Feature: We can enter in grades and view reports from the gradebook And I press "Submit assignment" And I press "Continue" Then I should see "Submitted for grading" - And I log out - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1" And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2" diff --git a/lib/tests/behat/switch_editing_mode.feature b/lib/tests/behat/switch_editing_mode.feature index d8df9d44d55..7cd3e3dd7df 100644 --- a/lib/tests/behat/switch_editing_mode.feature +++ b/lib/tests/behat/switch_editing_mode.feature @@ -23,9 +23,7 @@ Feature: Turn editing mode on Given the following "activities" exist: | activity | course | idnumber | name | intro | | assign | C1 | assign1 | Test Assignment 1 | Test Assignment 1 | - And I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And "Edit assign Test Assignment 1" "link" should exist And I turn editing mode off diff --git a/mod/assign/tests/behat/bulk_release_anon_submissions.feature b/mod/assign/tests/behat/bulk_release_anon_submissions.feature index af8c9469385..51944e67fb9 100644 --- a/mod/assign/tests/behat/bulk_release_anon_submissions.feature +++ b/mod/assign/tests/behat/bulk_release_anon_submissions.feature @@ -24,7 +24,6 @@ Feature: Bulk released grades should not be sent to gradebook while submissions | activity | assign | | course | C1 | | name | Test assignment name | - | intro | Test assignment description | | assignsubmission_onlinetext_enabled | 1 | | assignsubmission_file_enabled | 0 | | markingworkflow | 1 | @@ -39,7 +38,6 @@ Feature: Bulk released grades should not be sent to gradebook while submissions And I set the following fields to these values: | Online text | I'm student1's submission | And I press "Save changes" - And I log out # Add another submission. And I am on the "Test assignment name" "assign activity" page logged in as "student2" Then I should not see "Feedback" @@ -48,7 +46,6 @@ Feature: Bulk released grades should not be sent to gradebook while submissions And I set the following fields to these values: | Online text | I'm student2's submission | And I press "Save changes" - And I log out # Mark the submissions. And I am on the "Test assignment name" "assign activity" page logged in as "teacher1" And I follow "View all submissions" @@ -87,35 +84,22 @@ Feature: Bulk released grades should not be sent to gradebook while submissions And I follow "View all submissions" Then I should see "Released" in the "I'm student1's submission" "table_row" And I should see "Released" in the "I'm student2's submission" "table_row" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then I should not see "50" And I should not see "Great job!" - And I log out - And I log in as "student2" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student2" Then I should not see "50" And I should not see "Great job!" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as "teacher1" And I follow "View all submissions" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" Then I should see "Released" in the "Student 1" "table_row" And I should see "Released" in the "Student 2" "table_row" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then I should see "50" And I should see "Great job!" - And I log out - And I log in as "student2" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student2" Then I should see "50" And I should see "Great job!" @@ -135,15 +119,9 @@ Feature: Bulk released grades should not be sent to gradebook while submissions And I follow "View all submissions" Then I should see "Released" in the "Student 1" "table_row" And I should see "Released" in the "Student 2" "table_row" - And I log out - And I log in as "student1" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then I should see "50" And I should see "Great job!" - And I log out - And I log in as "student2" - And I am on "Course 1" course homepage - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student2" Then I should see "50" And I should see "Great job!" diff --git a/mod/assign/tests/behat/outcome_grading.feature b/mod/assign/tests/behat/outcome_grading.feature index 29ba2438496..7ad077fa17e 100644 --- a/mod/assign/tests/behat/outcome_grading.feature +++ b/mod/assign/tests/behat/outcome_grading.feature @@ -20,22 +20,13 @@ Feature: Outcome grading | student1 | C1 | student | And the following config values are set as admin: | enableoutcomes | 1 | - And I log in as "admin" - And I navigate to "Grades > Scales" in site administration - And I press "Add a new scale" - And I set the following fields to these values: - | Name | Test Scale | - | Scale | Disappointing, Excellent, Good, Very good, Excellent | - And I press "Save changes" - And I navigate to "Grades > Outcomes" in site administration - And I press "Add a new outcome" - And I set the following fields to these values: - | Full name | Outcome Test | - | Short name | OT | - | Scale | Test Scale | - And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "More > Outcomes" in the course gradebook + And the following "scales" exist: + | name | scale | + | Test Scale | Disappointing, Excellent, Good, Very good, Excellent | + And the following "grade outcomes" exist: + | fullname | shortname | scale | + | Outcome Test | OT | Test Scale | + And I am on the "Course 1" "grades > outcomes" page logged in as admin And I set the field "Available standard outcomes" to "Outcome Test" And I click on "#add" "css_element" And I log out @@ -49,13 +40,11 @@ Feature: Outcome grading | Description | Test assignment description | | assignsubmission_onlinetext_enabled | 1 | | Outcome Test | 1 | - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I press "Add submission" And I set the following fields to these values: | Online text | My online text | And I press "Save changes" - And I log out When I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I click on "Grade" "link" in the "Student 0" "table_row" @@ -92,13 +81,11 @@ Feature: Outcome grading | Students submit in groups | Yes | | Group mode | No groups | | Outcome Test | 1 | - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I press "Add submission" And I set the following fields to these values: | Online text | My online text | And I press "Save changes" - And I log out When I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I click on "Grade" "link" in the "Student 0" "table_row" diff --git a/mod/assign/tests/behat/quickgrading.feature b/mod/assign/tests/behat/quickgrading.feature index d11788ca5ce..bb6bd36a7be 100644 --- a/mod/assign/tests/behat/quickgrading.feature +++ b/mod/assign/tests/behat/quickgrading.feature @@ -52,9 +52,7 @@ Feature: In an assignment, teachers grade multiple students on one page | student2 | C1 | student | And the following config values are set as admin: | enableoutcomes | 1 | - When I log in as "teacher1" - And I am on "Course 1" course homepage - And I navigate to "More > Outcomes" in the course gradebook + When I am on the "Course 1" "grades > outcomes" page logged in as teacher1 And I press "Manage outcomes" And I press "Add a new outcome" And I follow "Add a new scale" @@ -62,8 +60,7 @@ Feature: In an assignment, teachers grade multiple students on one page | Name | 1337dom scale | | Scale | Noob, Nub, 1337, HaXor | And I press "Save changes" - And I am on "Course 1" course homepage - And I navigate to "More > Outcomes" in the course gradebook + And I am on the "Course 1" "grades > outcomes" page And I press "Manage outcomes" And I press "Add a new outcome" And I set the following fields to these values: @@ -78,19 +75,16 @@ Feature: In an assignment, teachers grade multiple students on one page | assignsubmission_onlinetext_enabled | 1 | | assignsubmission_file_enabled | 0 | | M8d skillZ! | 1 | - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I press "Add submission" And I set the following fields to these values: | Online text | I'm the student1 submission | And I press "Save changes" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student2 When I press "Add submission" And I set the following fields to these values: | Online text | I'm the student2 submission | And I press "Save changes" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I click on "Grade" "link" in the "Student 1" "table_row" @@ -105,21 +99,18 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Save all quick grading changes" And I should see "The grade changes were saved" And I press "Continue" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should see "I'm the teacher first feedback" And I should see "60.0" And I follow "Grades" in the user menu And I click on "Course 1" "link" in the "region-main" "region" And I should see "1337" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student2 And I should not see "I'm the teacher first feedback" And I should not see "60.0" And I follow "Grades" in the user menu And I click on "Course 1" "link" in the "region-main" "region" And I should not see "1337" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as teacher1 And I follow "View all submissions" And I click on "Hide User picture" "link" @@ -138,14 +129,12 @@ Feature: In an assignment, teachers grade multiple students on one page And I press "Save all quick grading changes" And I should see "The grade changes were saved" And I press "Continue" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student1 And I should see "I'm the teacher first feedback" And I should see "60.0" And I follow "Grades" in the user menu And I click on "Course 1" "link" in the "region-main" "region" And I should see "1337" - And I log out And I am on the "Test assignment name" "assign activity" page logged in as student2 And I should not see "I'm the teacher first feedback" And I should not see "60.0" diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index e46a4c0ca52..450ea075df1 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -60,10 +60,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I should see "Released" in the "I'm the student's first submission" "table_row" And I set the field "Grading action" to "Reveal student identities" And I press "Continue" - And I log out - - And I am on the "C1" Course page logged in as student1 - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then I should see "50" And I should see "Great job! Lol, not really." @@ -82,10 +79,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I press "Save changes" And I follow "View all submissions" And I should see "Released" in the "Student 1" "table_row" - And I log out - - And I am on the "C1" Course page logged in as student1 - And I navigate to "User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "student1" Then I should see "50" And I should see "Great job! Lol, not really." diff --git a/mod/h5pactivity/tests/behat/sending_attempt.feature b/mod/h5pactivity/tests/behat/sending_attempt.feature index a1b0f30c563..fb745091ea4 100644 --- a/mod/h5pactivity/tests/behat/sending_attempt.feature +++ b/mod/h5pactivity/tests/behat/sending_attempt.feature @@ -41,7 +41,6 @@ Feature: Do a H5P attempt And I click on "Correct one" "text" in the ".h5p-question-content" "css_element" And I click on "Check" "button" in the ".h5p-question-buttons" "css_element" And I switch to the main frame - And I log out And I am on the "Course 1" course page logged in as teacher1 And I navigate to course participants And I follow "Student 1" @@ -83,8 +82,7 @@ Feature: Do a H5P attempt And "2" row "Score" column of "table" table should contain "1" And "3" row "Score" column of "table" table should contain "0" And "4" row "Score" column of "table" table should contain "1" - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > User report" in the course gradebook + And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I click on "Student 1" in the "user" search widget Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | diff --git a/mod/lti/tests/behat/lti_activity_completion.feature b/mod/lti/tests/behat/lti_activity_completion.feature index 46f34547775..fbdf3a7db52 100644 --- a/mod/lti/tests/behat/lti_activity_completion.feature +++ b/mod/lti/tests/behat/lti_activity_completion.feature @@ -30,8 +30,7 @@ Feature: View activity completion information in the LTI activity Given I am on the "Music history" "lti activity" page logged in as student1 And the "View" completion condition of "Music history" is displayed as "done" And the "Receive a grade" completion condition of "Music history" is displayed as "todo" - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "90.00" to the user "Vinnie Student1" for the grade item "Music history" And I press "Save changes" diff --git a/mod/lti/tests/behat/lti_completion_pass_grade.feature b/mod/lti/tests/behat/lti_completion_pass_grade.feature index bf4b65c1745..4c410e20169 100644 --- a/mod/lti/tests/behat/lti_completion_pass_grade.feature +++ b/mod/lti/tests/behat/lti_completion_pass_grade.feature @@ -33,8 +33,7 @@ Feature: Pass grade activity completion information in the LTI activity And the "View" completion condition of "Music history" is displayed as "done" And the "Receive a grade" completion condition of "Music history" is displayed as "todo" And the "Receive a passing grade" completion condition of "Music history" is displayed as "todo" - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook + And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1" And I turn editing mode on And I give the grade "90.00" to the user "Vinnie Student1" for the grade item "Music history" And I give the grade "20.00" to the user "Vinnie Student2" for the grade item "Music history" diff --git a/user/tests/behat/user_grade_navigation.feature b/user/tests/behat/user_grade_navigation.feature index 83036308a5c..77f19ec37b8 100644 --- a/user/tests/behat/user_grade_navigation.feature +++ b/user/tests/behat/user_grade_navigation.feature @@ -22,18 +22,15 @@ Feature: The student can navigate to their grades page and user grade report. | teacher1 | C1 | editingteacher | | student1 | C2 | student | And the following "activities" exist: - | activity | course | idnumber | name | intro | grade | - | assign | C1 | a1 | Test assignment one | Submit something! | 300 | - | assign | C1 | a2 | Test assignment two | Submit something! | 100 | - | assign | C1 | a3 | Test assignment three | Submit something! | 150 | - | assign | C2 | a4 | Test assignment four | Submit something! | 150 | - And I am on the "Course 1" course page logged in as teacher1 - And I navigate to "View > Grader report" in the course gradebook - And I turn editing mode on - And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment one" - And I give the grade "67.00" to the user "Student 1" for the grade item "Test assignment two" - And I press "Save changes" - And I log out + | activity | course | idnumber | name | grade | + | assign | C1 | a1 | Test assignment one | 300 | + | assign | C1 | a2 | Test assignment two | 100 | + | assign | C1 | a3 | Test assignment three | 150 | + | assign | C2 | a4 | Test assignment four | 150 | + And the following "grade grades" exist: + | gradeitem | user | grade | + | Test assignment one | student1 | 150.00 | + | Test assignment two | student1 | 67.00 | Scenario: Navigation to Grades and the user grade report. When I log in as "student1"