diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb index b5ff8f064..dbf7291cb 100644 --- a/app/views/student_work/_programing_work_show.html.erb +++ b/app/views/student_work/_programing_work_show.html.erb @@ -3,21 +3,21 @@ -
- <%@student_work_scores.each do |score|%> -
- <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%> +
+ <%student_work_scores.each do |student_score|%> +
+ <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
<% end%>
- 收起 + 收起
\ No newline at end of file diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index cfc4129a8..1f3d44258 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -3,21 +3,21 @@ -
- <%@student_work_scores.each do |score|%> -
- <%= render :partial => 'student_work_score',:locals => {:score => score,:is_last => score == @student_work_scores.last}%> +
+ <%student_work_scores.each do |student_score|%> +
+ <%= render :partial => 'student_work_score',:locals => {:score => student_score,:is_last => student_score == student_work_scores.last}%>
<% end%>
- 收起 + 收起
\ No newline at end of file diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb index e23fcceda..c8248d86a 100644 --- a/app/views/student_work/_student_work_list.html.erb +++ b/app/views/student_work/_student_work_list.html.erb @@ -35,6 +35,14 @@ <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%> <% end%>
-
+
+ <% if student_work.user == User.current %> + <% if @homework.homework_type == 2%> + <%=render :partial => 'programing_work_show', :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %> + <% else %> + <%=render :partial => 'show' , :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %> + <% end %> + <% end %> +
<% end%> \ No newline at end of file diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb index e6b99c146..d61c4b9a1 100644 --- a/app/views/student_work/show.js.erb +++ b/app/views/student_work/show.js.erb @@ -3,9 +3,9 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0){ } else{ <% if @homework.homework_type == 2%> - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>"); + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>"); <% else%> - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>"); <% end%> $('#score_<%= @work.id%>').peSlider({range: 'min'}); } \ No newline at end of file