2014-11-03 14:47:28 +08:00
|
|
|
//教师评论
|
2014-12-05 09:43:03 +08:00
|
|
|
<% if @is_teacher %>
|
2014-12-02 16:29:47 +08:00
|
|
|
HoverLi(4);
|
2014-12-05 09:43:03 +08:00
|
|
|
$('#jour_count_4').html('<%= @teacher_stars.count %>');
|
2014-12-05 10:03:49 +08:00
|
|
|
$('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true,:show_jour => true})) %>');
|
2015-04-28 12:21:35 +08:00
|
|
|
$("#homework_attach_jour_attachment").html('<%= escape_javascript(render :partial => 'attachments/form') %>');
|
2014-11-03 14:47:28 +08:00
|
|
|
//匿评
|
2014-12-05 09:43:03 +08:00
|
|
|
<% elsif @is_anonymous_comments %>
|
2014-12-02 16:29:47 +08:00
|
|
|
HoverLi(5);
|
2014-12-05 09:43:03 +08:00
|
|
|
$('#jour_count_5').html('<%= @student_stars.count %>');
|
2014-12-05 10:03:49 +08:00
|
|
|
$('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false || @is_teacher, :show_jour => false})) %>');
|
2015-04-28 12:21:35 +08:00
|
|
|
$("#homework_attach_jour_attachment").html('<%= escape_javascript(render :partial => 'attachments/form') %>');
|
2014-11-03 14:47:28 +08:00
|
|
|
//留言
|
2014-05-27 20:01:21 +08:00
|
|
|
<% else %>
|
2014-12-02 16:29:47 +08:00
|
|
|
HoverLi(3);
|
2014-12-05 09:43:03 +08:00
|
|
|
$('#jour_count_3').html('<%= @obj_count %>');
|
|
|
|
$('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jour, :obj_pages => @obj_pages, :obj_count => @obj_count,:homework => @homework})) %>');
|
2014-11-03 15:28:54 +08:00
|
|
|
<% end %>
|
2014-12-02 16:29:47 +08:00
|
|
|
|
2014-11-03 15:28:54 +08:00
|
|
|
$('#new_form_user_message').val("");
|
2014-12-02 16:21:36 +08:00
|
|
|
$('#new_form_reference_user_id').val("");
|
|
|
|
|
2014-12-05 09:43:03 +08:00
|
|
|
<% if @is_anonymous_comments || @is_teacher %>
|
2014-12-02 16:21:36 +08:00
|
|
|
<% if @cur_type == "1" %>
|
|
|
|
$("#tbc_01").html('<%= escape_javascript(render(:partial => 'homework_attach/homeworks_list',:locals => {:homeworks => @homework_list,
|
|
|
|
:homework_count => @obj_count,
|
|
|
|
:remote => false,:is_student_batch_homework => false})) %>');
|
|
|
|
<% elsif @cur_type == "2" || @cur_type == "3" || @cur_type == "4" %>
|
|
|
|
$("#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,
|
2014-12-05 09:43:03 +08:00
|
|
|
:is_my_homework => false, :is_teacher => @is_teacher})) %>');
|
2014-12-02 16:21:36 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|