<% if params[:user_page].nil? %> $("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/project_info') %>'); if(document.getElementById("course_is_public")) { <% if @course.is_public == 0%> $("#course_is_public").attr("checked",false); <% elsif @course.is_public == 1 %> $("#course_is_public").attr("checked",true); <% end %> } <% else %> <% if @course.is_public? %> $("#set_course_public_<%= @course.id %>").text("设为私有"); <% else %> $("#set_course_public_<%= @course.id %>").text("设为公开"); <% end %> <% end %>