parent
4bbc76a217
commit
bed9adaa7a
@ -1,35 +1,31 @@
|
|||||||
//教师评论
|
//教师评论
|
||||||
<% if @cur_is_comprehensive_evaluation == "1" %>
|
<% if @is_teacher %>
|
||||||
HoverLi(4);
|
HoverLi(4);
|
||||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>');
|
$('#jour_count_4').html('<%= @teacher_stars.count %>');
|
||||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>');
|
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true})) %>');
|
||||||
//匿评
|
//匿评
|
||||||
<% elsif @cur_is_comprehensive_evaluation == "2" %>
|
<% elsif @is_anonymous_comments %>
|
||||||
$('#add_jour').html('<%= escape_javascript(render(:partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0,
|
|
||||||
:is_comprehensive_evaluation => @is_comprehensive_evaluation,
|
|
||||||
:cur_type => @cur_type, :cur_page => @cur_page, :m_score => @m_score, :is_teacher => false})) %>');
|
|
||||||
HoverLi(5);
|
HoverLi(5);
|
||||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>');
|
$('#jour_count_5').html('<%= @student_stars.count %>');
|
||||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>');
|
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => true})) %>');
|
||||||
//留言
|
//留言
|
||||||
<% else %>
|
<% else %>
|
||||||
HoverLi(3);
|
HoverLi(3);
|
||||||
$('#jour_count_3').html('<%= @jours.count %>');
|
$('#jour_count_3').html('<%= @obj_count %>');
|
||||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>');
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour, :obj_pages => @obj_pages, :obj_count => @obj_count,:homework => @homework})) %>');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
$('#new_form_user_message').val("");
|
$('#new_form_user_message').val("");
|
||||||
$('#new_form_reference_user_id').val("");
|
$('#new_form_reference_user_id').val("");
|
||||||
|
|
||||||
<% if @cur_is_comprehensive_evaluation == "1" || @cur_is_comprehensive_evaluation == "2" %>
|
<% if @is_anonymous_comments || @is_teacher %>
|
||||||
<% if @cur_type == "1" %>
|
<% if @cur_type == "1" %>
|
||||||
$("#tbc_01").html('<%= escape_javascript(render(:partial => 'homework_attach/homeworks_list',:locals => {:homeworks => @homework_list,
|
$("#tbc_01").html('<%= escape_javascript(render(:partial => 'homework_attach/homeworks_list',:locals => {:homeworks => @homework_list,
|
||||||
:homework_count => @obj_count,
|
:homework_count => @obj_count,
|
||||||
:remote => false,:is_student_batch_homework => false})) %>');
|
:remote => false,:is_student_batch_homework => false})) %>');
|
||||||
<% elsif @cur_type == "2" || @cur_type == "3" || @cur_type == "4" %>
|
<% elsif @cur_type == "2" || @cur_type == "3" || @cur_type == "4" %>
|
||||||
<% is_teacher = is_course_teacher(User.current,@homework.bid.courses.first) %>
|
|
||||||
$("#homework_li_<%= @homework.id%>").html('<%= escape_javascript(render(:partial => 'homework_attach/homework',:locals => {:homework => @result_homework || @homework,
|
$("#homework_li_<%= @homework.id%>").html('<%= escape_javascript(render(:partial => 'homework_attach/homework',:locals => {:homework => @result_homework || @homework,
|
||||||
:is_student_batch_homework => @is_student_batch_homework || false,
|
:is_student_batch_homework => @is_student_batch_homework || false,
|
||||||
:is_my_homework => false, :is_teacher => is_teacher})) %>');
|
:is_my_homework => false, :is_teacher => @is_teacher})) %>');
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -1,19 +1,8 @@
|
|||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @is_comprehensive_evaluation == 1 %>
|
//只有留言才能被删除
|
||||||
HoverLi(4);
|
HoverLi(3);
|
||||||
$('#jour_count_4').html('<%= @comprehensive_evaluation.count %>');
|
$('#jour_count_3').html('<%= @obj_count %>');
|
||||||
$('#tbc_04').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true,:is_jour => false})) %>');
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @jour, :obj_pages => @obj_pages, :obj_count => @obj_count, :homework => @homework})) %>');
|
||||||
//匿评
|
|
||||||
<% elsif @is_comprehensive_evaluation == 2 %>
|
|
||||||
HoverLi(5);
|
|
||||||
$('#jour_count_5').html('<%= @anonymous_comments.count %>');
|
|
||||||
$('#tbc_05').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false,:is_jour => false})) %>');
|
|
||||||
//留言
|
|
||||||
<% else %>
|
|
||||||
HoverLi(3);
|
|
||||||
$('#jour_count_3').html('<%= @jours.count %>');
|
|
||||||
$('#tbc_03').html('<%= escape_javascript(render(:partial => "homework_attach/jour",:locals => {:jours => @jour,:show_score => false,:show_name => true,:is_jour => true})) %>');
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
Reference in new issue