$("#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 %>
    $("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);
<% 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%>
