<?php 
session_start();
include"../../../../inc/conn.php";
$id         = $_POST['id'];
$unit       = $_POST['unit'];
$q=mysqli_query($connect,"select * from tb_essai where id_essai='".$id."'");
$r=mysqli_fetch_array($q);
?>
    <link href="assets/plugins/summernote/summernote.css" rel="stylesheet">

    <form action="keyessai" method="POST">
            
        <input type="hidden" name="id_essai" value="<?php echo $r['id_essai'];?>">
        <input type="hidden" name="id_unit" value="<?php echo $unit;?>">


   

        <div class="form-group">
            <label for="exampleInputEmail1">Set Kunci Jawaban</label>
            
            <select name="kunci" class="form-control">
                <option value="A" <?php if($r['kunci']=='A'){echo"Selected";}?>>A</option>
                <option value="B" <?php if($r['kunci']=='B'){echo"Selected";}?>>B</option>
                <option value="C" <?php if($r['kunci']=='C'){echo"Selected";}?>>C</option>
                <option value="D" <?php if($r['kunci']=='D'){echo"Selected";}?>>D</option>
                <option value="E" <?php if($r['kunci']=='E'){echo"Selected";}?>>E</option>
            </select>

        </div>

        
    
        <div class="modal-footer justify-content-between">
              
              <button type="submit" class="btn btn-primary">Simpan</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        
        </div>

       
        </form>        


        <script src="assets/plugins/summernote/summernote-bs4.min.js" defer></script>
        <script>
          $(document).ready(function() {
                $('.summernote').summernote({
                    height: 130,
                    toolbar: [
                        ['style', ['bold', 'italic', 'underline', 'clear']],
                        ['list', ['ul', 'ol']],
                        ['para', ['paragraph']],

                        ['insert', ['link','picture','video','table']],
        
                  ]
                });

           });

        </script>