@ -104,7 +104,7 @@ class HomeworkCommon < ApplicationRecord
end
def user_work user_id
work = self.student_works.find_by_user_id(user_id) # || StudentWork.create!(homework_common_id: id, user_id: user_id)
work = StudentWork.find_by(homework_common_id: id, user_id: user_id) || StudentWork.create!(homework_common_id: id, user_id: user_id)
# 是否在补交阶段内