修正评分不能点问题,作品留言
This commit is contained in:
parent
b65fe236ef
commit
c2fe1b7c72
|
@ -426,12 +426,12 @@ class HomeworkAttachController < ApplicationController
|
||||||
def addjours
|
def addjours
|
||||||
@homework = HomeworkAttach.find(params[:jour_id])
|
@homework = HomeworkAttach.find(params[:jour_id])
|
||||||
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
|
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
|
||||||
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
|
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC")
|
||||||
@limit = 10
|
#@limit = 10
|
||||||
@feedback_count = @jours.count
|
#@feedback_count = @jours.count
|
||||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||||
@offset ||= @feedback_pages.offset
|
#@offset ||= @feedback_pages.offset
|
||||||
@jour = @jours[@offset, @limit]
|
#@jour = @jours[@offset, @limit]
|
||||||
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
||||||
|
|
||||||
@totle_score = score_for_homework @homework
|
@totle_score = score_for_homework @homework
|
||||||
|
|
|
@ -98,9 +98,9 @@ module HomeworkAttachHelper
|
||||||
end
|
end
|
||||||
array.each do |member|
|
array.each do |member|
|
||||||
if member == array.last
|
if member == array.last
|
||||||
ary += member.to_s + ")"
|
ary += member.id.to_s + ")"
|
||||||
else
|
else
|
||||||
ary += member.to_s + ","
|
ary += member.id.to_s + ","
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ary
|
ary
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="ping_list">
|
||||||
|
<div id="ping_tb_" class="ping_tb_">
|
||||||
|
<ul>
|
||||||
|
<li id="ping_tb_4" class="ping_normaltab" onmouseover="i:HoverLi(4);">
|
||||||
|
<%= l(:label_teacher_comments) %>(<span class="c_red"><%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %></span>)</li>
|
||||||
|
<li id="ping_tb_5" class="ping_normaltab" onmouseover="i:HoverLi(5);">
|
||||||
|
<%= l(:label_anonymous_comments) %>(<span class="c_red"><%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %></span>)</li>
|
||||||
|
<li id="ping_tb_3" class="ping_hovertab" onmouseover="x:HoverLi(3);">
|
||||||
|
<%= l(:label_responses) %>(<span class="c_red"><%= @jours.nil? ? 0 : @jours.count %></span>)</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="ping_ctt">
|
||||||
|
<div class="ping_dis" id="tbc_03">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true} %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ping_undis" id="tbc_04">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true} %>
|
||||||
|
</div>
|
||||||
|
<div class="ping_undis" id="tbc_05">
|
||||||
|
<%= render :partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!---ping_list end--->
|
|
@ -1,11 +1,22 @@
|
||||||
|
<% jours.nil? || jours.count == 0 || jours.each do |jour| %>
|
||||||
<div class="ping_C">
|
<div class="ping_C">
|
||||||
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(jour.user)) %></a></div>
|
<div class="ping_dispic">
|
||||||
|
<% if show_name %>
|
||||||
|
<%= link_to image_tag(url_to_avatar(jour.user)) , user_path(jour.user), :target =>"_blank" %>
|
||||||
|
<% else %>
|
||||||
|
<a><%= image_tag(url_to_avatar(nil))%></a>
|
||||||
|
<a><%= l(:label_anonymous) %></a>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<div class="ping_discon">
|
<div class="ping_discon">
|
||||||
<div class="ping_distop">
|
<div class="ping_distop">
|
||||||
<span><%= link_to jour.user, user_path(jour.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span>
|
<span><%= link_to jour.user, user_path(jour.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span>
|
||||||
<span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= jour.created_on %></span><span style="font-weight:bold; color:#a6a6a6; ">
|
<span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= jour.created_on %></span>
|
||||||
<%= l(:label_work_rating) %>:
|
<span style="font-weight:bold; color:#a6a6a6; ">
|
||||||
<%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
|
<% if show_score %>
|
||||||
|
<%= l(:label_work_rating) %>:
|
||||||
|
<%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p><%= textilizable jour.notes%></p>
|
<p><%= textilizable jour.notes%></p>
|
||||||
|
@ -26,3 +37,4 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
|
@ -75,40 +75,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!---ping_con end--->
|
</div><!---ping_con end--->
|
||||||
|
|
||||||
<div class="ping_list">
|
<%= render :partial => 'histoey_new' %>
|
||||||
<div id="ping_tb_" class="ping_tb_">
|
|
||||||
<ul>
|
|
||||||
<li id="ping_tb_4" class="ping_normaltab" onmouseover="i:HoverLi(4);">
|
|
||||||
<%= l(:label_teacher_comments) %>(<span class="c_red"><%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %></span>)</li>
|
|
||||||
<li id="ping_tb_5" class="ping_normaltab" onmouseover="i:HoverLi(5);">
|
|
||||||
<%= l(:label_anonymous_comments) %>(<span class="c_red"><%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %></span>)</li>
|
|
||||||
<li id="ping_tb_3" class="ping_hovertab" onmouseover="x:HoverLi(3);">
|
|
||||||
<%= l(:label_responses) %>(<span class="c_red"><%= @jours.nil? ? 0 : @jours.count %></span>)</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<div class="ping_ctt">
|
|
||||||
<div class="ping_dis" id="tbc_03">
|
|
||||||
<% @jours.each do |jour| %>
|
|
||||||
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
|
|
||||||
<% end %>
|
|
||||||
</div><!--全部评论end-->
|
|
||||||
|
|
||||||
<div class="ping_undis" id="tbc_04">
|
|
||||||
<% @comprehensive_evaluation.nil? || @comprehensive_evaluation.count == 0 || @comprehensive_evaluation.each do |jour| %>
|
|
||||||
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="ping_undis" id="tbc_05">
|
|
||||||
<%= @anonymous_comments.nil? || @anonymous_comments.each do |jour| %>
|
|
||||||
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><!---ping_list end--->
|
|
||||||
</div>
|
</div>
|
|
@ -1,9 +1,19 @@
|
||||||
|
//教师评论
|
||||||
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
||||||
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||||
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
|
||||||
|
//匿评
|
||||||
|
<% elsif @add_jour.is_comprehensive_evaluation == 2 %>
|
||||||
|
// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||||
|
// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||||
|
HoverLi(5);
|
||||||
|
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true})) %>')
|
||||||
|
$('#new_form_user_message').val("");
|
||||||
|
$('#new_form_reference_user_id').val("");
|
||||||
|
//留言
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
HoverLi(3);
|
||||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true})) %>')
|
||||||
$('#new_form_user_message').val("");
|
$('#new_form_user_message').val("");
|
||||||
$('#new_form_reference_user_id').val("");
|
$('#new_form_reference_user_id').val("");
|
||||||
<% end %>
|
<% end %>
|
|
@ -1850,3 +1850,4 @@ en:
|
||||||
label_homework_without_description: The homework without any description!
|
label_homework_without_description: The homework without any description!
|
||||||
label_teacher_comments: Teacher comments
|
label_teacher_comments: Teacher comments
|
||||||
label_anonymous_comments: Anonymous comments
|
label_anonymous_comments: Anonymous comments
|
||||||
|
label_anonymous: Anonymous
|
|
@ -2182,3 +2182,4 @@ zh:
|
||||||
label_sure_exit_homework: 是否确认退出该作业
|
label_sure_exit_homework: 是否确认退出该作业
|
||||||
label_teacher_comments: 教师评论
|
label_teacher_comments: 教师评论
|
||||||
label_anonymous_comments: 匿评
|
label_anonymous_comments: 匿评
|
||||||
|
label_anonymous: 匿名
|
Loading…
Reference in New Issue