|
|
|
@ -2,20 +2,23 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti
|
|
|
|
|
$('#score_<%= @work.id%>').peSlider({range: 'min'});
|
|
|
|
|
|
|
|
|
|
<% if @is_new%>
|
|
|
|
|
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %></div>");
|
|
|
|
|
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %></div>");
|
|
|
|
|
<% else %>
|
|
|
|
|
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
|
|
|
|
|
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
|
|
|
|
|
<% end%>
|
|
|
|
|
|
|
|
|
|
$("#score_list_<%= @work.id%>").removeAttr("style");
|
|
|
|
|
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
|
<% if @homework.homework_type == 1%>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% else%>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% end%>
|
|
|
|
|
<% if @homework.homework_type == 1%>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% elsif @homework.homework_type == 2%>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% else%>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% end%>
|
|
|
|
|
<% else %>
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
$("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>");
|
|
|
|
|
<% end%>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|