<%
  content_for :section_title, "Questions"
  content_for :title, "Questions - Skills Assessment Admin"
%>

<h1>Questions</h1>

<% quizzes = @questions.group_by{ |q| q.quiz.name } %>
<% quizzes.each do |quiz, questions| %>
  <h1><%= quiz %></h1>
  <%= render partial: 'admin/question/table_list', locals: { questions: questions } %>
  <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: "" }) %>
<% end %>
