Skip to content

Commit

Permalink
gradebook not correctly remembering pass/fail grades
Browse files Browse the repository at this point in the history
For pass/fail assignments the gradebook was not properly
remembering the set value if you clicked the word bubble
to add comments to the submission from within the
gradebook.  This should be fixed.

fixes #4002

Change-Id: I29837e3063e365d9aa1b80f9f0062748a4b73fb7
Reviewed-on: https://gerrit.instructure.com/2740
Tested-by: Hudson <[email protected]>
Reviewed-by: Zach Wily <[email protected]>
  • Loading branch information
whitmer committed Mar 25, 2011
1 parent 78eeabe commit e4169cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions public/javascripts/gradebooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,6 @@ var gradebook = (function(){
if(submission.grade !== "" && submission.grade == 0) {
submission.grade = "0";
}
if(submission.grade && submission.grade.toString() == Math.round(submission.grade).toString()) {
}
var $submission_score = $submission.find(".score"),
$submission_pending_review = $submission.find(".pending_review"),
$submission_turnitin = $submission.find(".turnitin"),
Expand Down Expand Up @@ -1399,9 +1397,12 @@ var gradebook = (function(){
}
if(grade == "_" || grade == "-") { grade = ""; }

if($grade_entry[0].tagName != "SELECT" || grade != "") {
if($grade_entry[0].tagName == "SELECT") {
$grade_entry.val(submission.grade);
} else if(grade != "") {
$grade_entry.val(grade);
}

url = $.replaceTags(url, 'assignment_id', submission.assignment_id);
url = $.replaceTags(url, 'user_id', submission.user_id);
$view.append($("#submission_view_image").clone(true).removeAttr('id'));
Expand Down

0 comments on commit e4169cd

Please sign in to comment.