.调试
This commit is contained in:
parent
b907b626a9
commit
05a8944dcf
|
@ -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
|
Loading…
Reference in New Issue