Merge branch 'develop' into szzh
This commit is contained in:
commit
9080ff79a0
|
@ -427,7 +427,7 @@ class HomeworkAttachController < ApplicationController
|
||||||
@homework = HomeworkAttach.find(params[:homework_id])
|
@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) #判断当前评论是老师评论?匿评?留言
|
@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] != "" #有没有留言
|
if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != "" #有没有留言
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
function submit_jours(is_teacher)
|
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;}
|
if(!is_teacher&&$("#new_form_user_message").val() == ""){alert("您还没有填写评语");return;}
|
||||||
$('#new_form_user_message').parent().submit();
|
$('#new_form_user_message').parent().submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<% unless is_student_batch_homework %>
|
<% unless is_student_batch_homework %>
|
||||||
<%= l(:label_teacher_score)%>:
|
<%= l(:label_teacher_score)%>:
|
||||||
<span class="c_red">
|
<span class="c_red">
|
||||||
<%= homework.t_score.nil? ? l(:label_without_score) : format("%.2f",homework.t_score)%>
|
<%= (homework.t_score.nil? || (homework.t_score && homework.t_score.to_i == 0)) ? l(:label_without_score) : format("%.2f",homework.t_score)%>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -26,12 +26,14 @@
|
||||||
<%= format_time(review.created_at) %>
|
<%= format_time(review.created_at) %>
|
||||||
</span>
|
</span>
|
||||||
<span style="font-weight:bold; color:#a6a6a6; float: right;">
|
<span style="font-weight:bold; color:#a6a6a6; float: right;">
|
||||||
<span style="float:left">
|
<% if review.stars && review.stars.to_i > 0%>
|
||||||
<%= l(:label_work_rating) %>:
|
<span style="float:left">
|
||||||
</span>
|
<%= l(:label_work_rating) %>:
|
||||||
<div class="ping_star">
|
</span>
|
||||||
<%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %>
|
<div class="ping_star">
|
||||||
</div>
|
<%= render :partial => 'homework_attach/show_static_star', :locals => {:start_score => review.stars } %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p><%= textilizable jour.nil? ? "" : jour.notes%></p>
|
<p><%= textilizable jour.nil? ? "" : jour.notes%></p>
|
||||||
|
|
Loading…
Reference in New Issue