diff --git a/admin/settings/grades.php b/admin/settings/grades.php index bd9ea98cb8b..8dfceeabeee 100644 --- a/admin/settings/grades.php +++ b/admin/settings/grades.php @@ -53,7 +53,8 @@ if (has_capability('moodle/grade:manage', $systemcontext) '3' => '3', '4' => '4', '5' => '5'))); - $temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null, 0, + $temp->add(new admin_setting_configselect('grade_navmethod', new lang_string('navmethod', 'grades'), null, + GRADE_NAVMETHOD_TABS, array(GRADE_NAVMETHOD_DROPDOWN => new lang_string('dropdown', 'grades'), GRADE_NAVMETHOD_TABS => new lang_string('tabs', 'grades'), GRADE_NAVMETHOD_COMBO => new lang_string('combo', 'grades')))); diff --git a/grade/export/txt/tests/behat/export.feature b/grade/export/txt/tests/behat/export.feature index db6d0e9aca7..f749219ff8a 100644 --- a/grade/export/txt/tests/behat/export.feature +++ b/grade/export/txt/tests/behat/export.feature @@ -29,7 +29,8 @@ Feature: I need to export grades as text @javascript Scenario: Export grades as text - When I set the field "Grade report" to "Plain text file" + When I follow "Export" + And I follow "Plain text file" And I expand all fieldsets And I click on "Course total" "checkbox" And I set the field "Grade export decimal points" to "1" @@ -41,7 +42,8 @@ Feature: I need to export grades as text @javascript Scenario: Export grades as text using real - When I set the field "Grade report" to "Plain text file" + When I follow "Export" + And I follow "Plain text file" And I expand all fieldsets And I set the following fields to these values: | Real | 1 | @@ -52,7 +54,8 @@ Feature: I need to export grades as text @javascript Scenario: Export grades as text using percentages and letters - When I set the field "Grade report" to "Plain text file" + When I follow "Export" + And I follow "Plain text file" And I set the following fields to these values: | Percentage | 1 | | Letter | 1 | @@ -65,7 +68,8 @@ Feature: I need to export grades as text @javascript Scenario: Export grades as text using real, percentages and letters - When I set the field "Grade report" to "Plain text file" + When I follow "Export" + And I follow "Plain text file" And I set the following fields to these values: | Real | 1 | | Percentage | 1 | diff --git a/grade/report/grader/tests/behat/switch_views.feature b/grade/report/grader/tests/behat/switch_views.feature index 09ecf628e1c..185781f2cd9 100644 --- a/grade/report/grader/tests/behat/switch_views.feature +++ b/grade/report/grader/tests/behat/switch_views.feature @@ -61,7 +61,6 @@ Feature: We can change what we are viewing on the grader report And I click on "Hide" "link" in the "Test assignment name 2" activity And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "Grader report" from the "Grade report" singleselect And I should see "Test assignment name 1" And I should see "Test assignment name 2" And I should see "Course total" @@ -98,7 +97,6 @@ Feature: We can change what we are viewing on the grader report And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "Grader report" from the "Grade report" singleselect And I should see "Test assignment name 1" And I should see "Test assignment name 2" And I should see "Course total" diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index f2158da1b0e..1da08bb67a0 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -56,7 +56,7 @@ Feature: We can use Single view @javascript Scenario: I can update grades, add feedback and exclude grades. - Given I select "Single view" from the "Grade report" singleselect + Given I follow "Single view" And I select "Student 4" from the "Select user..." singleselect And I set the field "Override for Test assignment one" to "1" When I set the following fields to these values: @@ -98,7 +98,7 @@ Feature: We can use Single view And I log in as "teacher2" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I click on "Single view" "option" + And I follow "Single view" And I click on "Student 4" "option" 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/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 7f7b25e4f59..2fe4888cb2e 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -13,6 +13,6 @@ Feature: We can use the user report And I am on site homepage And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "User report" from the "Grade report" singleselect + And I follow "User report" And I select "All users (0)" from the "Select all or one user" singleselect Then I should see "No students enrolled in this course yet" diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index dcbbd5c3b7d..4f06a422862 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -242,7 +242,7 @@ Feature: We can use calculated grade totals | Aggregation | Natural | | Include outcomes in aggregation | 1 | | Exclude empty grades | 0 | - And I follow "Grader report" + And I follow "View" And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" And I press "Save changes" And I navigate to "Course grade settings" node in "Grade administration > Setup" @@ -307,7 +307,7 @@ Feature: We can use calculated grade totals And I set the following settings for grade item "Test outcome item one": | Weight adjusted | 1 | | aggregationcoef2 | 100 | - And I follow "Grader report" + And I follow "View" And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" And I press "Save changes" And I navigate to "Course grade settings" node in "Grade administration > Setup" @@ -344,7 +344,7 @@ Feature: We can use calculated grade totals And I set the field "Show contribution to course total" to "Show" And I set the field "Show weightings" to "Show" And I press "Save changes" - And I select "User report" from the "Grade report" singleselect + And I follow "User report" And I select "Myself" from the "View report as" singleselect And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: @@ -412,7 +412,7 @@ Feature: We can use calculated grade totals | Item name | Manual item 3 | | Grade category | Sub category 3 | And I press "Save changes" - And I follow "Grader report" + And I follow "View" And I give the grade "60.00" to the user "Student 1" for the grade item "Manual item 1" And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" And I give the grade "40.00" to the user "Student 1" for the grade item "Manual item 3" @@ -452,12 +452,12 @@ Feature: We can use calculated grade totals | Category name | Sub sub category 1 | | Parent category | Sub category 3 | And I press "Save changes" - And I follow "Grader report" + And I follow "View" And I should see "270.00 (24.77 %)" in the ".course" "css_element" @javascript Scenario: Natural aggregation from the setup screen - And I select "Gradebook setup" from the "Grade report" singleselect + And I follow "Setup" And I set the following settings for grade item "Course 1": | Aggregation | Natural | And I set the following settings for grade item "Sub category 1": @@ -519,7 +519,7 @@ Feature: We can use calculated grade totals | Aggregation | Natural | | Exclude empty grades | 0 | And I turn editing mode off - And I select "Gradebook setup" from the "Grade report" singleselect + And I follow "Setup" And I set the field "Override weight of Test assignment one" to "1" And I set the field "Weight of Test assignment one" to "0" And I set the field "Override weight of Test assignment six" to "1" @@ -534,7 +534,7 @@ Feature: We can use calculated grade totals And I set the field "Show weightings" to "Show" And I press "Save changes" Then I should see "75.00 (16.85 %)" in the ".course" "css_element" - And I select "User report" from the "Grade report" singleselect + And I follow "User report" And I select "Myself" from the "View report as" singleselect And I select "Student 1" from the "Select all or one user" singleselect And the following should exist in the "user-grade" table: diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index d39b632ee60..5740af39866 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -39,7 +39,7 @@ Feature: Calculated grade items can be used in the gradebook | grade item 1 | gi1 | And I set the following settings for grade item "Calc cat": | Maximum grade | 50 | - And I follow "Grader report" + And I follow "View" And I turn editing mode on And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" @@ -66,8 +66,8 @@ Feature: Calculated grade items can be used in the gradebook | grade item 1 | gi1 | And I set the following settings for grade item "Calc cat": | Maximum grade | 50 | - And I follow "Grader report" - And I turn editing mode on + And I follow "View" + And I press "Turn editing on" And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" And I follow "User report" @@ -80,6 +80,7 @@ Feature: Calculated grade items can be used in the gradebook And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I set the following settings for grade item "Calc cat": | Maximum grade | 40 | + And I follow "View" And I follow "Grader report" And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" And I press "Save changes" @@ -132,8 +133,7 @@ Feature: Calculated grade items can be used in the gradebook And I set the following fields to these values: | Min and max grades used in calculation | Initial min and max grades | And I press "Save changes" - And I follow "Grader report" - And I turn editing mode on + And I press "Turn editing on" And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" And I follow "User report" @@ -147,6 +147,7 @@ Feature: Calculated grade items can be used in the gradebook And I set the following settings for grade item "calc item": | Rescale existing grades | No | | Maximum grade | 40 | + And I follow "View" And I follow "Grader report" And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" And I press "Save changes" diff --git a/grade/tests/behat/grade_calculated_grade_items_20150627.feature b/grade/tests/behat/grade_calculated_grade_items_20150627.feature index 6271c9f69b9..1f7d217c5e2 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -40,7 +40,6 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | grade item 1 | gi1 | And I set the following settings for grade item "Calc cat": | Maximum grade | 50 | - And I follow "Grader report" And I turn editing mode on And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" @@ -67,8 +66,9 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | grade item 1 | gi1 | And I set the following settings for grade item "Calc cat": | Maximum grade | 50 | + And I follow "View" And I follow "Grader report" - And I turn editing mode on + And I press "Turn editing on" And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" And I follow "User report" @@ -81,6 +81,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I navigate to "Gradebook setup" node in "Grade administration > Setup" And I set the following settings for grade item "Calc cat": | Maximum grade | 40 | + And I follow "View" And I follow "Grader report" And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" And I press "Save changes" @@ -134,7 +135,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | Min and max grades used in calculation | Initial min and max grades | And I press "Save changes" And I follow "Grader report" - And I turn editing mode on + And I press "Turn editing on" And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" And I press "Save changes" And I follow "User report" @@ -148,6 +149,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I set the following settings for grade item "calc item": | Rescale existing grades | No | | Maximum grade | 40 | + And I follow "View" And I follow "Grader report" And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" And I press "Save changes" diff --git a/grade/tests/behat/grade_calculated_weights.feature b/grade/tests/behat/grade_calculated_weights.feature index 97c4fffe4c0..d0e7f987ffc 100644 --- a/grade/tests/behat/grade_calculated_weights.feature +++ b/grade/tests/behat/grade_calculated_weights.feature @@ -43,7 +43,7 @@ Feature: We can understand the gradebook user report 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" - And I set the field "Grade report" to "Gradebook setup" + And I follow "Setup" And I press "Add category" And I set the field "Category name" to "Sub category" And I press "Save changes" @@ -59,7 +59,7 @@ Feature: We can understand the gradebook user report Scenario: Mean of grades aggregation And I set the following settings for grade item "Course 1": | Aggregation | Mean of grades | - And I set the field "Grade report" to "User report" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -84,7 +84,7 @@ Feature: We can understand the gradebook user report | Item weight | 1.0 | And I set the following settings for grade item "Sub category": | Item weight | 1.0 | - And I set the field "Grade report" to "User report" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -105,7 +105,8 @@ Feature: We can understand the gradebook user report | Aggregation | Simple weighted mean of grades | And I set the following settings for grade item "Test assignment three": | Extra credit | 1 | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -124,7 +125,8 @@ Feature: We can understand the gradebook user report | Aggregation | Mean of grades (with extra credits) | And I set the following settings for grade item "Test assignment three": | Extra credit weight | 1.0 | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -141,7 +143,8 @@ Feature: We can understand the gradebook user report Scenario: Median of grades aggregation And I set the following settings for grade item "Course 1": | Aggregation | Median of grades | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -158,7 +161,8 @@ Feature: We can understand the gradebook user report Scenario: Lowest grade aggregation And I set the following settings for grade item "Course 1": | Aggregation | Lowest grade | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -175,7 +179,8 @@ Feature: We can understand the gradebook user report Scenario: Highest grade aggregation And I set the following settings for grade item "Course 1": | Aggregation | Highest grade | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -192,7 +197,8 @@ Feature: We can understand the gradebook user report Scenario: Mode of grades aggregation And I set the following settings for grade item "Course 1": | Aggregation | Mode of grades | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -213,7 +219,8 @@ Feature: We can understand the gradebook user report | Aggregation | Weighted mean of grades | And I set the following settings for grade item "Test assignment three": | Extra credit | 1 | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. @@ -232,7 +239,8 @@ Feature: We can understand the gradebook user report Scenario: View user report with natural aggregation And I set the following settings for grade item "Test assignment three": | Extra credit | 1 | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" And I set the field "Select all or one user" to "Student 1" # Check the values in the weights column. diff --git a/grade/tests/behat/grade_contribution_with_extra_credit.feature b/grade/tests/behat/grade_contribution_with_extra_credit.feature index e59d032ebbb..45a2c98fb8a 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -56,7 +56,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I press "Save changes" Scenario Outline: The contribution of extra credit items is normalised - Given I set the field "Grade report" to "Gradebook setup" + Given I follow "Setup" When I set the following settings for grade item "Course 1": | Aggregation | | And I set the following settings for grade item "Manual item 2": @@ -65,7 +65,8 @@ Feature: Extra credit contributions are normalised when going out of bounds | Extra credit | 1 | And I set the following settings for grade item "Manual item 4": | Extra credit | 1 | - And I set the field "Grade report" to "User report" + And I follow "View" + And I follow "User report" 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 | Calculated weight | Grade | Contribution to course total | diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index 519e7503140..c74957eba08 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -45,7 +45,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I press "Save changes" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "User report" from the "Grade report" singleselect + And I follow "User report" 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: diff --git a/grade/tests/behat/grade_letter_boundary.feature b/grade/tests/behat/grade_letter_boundary.feature index 868a2cea133..381b3a6c5a5 100644 --- a/grade/tests/behat/grade_letter_boundary.feature +++ b/grade/tests/behat/grade_letter_boundary.feature @@ -23,7 +23,8 @@ Feature: We can customise the letter boundary of a course. And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "Course grade settings" from the "Grade report" singleselect + And I follow "Setup" + And I follow "Course grade settings" And I set the following fields to these values: | Grade display type | Letter | And I press "Save changes" @@ -33,7 +34,7 @@ Feature: We can customise the letter boundary of a course. | id_override | 1 | | id_gradeboundary10 | 57 | And I press "Save changes" - And I select "Grader report" from the "Grade report" singleselect + And I follow "View" And I press "Turn editing on" And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one" 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 bd81919ead1..97fd3303a79 100644 --- a/grade/tests/behat/grade_letter_boundary_20160518.feature +++ b/grade/tests/behat/grade_letter_boundary_20160518.feature @@ -24,7 +24,8 @@ Feature: We can customise the letter boundary of a course. And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I select "Course grade settings" from the "Grade report" singleselect + And I follow "Setup" + And I follow "Course grade settings" And I set the following fields to these values: | Grade display type | Letter | And I press "Save changes" @@ -34,7 +35,7 @@ Feature: We can customise the letter boundary of a course. | id_override | 1 | | id_gradeboundary10 | 57 | And I press "Save changes" - And I select "Grader report" from the "Grade report" singleselect + And I follow "View" And I press "Turn editing on" And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one" And I press "Save changes" diff --git a/grade/tests/behat/grade_natural_exclude_empty.feature b/grade/tests/behat/grade_natural_exclude_empty.feature index 471029907f7..3d7ecc95d26 100644 --- a/grade/tests/behat/grade_natural_exclude_empty.feature +++ b/grade/tests/behat/grade_natural_exclude_empty.feature @@ -26,7 +26,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "Gradebook setup" + And I follow "Setup" 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)": @@ -42,7 +42,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -63,7 +63,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -82,7 +82,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -109,7 +109,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -134,7 +134,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -158,7 +158,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -180,7 +180,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -207,7 +207,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -233,7 +233,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -257,7 +257,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | diff --git a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature index 81bab50f6dd..c439d17a6c9 100644 --- a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature +++ b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature @@ -27,7 +27,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "Gradebook setup" + And I follow "Setup" 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)": @@ -43,7 +43,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -64,7 +64,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -83,7 +83,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -110,7 +110,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -135,7 +135,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -160,7 +160,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -183,7 +183,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -210,7 +210,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -237,7 +237,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | @@ -262,7 +262,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" And I press "Save changes" - And I set the field "Grade report" to "User report" + And I follow "User report" 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 | Calculated weight | Grade | Range | Percentage | Contribution to course total | diff --git a/grade/tests/behat/grade_natural_normalisation.feature b/grade/tests/behat/grade_natural_normalisation.feature index 3bcc6b67cf1..93c599629a2 100644 --- a/grade/tests/behat/grade_natural_normalisation.feature +++ b/grade/tests/behat/grade_natural_normalisation.feature @@ -33,7 +33,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "Gradebook setup" + And I follow "Setup" @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 55ef48ff723..a940acc342e 100644 --- a/grade/tests/behat/grade_natural_normalisation_20150619.feature +++ b/grade/tests/behat/grade_natural_normalisation_20150619.feature @@ -34,7 +34,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix And I log in as "teacher1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "Gradebook setup" + And I follow "Setup" @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_scales.feature b/grade/tests/behat/grade_scales.feature index b89b67cc615..1817f7d344b 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -76,7 +76,6 @@ Feature: View gradebook when scales are used 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" - And I follow "Grader report" And I turn editing mode on Scenario: Test displaying scales in gradebook in aggregation method Natural @@ -99,7 +98,7 @@ Feature: View gradebook when scales are used | Test assignment one | C | F–A | 50.00 % | 60.00 % | | Sub category 1 total | 3.00 | 0–5 | 60.00 % | - | | Course total | 3.00 | 0–5 | 60.00 % | - | - And I select "Gradebook setup" from the "Grade report" singleselect + And I follow "Setup" And the following should exist in the "grade_edit_tree_table" table: | Name | Max grade | | Test assignment one | 5.00 | @@ -145,7 +144,7 @@ Feature: View gradebook when scales are used | Test assignment one | C | F–A | 50.00 % | | | Sub category () total. | 3.00 | 1–5 | 50.00 % | - | | Course total. | | 0–100 | | - | - And I select "Gradebook setup" from the "Grade report" singleselect + And I follow "Setup" And the following should exist in the "grade_edit_tree_table" table: | Name | Max grade | | Test assignment one | A (5) | diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 76a2b349aa4..2c7eba7c566 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -54,7 +54,6 @@ Feature: View gradebook when single item scales are used 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" - And I follow "Grader report" And I turn editing mode on Scenario: Test displaying single item scales in gradebook in aggregation method Natural @@ -79,7 +78,7 @@ Feature: View gradebook when single item scales are used | Test assignment one | - | Ace!–Ace! | - | | Sub category 1 total| - | 0–1 | - | | Course total | - | 0–1 | - | - And I select "Gradebook setup" from the "jump" singleselect + And I follow "Setup" And the following should exist in the "grade_edit_tree_table" table: | Name | Max grade | | Test assignment one | 1.00 | @@ -111,7 +110,7 @@ Feature: View gradebook when single item scales are used | Test assignment one | Ace! | Ace!–Ace! | | | Sub category () total. | | 0–100 | - | | Course total. | | 0–100 | - | - And I select "Gradebook setup" from the "jump" singleselect + And I follow "Setup" And the following should exist in the "grade_edit_tree_table" table: | Name | Max grade | | Test assignment one | Ace! (1) | diff --git a/grade/tests/behat/grade_view.feature b/grade/tests/behat/grade_view.feature index 73c1995c3f0..9ea6c967fdb 100644 --- a/grade/tests/behat/grade_view.feature +++ b/grade/tests/behat/grade_view.feature @@ -58,10 +58,10 @@ Feature: We can enter in grades and view reports from the gradebook And I press "Save changes" Scenario: Grade a grade item and ensure the results display correctly in the gradebook - When I select "User report" from the "Grade report" singleselect - And the "Grade report" select box should contain "Grader report" - And the "Grade report" select box should contain "Outcomes report" - And the "Grade report" select box should contain "User report" + When I follow "User report" + And "Grader report" "link" should exist + And "Outcomes report" "link" should exist + And "Grader report" "link" should exist And the "Select all or one user" select box should contain "All users (1)" And I log out And I log in as "student1" @@ -80,12 +80,13 @@ Feature: We can enter in grades and view reports from the gradebook And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00" Scenario: We can add a weighting to a grade item and it is displayed properly in the user report - When I select "Gradebook setup" from the "Grade report" singleselect + When I follow "Setup" And I set the following settings for grade item "Course 1": | Aggregation | Weighted mean of grades | And I set the field "Extra credit value for Test assignment name" to "0.72" And I press "Save changes" - And I select "User report" from the "Grade report" singleselect + And I follow "View" + And I follow "User report" And I navigate to "Course grade settings" node in "Grade administration > Setup" And I set the following fields to these values: | Show weightings | Show | diff --git a/mod/assign/tests/behat/steps_blind_marking.feature b/mod/assign/tests/behat/steps_blind_marking.feature index a6aa69592a9..6098672c1dc 100644 --- a/mod/assign/tests/behat/steps_blind_marking.feature +++ b/mod/assign/tests/behat/steps_blind_marking.feature @@ -81,7 +81,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log in as "student1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "User report" + And I follow "User report" Then I should see "50" And I should see "Great job! Lol, not really." @@ -109,6 +109,6 @@ Feature: Assignments correctly add feedback to the grade report when workflow an And I log in as "student1" And I follow "Course 1" And I click on "Grades" "link" in the "Navigation" "block" - And I set the field "Grade report" to "User report" + And I follow "User report" Then I should see "50" And I should see "Great job! Lol, not really."