<?php
defined('BASEPATH') or exit('No direct script access allowed');
if ($this->session->userdata('level') == 1) {
    $level = 'admin';
} else {
    $level = 'teacher';
}
?>

<!-- Start First Row -->
<div class="row">

    <div class="col m12 s12">
        <div class="card">
            <div class="card-content">
                <h5>
                    <center>Daftar Pelanggaran <?= $classroom->name; ?></center> <br />
                    <center>
                        <a href="<?= site_url($level . '/classroom/add_students/' . encode($classroom->ID)); ?>" class="btn-small green">Masukan <?= $this->config->item('student'); ?> <i class="material-icons right">people</i></a>
                        <a href="<?= site_url($level . '/classroom/check_code/' . strtoupper($classroom->code)); ?>" class="btn-small green" title="Daftar Hadir">Daftar Hadir<i class="material-icons right">list</i></a>
                        <a href="<?= site_url('admin/violation/detail/' . strtoupper($classroom->code)); ?>" class="btn-small green" title="Daftar Pelanggaran">Pelanggaran<i class="material-icons right">list</i></a>
                        <a href="<?= site_url($level . '/classroom/analisa_pilihan_ganda/' . strtoupper($classroom->code)); ?>" class="btn-small green" title="Export">Analisis PG<i class="material-icons right">file_download</i></a>
                        <a href="javascript:window.open('<?= site_url($level . '/classroom/print_classroom/' . strtoupper($classroom->code)); ?>','mywindowtitle','width=700,height=700')"" class=" btn-small green" title="Print">Print <i class="material-icons right">local_printshop</i></a> <a href="<?= site_url($level . '/classroom/download_excel/' . strtoupper($classroom->code)); ?>" class="btn-small green" title="Export">Export<i class="material-icons right">file_download</i></a> <a href="<?= site_url($level . '/quiz/set_all_essay_score/' . strtoupper($classroom->code)); ?>" class="btn-small green">Penilaian Essai <i class="material-icons right">create</i></a>
                    </center>
                </h5>

                <!-- cek apakah hanya soal pilihan ganda atau disertai essai -->
                <table id="violationList">
                    <thead>
                        <tr>
                            <th><?= $this->config->item('student_code'); ?></th>
                            <th>Nama Lengkap</th>
                            <th>Waktu Pelanggaran</th>
                            <th>Status</th>
                            <th>Aksi</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>