This commit is contained in:
yuanke 2016-10-19 13:58:02 +08:00
parent b907b626a9
commit 05a8944dcf
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
namespace :find do
desc "Find student work error score test"
task :find do
puts "start find."
worktests = StudentWorkTest.where("select a.* from student_work_tests a where id = (select max(id) from student_work_tests where student_work_tests.student_work_id = a.student_work_id)")
worktests.each do|worktest|
testcount = worktest.student_work.homework_common.homework_tests.size
if testcount != worktest.results.count && worktest.student_work.system_score == 100
puts "error score"
puts "work_id="+worktest.student_work.id
puts "worktest_id="+worktest.id
end
end
puts "start end."
end
end