<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%
  js_env :QUIZZES => {:QUIZ => true}
  provide :page_title, (@quiz.quiz_title || !@quiz.quiz_title.empty? ? @quiz.quiz_title : t(:default_page_title, 'New Quiz'))
%>

<% if editing_restricted?(@quiz, :content) %>
  <% provide_blank :right_side %>
<% else %>
  <% provide :right_side, render(:partial => 'shared/wiki_sidebar') %>
<% end %>

<h1 class="screenreader-only"><%= @quiz.quiz_title %></h1>

<div id="quiz_edit_wrapper">
  <%= render :partial => "quiz_edit" %>
</div>


<div class="question_generated" style="display: none;">
  <div class="question_generated_description"></div>
  <textarea style="width: 600px; height: 400px;" id="copy_paste_box"></textarea>
</div>
<%= render :partial => 'equations_help' %>
<div id="ip_filters_dialog" style="display: none;">
  <h2><%= t('headers.ip_filters', "What are Quiz IP Filters?") %></h2>
  <p class="explanation"><%= t(:ip_filters, <<-TEXT)
  Quiz IP filters are a way to limit access to quizzes to
  computers in a specified IP range.  Filters can be a comma-separated
  list of addresses, or an address followed by a mask
  ("192.168.217.1", "192.168.217.1/24" or "192.168.217.1/255.255.255.0").
  TEXT
  %></p>
  <p class="searching_message"><%= t(:retrieving_filters, "Retrieving Filters...") %></p>
  <table class="filters" style="display: none;">
    <tbody>
      <tr class="ip_filter blank" style="display: none;" title="<%= t('titles.click_to_select_filter', "Click to select this filter") %>">
        <td class="name_and_account">
          <div class="name">&nbsp;</div>
          <div class="account">&nbsp;</div>
        </td>
        <td class="filter">&nbsp;</td>
      </tr>
    </tbody>
  </table>
</div>
