修改老师第一次可以不对学生作业进行评分,只进行评价

This commit is contained in:
sw 2014-12-15 09:10:21 +08:00
parent b96de32b28
commit 9ffe32e121
2 changed files with 2 additions and 2 deletions

View File

@ -427,7 +427,7 @@ class HomeworkAttachController < ApplicationController
@homework = HomeworkAttach.find(params[:homework_id])
#保存评分
@homework.rate(@m_score.to_i,User.current.id,:quality) if @m_score && @m_score != "0"
@homework.rate(@m_score.to_i,User.current.id,:quality) if @m_score
#保存评论
@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] != "" #有没有留言

View File

@ -21,7 +21,7 @@
function submit_jours(is_teacher)
{
if($("#stars_value").val() == "0"){alert("您还没有打分");return;}
if(!is_teacher&&$("#stars_value").val() == "0"){alert("您还没有打分");return;}
if(!is_teacher&&$("#new_form_user_message").val() == ""){alert("您还没有填写评语");return;}
$('#new_form_user_message').parent().submit();
}