作业发布的rake
This commit is contained in:
parent
5870c3eaaf
commit
13b1d7bb78
|
@ -18,7 +18,7 @@ namespace :homework_publishtime do
|
|||
if str != ""
|
||||
str += ","
|
||||
end
|
||||
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')"
|
||||
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{Time.now}', '#{Time.now}')"
|
||||
end
|
||||
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
|
||||
ActiveRecord::Base.connection.execute sql
|
||||
|
|
Loading…
Reference in New Issue