修改保存评分时报错

This commit is contained in:
sw 2014-12-11 16:09:33 +08:00
parent 36b7c9ca90
commit c067d3e4c5
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ class HomeworkAttachController < ApplicationController
@homework = HomeworkAttach.find(params[:homework_id])
#保存评分
@homework.rate(@m_score,User.current.id,:quality) if @m_score && @m_score != "0"
@homework.rate(@m_score.to_i,User.current.id,:quality) if @m_score && @m_score != "0"
#保存评论
@is_comprehensive_evaluation = @is_teacher ? 1 : (@is_anonymous_comments ? 2 : 3) #判断当前评论是老师评论?匿评?留言
if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != "" #有没有留言