Skip to content

Commit

Permalink
MDL-57019 core_grades: change default navigation to tabs
Browse files Browse the repository at this point in the history
without navigation block in boost it is not easy to navigation between gradebook sections
  • Loading branch information
marinaglancy committed Nov 21, 2016
1 parent cd4a6b8 commit fc14932
Show file tree
Hide file tree
Showing 21 changed files with 98 additions and 82 deletions.
3 changes: 2 additions & 1 deletion admin/settings/grades.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
'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'))));
Expand Down
12 changes: 8 additions & 4 deletions grade/export/txt/tests/behat/export.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |
Expand Down
2 changes: 0 additions & 2 deletions grade/report/grader/tests/behat/switch_views.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions grade/report/singleview/tests/behat/singleview.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion grade/report/user/tests/behat/view_usereport.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
16 changes: 8 additions & 8 deletions grade/tests/behat/grade_aggregation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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"
Expand All @@ -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:
Expand Down
11 changes: 6 additions & 5 deletions grade/tests/behat/grade_calculated_grade_items.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down
30 changes: 19 additions & 11 deletions grade/tests/behat/grade_calculated_weights.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 | <aggregation> |
And I set the following settings for grade item "Manual item 2":
Expand All @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion grade/tests/behat/grade_hidden_items.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit fc14932

Please sign in to comment.