$("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'add_score',:locals => {:work => @work,:score => @new_score}) %>");
$('#score_<%= @work.id%>').peSlider({range: 'min'});

<% if @is_new%>
    $("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @new_score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last_a}) %></div>");
<% else %>
    $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last}) %>");
<% end%>

var num = $("#work_num_<%= @work.id%>").html();
$("#score_list_<%= @work.id%>").removeAttr("style");

<% if @is_teacher %>
    <% if @homework.homework_type == 3 %>
        <% if @is_group_leader %>
            $("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_work', :locals => {:student_work => @work}) %>");
            $("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
        <% else %>
            <% anon_count = @work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
            $("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count}) %>");
        <% end %>
    <% else %>
        $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1}) %>");
        $("#work_num_<%= @work.id%>").html(num);
    <% end %>
<% else %>
    $("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1}) %>");
    $("#work_num_<%= @work.id%>").html(num);
<% end%>

$("#student_work_count").html("<%=@count %>");
