From 7a90c0ea1090cecc7f4e92802979b11498711da9 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 21 Apr 2016 10:51:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E5=88=86=E8=AE=BE=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=A4=9A=E9=A1=B9=E6=97=B6=E4=B8=8D=E5=BA=94=E5=8F=91?= =?UTF-8?q?=E5=A4=9A=E6=9D=A1=E6=A8=A1=E6=9D=BF=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index cd7aa39bc..0d1fb9462 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -771,8 +771,6 @@ class StudentWorkController < ApplicationController student_work.late_penalty = @homework.late_penalty student_work.save end - - @homework.save end if params[:absence_penalty] && homework_detail_manual.absence_penalty.to_s != params[:absence_penalty].to_s @@ -795,7 +793,6 @@ class StudentWorkController < ApplicationController homework_detail_programing.ta_proportion = params[:sy_proportion] if homework_detail_programing @homework.teacher_priority = teacher_priority - @homework.save homework_detail_manual.save if homework_detail_manual homework_detail_programing.save if homework_detail_programing @@ -804,6 +801,8 @@ class StudentWorkController < ApplicationController student_work.save end end + + @homework.save if params[:student_path] redirect_to student_work_index_url(:homework => @homework.id) else