%h1 Listing questions

%table
  %thead
    %tr
      %th User
      %th
      %th
      %th

  %tbody
    - @questions.each do |question|
      %tr
        %td= get_user(question.user_id).username
        %td= question.all_lectures
        %td= link_to 'Show', question
        %td= link_to 'Edit', edit_question_path(question)
        %td= link_to 'Destroy', question, :method => :delete, :data => { :confirm => 'Are you sure?' }
        %td= question.all_topics

%br

- if is_instructor?
  = link_to 'New Multiple Choice Questions', new_question_path
  \|
  = link_to 'New Short Answer Question', short_question_path


%h1 Listing questions

%table
  %thead
    %tr
      %th Creator
      %th Lectures
      %th Actions
      %th Topics

  %tbody
    - @questions.each do |question|
      %tr
        %td= get_user(question.user_id).username
        %td= question.all_lectures
        %td
          = link_to 'Show', question
          \-
          = link_to 'Edit', edit_question_path(question)
          \-
          = link_to 'Destroy', question, :method => :delete, :data => { :confirm => 'Are you sure?' }
        %td= question.all_topics

%br

- if is_instructor?
  = link_to 'New Multiple Choice Questions', new_question_path
  \|
  = link_to 'New Short Answer Question', short_question_path


Clean up question display table
Clean up question display table

Make sure to label all columns and put "Actions" in the same cell.
