<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="author" content="Ranajoy, Anant">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Hackathon</title>
    <link rel="stylesheet" type="text/css" href="{{url_for('.static', filename='bootstrap.min.css')}}">
    <link rel="stylesheet" type="text/css" href="{{url_for('.static', filename='anscss.css')}}">
    <link href="https://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Bitter" rel="stylesheet">
</head>
<body>
    <div class="container-fluid">
        <header class="row">
            <span class="col-md-4 col-xs-5 h">
                <a href="#" class="ah">Hackathon</a>
            </span>
            <span class="col-md-4 col-xs-3 text-center">
                <p id="demo" style="color: white; font-size: 18px; padding-top: 3px;"></p>
                <script>
                    // Set the date we're counting down to
                    var countDownDate = new Date("Sep 19, 2017 18:00:00").getTime();
                    // Update the count down every 1 second
                    var countdownfunction = setInterval(function() {
                    // Get todays date and time
                    var now = new Date().getTime();
                    // Find the distance between now an the count down date
                    var distance = countDownDate - now;
                    // Time calculations for days, hours, minutes and seconds
                    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
                    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
                    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
                    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
                    // Output the result in an element with id="demo"
                    document.getElementById("demo").innerHTML = days + "d " + hours + "h "
                    + minutes + "m " + seconds + "s ";
                    // If the count down is over, write some text
                    if (distance < 0) {
                        clearInterval(countdownfunction);
                        document.getElementById("demo").innerHTML = "EXPIRED";
                    }
                    }, 1000);
                </script>
            </span>
            <span class="col-md-4 col-xs-4 text-right h">
                <a href="/logout" class="ah">Logout</a>
            </span>
        </header>
        <div class="modal-body row">
            <div style="float:right;margin-right:2.5em;"><h3>Answers checked : {{d}}</h3></div>
            <div style="float:right;margin-right:2.5em;"><h3>Remaining : {{e}}</h3></div>
            <div  class="col-md-3 nqbar">
            <div style=" margin-right:2.5em;">
            <a href="/table"> <h3>Recheck Marks</h3></a>
            </div>
            S.no = {{i}}<br/>
            language={{language}}
           <div style="float: right;color:red">
                {% if checked1=='1' %}
                    <h4><u>Passed First Layer</u></h4>
                {% endif %}
                {% if updated=='1' %}
                    <h4><u>Updation Performed</u></h4>
                {% endif %}
                {% if checked2=='1' %}
                    <h4><u>Passed Second Layer</u></h4>
                {% endif %}
            </div>
        </div>
        <div class="col-md-12 tf">
            <h4>Ques No- {{quesn}}</h4>
        </div>
        </div>
        <div class="col-md-9 qbar">
            <div class="row">
            <div class="col-md-12 tf">
                <h4>Title = {{ques|safe}}</h4>
            </div>
            <div class="col-md-12 tf">
                <h4>Description<br/></h4> {{desc|safe}}</p>
            </div>
            <div class="col-md-12 tf">
                <pre><textarea class="textinput" name="ans">{{val|safe}}</textarea></pre>
            </div>
        </div>
        <form action = "{{ url_for('update') }}" method = "POST">
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Input Test case </label>
        <input type="number" min="0" max="2" name="input_test_case" class="form-control col-md-4 col-xs-6" value="{{input_case}}" /></div>
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Variation Test case </label>
        <input type="number" min="0" max="2" name="variation_test_case" class="form-control col-md-4 col-xs-6" value="{{var}}" /></div>
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Garbage Test case </label>
        <input type="number" min="0" max="2" name="garbage_test_case" class="form-control col-md-4 col-xs-6" value="{{gar}}"/></div>
        <div class="form-group row"><br/>
        <label class="col-md-2 col-xs-4 text-align">User Defined Function </label>
        <input type="number" min="0" max="2" name="user_defined_function" class="form-control col-md-4 col-xs-6" value="{{user_defined}}" />
        </div>
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Indentation/documentation </label>
        <input type="number" min="0" max="2" name="indentation" class="form-control col-md-4 col-xs-6" value="{{indent}}" /></div>
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Extra Variable </label>
        <input type="number" min="-2" max="0" name="extra_variable" class="form-control col-md-4 col-xs-6" value="{{extra_var}}" /></div>
        <div class="form-group row">
        <label class="col-md-2 col-xs-4 text-align">Logic</label>
        <input type="number" min="0" max="2" name="time_taken" class="form-control col-md-4 col-xs-6" value="{{time}}"/></div>
        <input name="i" type="hidden" value="{{i}}" ><br/>
        <span class="col-md-3">
            <button type="submit" class="btn btn-default">Update &diams; Next</button>
        </span>
      </form>
    <form action = "{{ url_for('pra') }}" method = "POST">
        <span class="col-md-2">
            <button type="submit" class="btn btn-default">
             Skip &diams; Next</button>
             <input name="level" type="hidden" value="{{i}}" >
        </span>
    </form>
    <form action = "{{ url_for('checked') }}" method = "POST">
        <span class="col-md-2">
            <button type="submit" class="btn btn-default">
             Checked &diams; No change needed</button>
             <input name="level" type="hidden" value="{{i}}" >
        </span>
    </form>
</body>
</html>