<% provide(:title, "Team Quiz: Question") %>

<nav class="list-group">
	<% @questions.each do |question| %>
    <% if current_user and current_user.admin? %>
	   <%= link_to question.title, edit_quiz_question_path(question), class: "list-group-item" %>
    <% else %>
    <%= link_to question.title, question, class: "list-group-item" %>
    <% end %>
  <% end %>
</nav>

<%= paginate @questions %>

<% if current_user and current_user.admin? %>
  <p><%= link_to "New Question", new_quiz_question_path, class: "btn btn-default" %></p>
<% end %>

<% provide(:title, "Team Quiz: Question") %>

<nav class="list-group">
	<% @questions.each do |question| %>
    <% if current_user and current_user.admin? %>
		<% css_class = "active" if question.visible %>
	   <%= link_to question.title, edit_quiz_question_path(question), class: "list-group-item #{css_class}" %>
    <% else %>
    <%= link_to question.title, question, class: "list-group-item" %>
    <% end %>
  <% end %>
</nav>

<%= paginate @questions %>

<% if current_user and current_user.admin? %>
  <p><%= link_to "New Question", new_quiz_question_path, class: "btn btn-default" %></p>
<% end %>

Add active css class when question is visible
Add active css class when question is visible
