<% if @hw_status == 5 %> $("#homework_post_brief").html("<%= escape_javascript(render :partial => 'contestant_works/work_post_brief', :locals => {:homework => @contestwork, :is_teacher => @is_teacher}) %>"); <% else %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/contest_work', :locals => {:activity => @contestwork,:user_activity_id =>@user_activity_id,:hw_status=>@hw_status}) %>"); <% end %> <% if @user_activity_id != @contestwork.id %> sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity"); <% else %> sd_create_editor_from_data(<%= @contestwork.id%>,"","100%", "<%=@contestwork.class.to_s%>"); <% end %>