瀏覽代碼

Make sure to set comments on fresh failing tests.

master
Ben Kurtovic 8 年之前
父節點
當前提交
1671f306d0
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      lib/kgrader/submission.rb

+ 3
- 2
lib/kgrader/submission.rb 查看文件

@@ -120,7 +120,8 @@ module KGrader
def grade_prep(superscore)
@done = false
@failed = false
@changed = !superscore || self.status == :ungraded
@fresh = self.status == :ungraded
@changed = !superscore || @fresh
@summary = nil
@tests = @assignment.tests.clone.each do |test|
test[:score] = 0
@@ -205,7 +206,7 @@ module KGrader
end

score, comments = @fs.jail.run_test test[:script], testlog
if score > test[:score]
if score > test[:score] || (score == test[:score] && @fresh)
test[:score] = score
test[:comments] = comments
@changed = true


Loading…
取消
儲存