<% 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 %> <% is_member_work = @homework.homework_type == 3 && work.student_work_projects.empty? %> <% if !is_member_work %>
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
<% else %> <% end %>
<%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => is_member_work} %>
收起