编程作业的迟交扣分有问题
This commit is contained in:
parent
335ea381b4
commit
a74cba5190
|
@ -497,7 +497,7 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
#提交作品时,计算是否迟交
|
#提交作品时,计算是否迟交
|
||||||
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d")
|
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d")
|
||||||
student_work.late_penalty = 1
|
student_work.late_penalty = homework.late_penalty
|
||||||
else
|
else
|
||||||
student_work.late_penalty = 0
|
student_work.late_penalty = 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue