学生作品列表打开报500

cxt_course
cxt 10 years ago
parent 1263e4cac0
commit 5b234580a8

@ -45,8 +45,9 @@
<% end%> <% end%>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
<% if !@is_evaluation && !@is_teacher %>
<% work=@homework.student_works.where("user_id = ?",User.current.id).first %> <% work=@homework.student_works.where("user_id = ?",User.current.id).first %>
<% unless @is_evaluation %> <% unless work.nil? %>
<% if @homework.homework_type == 2 %> <% if @homework.homework_type == 2 %>
$("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>work,:score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>"); $("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>work,:score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>");
@ -79,6 +80,7 @@
$("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work => work, :score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>"); $("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work => work, :score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>");
<% end %> <% end %>
<% end %> <% end %>
<% end %>
$('#score_<%= work.id%>').peSlider({range: 'min'}); $('#score_<%= work.id%>').peSlider({range: 'min'});
<% end %> <% end %>
}); });

Loading…
Cancel
Save