<% if @project %>
<%= render :partial => 'project_news', locals: {project: @project} %>
<% elsif @course %>
<%= render :partial => 'course_news', locals: {course: @course} %>
<% end %>