老师评分之后,提交批阅结果按钮消失

This commit is contained in:
sw 2015-05-29 10:33:29 +08:00
parent 27de224693
commit fe3b715829
1 changed files with 1 additions and 0 deletions

View File

@ -120,6 +120,7 @@ class StudentWorkController < ApplicationController
#添加评分,已评分则为修改评分
def add_score
@score = student_work_score @work,User.current
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
if @score
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""
@score.score = params[:score] if params[:score]