<% is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin? %> <% if @homework.homework_type != 3 %> <% is_my_work = work.user == User.current%> <% else %> <% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %> <% is_my_work = pro && pro.student_work_id == work.id%> <% end %>
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
<%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%>
收起