Skip to content

Commit

Permalink
Merge branch 'master-MDL-69791' of https://github.com/golenkovm/moodle
Browse files Browse the repository at this point in the history
…into master
  • Loading branch information
sarjona committed Oct 19, 2020
2 parents 0fa7d36 + 9e23f5d commit c8ad0ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grade/report/grader/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ M.gradereport_grader.classes.ajax.prototype.submission_outcome = function(tid, o
var p = args.properties;
if (args.type == 'grade') {
var oldgrade = args.values.oldgrade;
p.cell.one('.gradevalue').set('innerHTML',oldgrade);
p.cell.one('input.text').set('value', oldgrade);
} else if (args.type == 'feedback') {
this.report.update_feedback(p.userid, p.itemid, args.values.oldfeedback);
}
Expand Down
15 changes: 15 additions & 0 deletions grade/report/grader/tests/behat/ajax_grader.feature
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,18 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
| Student 2 | 10.00 | 30.00 | 20.00 | 5.00 | 45.00 | 110.00 | 110.00 |
And I click on student "Student 2" for grade item "Item 1"
And the field "ajaxfeedback" matches value "Some feedback"

@javascript
Scenario: Teacher can see an error when an incorrect grade is given using the grader report with editing and AJAX on
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 "66.00" to the user "Student 2" for the grade item "Item VU"
And I click away from student "Student 2" and grade item "Item VU" value
When I give the grade "999.00" to the user "Student 2" for the grade item "Item VU"
And I click away from student "Student 2" and grade item "Item VU" value
Then I should see "The grade entered for Item VU for Student 2 is more than the maximum allowed"
And I click on "The grade entered for Item VU for Student 2 is more than the maximum allowed" "text"
And I should not see "The grade entered for Item VU for Student 2 is more than the maximum allowed"
And the grade for "Student 2" in grade item "Item VU" should match "66.00"

0 comments on commit c8ad0ca

Please sign in to comment.