From 2424509691c6a077496242b406bbe2c106ae00c5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 9 Oct 2019 09:31:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E8=AF=95=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/exercise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/exercise.rb b/app/models/exercise.rb index 825f7cd9f..8469d25b6 100644 --- a/app/models/exercise.rb +++ b/app/models/exercise.rb @@ -131,7 +131,7 @@ class Exercise < ApplicationRecord status = 4 else if user.present? && user.student_of_course?(course) #当为学生的时候,需根据分班来判断试卷状态 - ex_time = get_exercise_times(user_id,false) + ex_time = get_exercise_times(user.id,false) pb_time = ex_time[:publish_time] ed_time = ex_time[:end_time] if pb_time.present? && ed_time.present? && pb_time <= Time.now && ed_time > Time.now