mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'wip-MDL-31597-master' of git://github.com/abgreeve/moodle
Conflicts: grade/tests/behat/behat_grade.php grade/tests/behat/grade_view.feature
This commit is contained in:
commit
988c6ba1b8
2 changed files with 26 additions and 5 deletions
|
@ -415,7 +415,7 @@ class grade_report_user extends grade_report {
|
||||||
$data['weight']['headers'] = "$header_cat $header_row weight";
|
$data['weight']['headers'] = "$header_cat $header_row weight";
|
||||||
// has a weight assigned, might be extra credit
|
// has a weight assigned, might be extra credit
|
||||||
if ($grade_object->aggregationcoef > 0 && $type <> 'courseitem') {
|
if ($grade_object->aggregationcoef > 0 && $type <> 'courseitem') {
|
||||||
$data['weight']['content'] = number_format($grade_object->aggregationcoef,2).'%';
|
$data['weight']['content'] = number_format($grade_object->aggregationcoef,2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
@core @core_grades
|
@core @core_grades
|
||||||
Feature: Viewing the gradebook
|
Feature: We can enter in grades and view reports from the gradebook
|
||||||
In order to check the expected results are displayed
|
In order to check the expected results are displayed
|
||||||
As a teacher
|
As a teacher
|
||||||
I need to assign grades and check that they display correctly in the gradebook.
|
I need to assign grades and check that they display correctly in the gradebook.
|
||||||
|
I need to enable grade weightings and check that they are displayed correctly.
|
||||||
|
|
||||||
@javascript
|
Background:
|
||||||
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
|
|
||||||
Given the following "courses" exists:
|
Given the following "courses" exists:
|
||||||
| fullname | shortname | format |
|
| fullname | shortname | format |
|
||||||
| Course 1 | C1 | topics |
|
| Course 1 | C1 | topics |
|
||||||
|
@ -40,7 +40,10 @@ Feature: Viewing the gradebook
|
||||||
And I turn editing mode on
|
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 "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||||
And I press "Update"
|
And I press "Update"
|
||||||
And I select "User report" from "Grade report"
|
|
||||||
|
@javascript
|
||||||
|
Scenario: Grade a grade item and ensure the results display correctly in the gradebook
|
||||||
|
When I select "User report" from "Grade report"
|
||||||
And the "Grade report" select box should contain "Grader report"
|
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 "Outcomes report"
|
||||||
And the "Grade report" select box should contain "User report"
|
And the "Grade report" select box should contain "User report"
|
||||||
|
@ -53,3 +56,21 @@ Feature: Viewing the gradebook
|
||||||
And I select "Overview report" from "Grade report"
|
And I select "Overview report" from "Grade report"
|
||||||
And I should see "80.00" in the "overview-grade" "table"
|
And I should see "80.00" in the "overview-grade" "table"
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report
|
||||||
|
When I select "Full view" from "Grade report"
|
||||||
|
And I select "Weighted mean of grades" from "Aggregation"
|
||||||
|
And I fill the moodle form with:
|
||||||
|
| Extra credit value for Test assignment name | 0.72 |
|
||||||
|
And I press "Save changes"
|
||||||
|
And I select "User report" from "Grade report"
|
||||||
|
And I follow "Course grade settings"
|
||||||
|
And I fill the moodle form with:
|
||||||
|
| Show weightings | Show |
|
||||||
|
And I press "Save changes"
|
||||||
|
And I log out
|
||||||
|
And I log in as "student1"
|
||||||
|
And I follow "Course 1"
|
||||||
|
And I follow "Grades"
|
||||||
|
Then I should see "0.72" in the "Test assignment name" "table_row"
|
||||||
|
And I should not see "0.72%" in the "Test assignment name" "table_row"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue