<% @page_title = @course.name %>

<% @course.chapters.each do |ch| %>
  <h2>Chapter: <%= ch.name %></h2>

  <% unless ch.notes.empty? %>
    <div>
      <%= ch.notes %>
    </div>
  <% end %>

  <% ch.assignments.each do |aa| %>
    <h3><%= aa.name %></h3>  

    <% unless aa.assignment.empty? %>
      <div class="panel panel-default" style="padding: 1ex">
        <%= aa.assignment %>
      </div>
    <% end %>

    <% unless aa.assignment_file.empty? %>
      <p><strong>Assignment Download:</strong>
      <%= link_to aa.assignment_file, aa.assignment_file_path %></p>
    <% end %>

  <% end %>
<% end %>

<% @page_title = @course.name %>

<% @course.chapters.each do |ch| %>
  <h2>Chapter: <%= ch.name %></h2>

  <% unless ch.notes.empty? %>
    <div>
      <%= raw ch.notes %>
    </div>
  <% end %>

  <% ch.assignments.each do |aa| %>
    <h3><%= aa.name %></h3>  

    <% unless aa.assignment.empty? %>
      <div class="panel panel-default" style="padding: 1ex">
        <%= raw aa.assignment %>
      </div>
    <% end %>

    <% unless aa.assignment_file.empty? %>
      <p><strong>Assignment Download:</strong>
      <%= link_to aa.assignment_file, aa.assignment_file_path %></p>
    <% end %>

  <% end %>
<% end %>

Allow HTML in public view.
Allow HTML in public view.
