{% extends "base.html" %}

{% block title %}Instructions and Rules {% endblock %}
{% block pagetitle %}Online Test {% endblock %}
{% block formtitle %}Important instructions & rules {% endblock %}
{% block content %}

         {% if enable_quiz_time or disable_quiz_time %}
              {% if quiz_expired %}
                  <div class="alert alert-error">
                      This Quiz has expired. You can no longer attempt this Quiz.
                  <br/>
                  </div>
              {% else %}
                  <div class="alert">
                      You can attempt this Quiz at any time between {{ enable_quiz_time }} and {{ disable_quiz_time }}
                      <br/>
                      You are not allowed to attempt the Quiz before or after this duration
                  <br/>
                  </div>
              {% endif %}
          {% endif %}
          <p> Welcome <strong>{{user.first_name.title}} {{user.last_name.title}}</strong>, to the programming quiz! </p>
          <p>
              This examination system has been developed with the intention of making you 
              learn programming and be assessed in an interactive and fun manner.
              You will be presented with a series of programming questions and problems that 
              you will answer online and get immediate feedback for.
          </p>
          <p> Here are some important instructions and rules that you should understand carefully.</p> 
         <ul>
          <li>For any programming questions, you can submit solutions as many times as you want without a penalty.  You may skip questions and solve  them later.
          </li>
          <li> You <strong>may</strong> use your computer's Python/IPython shell or an editor to solve the problem and cut/paste the solution to the web interface.
          </li>
          <li> <strong>You are <strong>not allowed</strong> to use any internet resources, i.e. no google etc.</strong> </li>
          <li> Do not copy or share the questions or answers with anyone until the exam is complete <strong>for everyone</strong>.</li>
          <li> <strong>All</strong> your attempts at the questions are logged. Do not try to outsmart and break the testing system.  If you do, we know who you are and we will expell you from the course.  You have been warned.
          </li>
         </ul>
          <p> We hope you enjoy taking this exam !!!</p>

          <form action="{{URL_ROOT}}/exam/quizzes/" method="post" align="center">
           {% csrf_token %}
           <center><button class="btn" name="home">Home</button></center>
          </form>
          {% if not quiz_expired %}
              <form action="{{URL_ROOT}}/exam/start/{{ attempt_num }}/{{ paper_id }}/" method="post" align="center">
               {% csrf_token %}
               <center><button class="btn" type="submit" name="start">Start Exam!</button></center>
              </form>
          {% endif %}
{% endblock content %}
