From 5017f192ba58f06dfe10e4f948408de610f8d26d Mon Sep 17 00:00:00 2001 From: Angelia Dela Cruz Date: Wed, 12 Jul 2023 15:00:31 +0800 Subject: [PATCH] MDL-78684 Behat: Replace gradebook navigation to use page resolvers This commit also does other things such as: - Replace manual steps to setup gradebook by data generators - Added support for outcomes and scales page resolvers - Behat clean up --- .../behat/tests/behat/data_generators.feature | 41 +++++----------- .../tests/behat/backup_user_data.feature | 5 +- .../tests/behat/addblockinactivity.feature | 16 +++--- .../behat/highscoreswithoutgroups.feature | 15 +++--- .../tests/behat/highscoreswithscales.feature | 18 ++----- .../highscoreswithscalesandgroups.feature | 36 +++++--------- .../highscoreswithseperategroups.feature | 46 ++++++----------- .../behat/highscoreswithvisiblegroups.feature | 12 ++--- .../behat/lowscoreswithoutgroups.feature | 17 +++---- .../tests/behat/lowscoreswithscales.feature | 19 +++---- .../lowscoreswithscalesandgroups.feature | 35 ++++--------- .../behat/lowscoreswithseperategroups.feature | 49 +++++++------------ .../behat/lowscoreswithvisiblegroups.feature | 35 ++++--------- .../activity_completion_criteria.feature | 10 +--- .../enable_completion_on_pass_grade.feature | 18 ++----- ...nable_completion_on_view_and_grade.feature | 34 ++++--------- ...tion_criteria_gradeitem_visibility.feature | 42 ++++------------ grade/export/txt/tests/behat/export.feature | 10 ++-- grade/export/xml/tests/behat/export.feature | 16 +++--- .../grader/tests/behat/switch_views.feature | 3 +- .../tests/behat/basic_functionality.feature | 15 ++---- .../singleview/tests/behat/singleview.feature | 14 ++---- .../report/user/tests/behat/user_view.feature | 4 +- .../user/tests/behat/view_usereport.feature | 8 ++- grade/tests/behat/behat_grades.php | 12 +++++ grade/tests/behat/grade_UI_settings.feature | 10 ++-- grade/tests/behat/grade_aggregation.feature | 44 ++++++----------- .../behat/grade_aggregation_changes.feature | 3 +- .../grade_calculated_grade_items.feature | 4 +- ...de_calculated_grade_items_20150627.feature | 4 +- .../behat/grade_calculated_weights.feature | 5 +- .../behat/grade_category_validation.feature | 44 +++++------------ ...ade_contribution_with_extra_credit.feature | 8 +-- .../behat/grade_grade_minmax_change.feature | 7 +-- grade/tests/behat/grade_hidden_items.feature | 16 ++---- ...grade_hidden_items_locked_category.feature | 28 +++-------- .../behat/grade_item_duplication.feature | 4 +- .../behat/grade_item_form_unhide.feature | 33 ++----------- .../tests/behat/grade_item_validation.feature | 3 +- .../tests/behat/grade_letter_boundary.feature | 4 +- .../grade_letter_boundary_20160518.feature | 4 +- .../tests/behat/grade_letter_logging.feature | 4 +- grade/tests/behat/grade_mingrade.feature | 8 +-- grade/tests/behat/grade_minmax.feature | 8 +-- .../behat/grade_natural_exclude_empty.feature | 4 +- ...ade_natural_exclude_empty_20150619.feature | 4 +- .../behat/grade_natural_normalisation.feature | 4 +- ...ade_natural_normalisation_20150619.feature | 4 +- .../grade_regrade_do_not_override.feature | 7 +-- .../behat/grade_scales_aggregation.feature | 17 ++----- .../behat/grade_single_item_scales.feature | 3 +- grade/tests/behat/grade_view.feature | 34 +++---------- lib/tests/behat/switch_editing_mode.feature | 4 +- .../bulk_release_anon_submissions.feature | 34 +++---------- .../tests/behat/outcome_grading.feature | 27 +++------- mod/assign/tests/behat/quickgrading.feature | 15 +----- .../tests/behat/steps_blind_marking.feature | 10 +--- .../tests/behat/sending_attempt.feature | 6 +-- .../behat/lti_activity_completion.feature | 3 +- .../behat/lti_completion_pass_grade.feature | 3 +- .../tests/behat/user_grade_navigation.feature | 21 ++++---- 61 files changed, 284 insertions(+), 687 deletions(-) diff --git a/admin/tool/behat/tests/behat/data_generators.feature b/admin/tool/behat/tests/behat/data_generators.feature index 2a5987b4d6c..b398445e9eb 100644 --- a/admin/tool/behat/tests/behat/data_generators.feature +++ b/admin/tool/behat/tests/behat/data_generators.feature @@ -103,8 +103,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 @@ -138,17 +137,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" @@ -190,8 +183,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" @@ -308,9 +300,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" @@ -331,9 +321,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 follow "Edit Test Grade Item 1" And I expand all fieldsets @@ -359,9 +347,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" @@ -380,9 +366,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" @@ -408,9 +392,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 follow "Edit Test Outcome Grade Item 1" And the field "Outcome" matches value "Grade outcome 1" @@ -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 d5b1c144369..488befeaffb 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 e4379d79581..b47c9ff877a 100644 --- a/blocks/activity_results/tests/behat/addblockinactivity.feature +++ b/blocks/activity_results/tests/behat/addblockinactivity.feature @@ -32,17 +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 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 follow "Test page name" diff --git a/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/highscoreswithoutgroups.feature index d7bec1de823..ead3877193f 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 64fe9570b64..58ce914834e 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 d0130318e0e..e931cb7e7c5 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 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: | 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 fd523674b84..e96b40775c7 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 479d8b01d92..f6b207878ec 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 follow "Test assignment" - 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" diff --git a/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature b/blocks/activity_results/tests/behat/lowscoreswithoutgroups.feature index 753cc1eb1dc..9875474c9a0 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 6b94c52d1e8..7f36098b2e2 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 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 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 d9265d318e7..475ee44fa9f 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 7f4fcfa276d..5fe59bdf58c 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 7e6fb4d4705..efd9c6ba387 100644 --- a/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature +++ b/blocks/activity_results/tests/behat/lowscoreswithvisiblegroups.feature @@ -46,13 +46,10 @@ 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 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 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" And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" @@ -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 3ab58a53117..2cac5f5e908 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,9 +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 > Grader report" in the course gradebook - And I follow "Single view" + Given I am on the "Completion course" "grades > Single View > View" page logged in as "teacher1" And I select "Student First" from the "Select a user above to view all their grades" singleselect And I set the field "Override for Test assignment name" to "1" When I set the following fields to these values: diff --git a/completion/tests/behat/enable_completion_on_pass_grade.feature b/completion/tests/behat/enable_completion_on_pass_grade.feature index 062bacda203..f6a62acea55 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 cf9d21a63d6..eb5229e2bbc 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,39 +30,26 @@ 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" diff --git a/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature b/completion/tests/behat/passgrade_completion_criteria_gradeitem_visibility.feature index b4d94791763..66099d5cba2 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 534ffb3b20c..aadf1c629c0 100644 --- a/grade/export/txt/tests/behat/export.feature +++ b/grade/export/txt/tests/behat/export.feature @@ -20,12 +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 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/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index e344a3b52c2..841fc9353e7 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -1,4 +1,4 @@ -@core @core_grades @gradereport_singleview +@core @core_grades @gradereport_singleview @javascript Feature: We can use Single view As a teacher In order to view and edit grades @@ -7,7 +7,7 @@ Feature: We can use Single view Background: Given the following "courses" exist: | fullname | shortname | category | - | Course 1 | C1 | 0 | + | Course 1 | C1 | 0 | And the following "users" exist: | username | firstname | lastname | email | idnumber | middlename | alternatename | firstnamephonetic | lastnamephonetic | | teacher1 | Teacher | 1 | teacher1@example.com | t1 | | fred | | | @@ -53,11 +53,8 @@ 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" - @javascript Scenario: I can update grades, add feedback and exclude grades. Given I navigate to "View > Single view" in the course gradebook And I select "Student" from the "Select a user above to view all their grades" singleselect @@ -93,10 +90,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 select "Student" from the "Select a user above to view all their grades" singleselect And the "Exclude for Test assignment one" "checkbox" should be disabled And the "Override for Test assignment one" "checkbox" should be enabled diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index 332135ca849..fe22052dea2 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -30,9 +30,7 @@ Feature: View the user report as the student will see it | activity | course | idnumber | name | intro | grade | | assign | C1 | a5 | Test assignment five | Submit something! | 100 | | assign | C1 | a6 | Test assignment six | Submit something! | 100 | - 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 + 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/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 854b76ae500..e97e70d3b93 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -5,12 +5,10 @@ Feature: We can use the user report Background: Given the following "courses" exist: - | fullname | shortname | category | - | Course 1 | C1 | 0 | + | fullname | shortname | category | groupmode | + | 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 select "All users (0)" from the "Select all or one user" singleselect Then I should see "There are no students enrolled in this course." diff --git a/grade/tests/behat/behat_grades.php b/grade/tests/behat/behat_grades.php index dfc63145536..d48d3cb8851 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" @@ -86,6 +88,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 faef95bd94a..4f1b2770392 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -36,23 +36,20 @@ Feature: We can use calculated grade totals | assign | C1 | a8 | Test assignment eight | Submit something! | Sub category 2 & | 20 | | assign | C1 | a9 | Test assignment nine | Submit something! | Sub category 2 & | 10 | | assign | C1 | 10 | Test assignment ten | Submit nothing! | Sub category 2 & | 15 | + 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 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 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 set the following settings for grade item "Test assignment two": | Hidden | 1 | And I set the following settings for grade item "Test assignment five": @@ -262,22 +259,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 | @@ -306,8 +297,8 @@ Feature: We can use calculated grade totals | Include outcomes in aggregation | 1 | | Exclude empty grades | 0 | And I set the following settings for grade item "Test outcome item one": - | Weight adjusted | 1 | - | aggregationcoef2 | 100 | + | Weight adjusted | 1 | + | aggregationcoef2 | 100 | And I navigate to "View > Grader report" in the course gradebook And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" And I press "Save changes" @@ -377,10 +368,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 df8cb3e70de..fcbcddba297 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 91f4870d922..f77dde32b80 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 88558150a30..4668d133e8c 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 72fee663783..36abe891ca8 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 b11e533b862..78e9857a01b 100644 --- a/grade/tests/behat/grade_category_validation.feature +++ b/grade/tests/behat/grade_category_validation.feature @@ -19,38 +19,18 @@ Feature: Editing a grade item 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 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" Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades When I click on "Edit settings" "link" in the "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 cb53856f38c..b0eaaba2987 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 874cd9b43c8..0f3b971d840 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 7bb31e8dd5a..48d0d4356b1 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 + 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 "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 select "Myself" from the "View report as" singleselect And I select "Student 1" from the "Select all or one user" singleselect 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 6cc1154ea2b..fc8bfc8a989 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 select "Myself" from the "View report as" singleselect When I select "Student 1" from the "Select all or one user" singleselect 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 8bbcdad51f0..982597dd3e9 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 cd9392e3492..cc1caca2a81 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 19b31fe4f9f..e934a815e31 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 53244b43f42..bbea9373778 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 4d75fb5cbf5..7ad4e29b641 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 b385b3d27ae..a76c36c1bff 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 b1535e04b4c..8bbd9e62513 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 b23be1f4533..f109f63a746 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 39578ff9a38..cb1940d3624 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 a453d2a8ff1..39d35607f80 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -1,4 +1,4 @@ -@core @core_grades +@core @core_grades @javascript Feature: Control the aggregation of the scales In order to use control the aggregation of the scales As an admin @@ -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 select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | Contribution to course total | @@ -80,11 +74,8 @@ Feature: Control the aggregation of the scales | Highest grade | Highest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % | | Mode of grades | Mode of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % | - @javascript 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 3852ad57083..7bffd523945 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 7c6299a1db3..4d2f5f794e8 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 d52dace35dc..54f6118304a 100644 --- a/mod/h5pactivity/tests/behat/sending_attempt.feature +++ b/mod/h5pactivity/tests/behat/sending_attempt.feature @@ -22,9 +22,7 @@ Feature: Do a H5P attempt And the following "activity" exists: | activity | h5pactivity | | course | C1 | - | section | 1 | | name | Awesome H5P package | - | intro | Description | | packagefilepath | h5p/tests/fixtures/multiple-choice-2-6.h5p | | grademethod | 2 | @@ -43,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" @@ -85,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 set the field "Select all or one user" to "Student 1" 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 edefb8566ea..fdaed7c013e 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"