<?php
session_start();
require_once '../includes/config.php';
require_once '../includes/functions.php';

// Cek apakah user sudah login dan memiliki akses admin
if (!isset($_SESSION['user_id']) || $_SESSION['user_role'] != 'admin_soal') {
    header('Location: ../login.php');
    exit;
}

$error = '';
$success = '';

// Daftar department kedokteran gigi
$departments = [
    'Odontologi Forensik',
    'Konservasi Gigi',
    'Bedah Mulut',
    'Periodonsia', 
    'Orthodonti',
    'Prostodonsia',
    'Ilmu Kesehatan Gigi Masyarakat',
    'Ilmu Kedokteran Gigi Anak',
    'Radiologi Kedokteran Gigi',
    'Penyakit Mulut'
];

// Fungsi untuk generate nomor registrasi otomatis
function generateNomorRegistrasi($pdo) {
    // Ambil nomor urut terakhir
    $stmt = $pdo->query("SELECT nomor_registrasi FROM bank_soal_praktik ORDER BY id DESC LIMIT 1");
    $last_soal = $stmt->fetch(PDO::FETCH_ASSOC);
    
    $next_number = 1; // Default jika belum ada data
    
    if ($last_soal && preg_match('/^(\d+)\/FKG-UMS\/U\.P\//', $last_soal['nomor_registrasi'], $matches)) {
        $next_number = intval($matches[1]) + 1;
    }
    
    // Format: 01/FKG-UMS/U.P/10/2025
    $current_month = date('m');
    $current_year = date('Y');
    
    return sprintf('%02d', $next_number) . "/FKG-UMS/U.P/" . $current_month . "/" . $current_year;
}

// Generate nomor registrasi otomatis untuk form baru
$auto_nomor_registrasi = generateNomorRegistrasi($pdo);

// Proses form jika ada data yang dikirim
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // Ambil data dari form
    $nomor_registrasi = $_POST['nomor_registrasi'] ?? '';
    $tinjauan1 = $_POST['tinjauan1'] ?? '';
    $tinjauan2 = $_POST['tinjauan2'] ?? '';
    $sub_tinjauan2 = $_POST['sub_tinjauan2'] ?? '';
    $tinjauan3 = $_POST['tinjauan3'] ?? '';
    $tinjauan4 = $_POST['tinjauan4'] ?? '';
    $tujuan = $_POST['tujuan'] ?? '';
    $skenario_klinik = $_POST['skenario_klinik'] ?? '';
    $tugas_kandidat = $_POST['tugas_kandidat'] ?? '';
    $tugas_penguji = $_POST['tugas_penguji'] ?? '';
    $instruksi_pasien = $_POST['instruksi_pasien'] ?? '';
    $peralatan = $_POST['peralatan'] ?? '';
    $gambar_soal = $_POST['gambar_soal'] ?? '';
    $department = $_POST['department'] ?? '';
    $referensi = $_POST['referensi'] ?? '';
    $penulis = $_POST['penulis'] ?? '';
    
    // Validasi data
    if (empty($nomor_registrasi) || empty($tinjauan1) || empty($skenario_klinik)) {
        $error = 'Nomor Registrasi, Tinjauan 1, dan Skenario Klinik harus diisi!';
    } else {
        // Simpan ke database
        try {
            $stmt = $pdo->prepare("INSERT INTO bank_soal_praktik (
                nomor_registrasi, tinjauan1, tinjauan2, sub_tinjauan2, tinjauan3, tinjauan4,
                tujuan, skenario_klinik, tugas_kandidat, tugas_penguji, instruksi_pasien,
                peralatan, gambar_soal, department, referensi, penulis
            ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
            
            $stmt->execute([
                $nomor_registrasi, $tinjauan1, $tinjauan2, $sub_tinjauan2, $tinjauan3, $tinjauan4,
                $tujuan, $skenario_klinik, $tugas_kandidat, $tugas_penguji, $instruksi_pasien,
                $peralatan, $gambar_soal, $department, $referensi, $penulis
            ]);
            
            $success = 'Soal praktik berhasil disimpan!';
            
            // Generate nomor registrasi baru untuk form selanjutnya
            $auto_nomor_registrasi = generateNomorRegistrasi($pdo);
            
            // Reset form jika berhasil
            $_POST = array();
            
        } catch (PDOException $e) {
            $error = 'Terjadi kesalahan: ' . $e->getMessage();
        }
    }
}

// Ambil data soal praktik untuk ditampilkan
$soal_praktik = [];
try {
    $stmt = $pdo->query("SELECT * FROM bank_soal_praktik ORDER BY created_at DESC");
    $soal_praktik = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
    $error = 'Gagal mengambil data soal: ' . $e->getMessage();
}
?>
<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bank Soal Praktik - SOCA OSCE System</title>
    <link rel="stylesheet" href="../assets/css/style.css">
    <link rel="stylesheet" href="../assets/css/bank_soal_praktik.css">
</head>
<style>
    .sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;

}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #080808ff;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #b2bdecff;
    color: white;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nomor-registrasi-info {
    background: #f0f8ff;
    border: 1px solid #d1e7ff;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.nomor-registrasi-info strong {
    color: #2c5aa0;
}

.nomor-registrasi-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nomor-registrasi-input {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border: 2px solid #28a745 !important;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.nomor-registrasi-input:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

.nomor-registrasi-info {
    background: #e7f3ff;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.nomor-registrasi-info .fas.fa-info-circle {
    color: #007bff;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-text {
    color: #0056b3;
    font-weight: 500;
    flex: 1;
}

.format-info {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #b3d7ff;
    font-size: 12px;
    line-height: 1.4;
}

.format-info code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
}

/* Auto-generated badge */
.auto-generated-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 10px;
}
/* Sequence Info Styles */
.sequence-info {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.sequence-info .fas {
    color: #856404;
}

.sequence-info strong {
    color: #856404;
    font-size: 14px;
}

.info-content {
    flex: 1;
}

.info-text {
    display: block;
    color: #0056b3;
    font-weight: 500;
    margin-bottom: 8px;
}
/* Department Select Styles */
.department-select-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.department-select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none;
    padding-right: 40px;
}

.department-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.department-select:hover {
    border-color: #007bff;
}

.department-select:required:invalid {
    color: #6c757d;
}

.department-select option {
    padding: 10px 15px;
    border-bottom: 1px solid #f8f9fa;
}

.department-select option:checked {
    background: #007bff linear-gradient(0deg, #007bff 0%, #007bff 100%);
    color: white;
}

.department-select option:hover {
    background: #f8f9fa;
}

.department-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 3px solid #17a2b8;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #495057;
}

.department-info .fas {
    color: #17a2b8;
    flex-shrink: 0;
}

/* Enhanced select styling */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6c757d;
}

</style>
<body>
    <div class="sidebar">
    <ul class="sidebar-menu">
        <li><a href="dashboard.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a></li>
        <li><a href="bank_soal_teori.php"><i class="fas fa-book"></i> Bank Soal Teori</a></li>
        <li><a href="bank_soal_praktik.php" class="active"><i class="fas fa-clipboard-check"></i> Bank Soal Praktik</a></li>
        <li><a href="list_soal_teori.php"><i class="fas fa-list"></i> Daftar Soal Teori</a></li>
        <li><a href="list_soal_praktik.php"><i class="fas fa-list"></i> Daftar Soal Praktik</a></li>
        <li><a href="../logout.php"><i class="fas fa-sign-out-alt"></i> Logout</a></li>
    </ul>
</div>

        <div class="main-content">
            <div class="header">
                <h1>Bank Soal Uji Praktik</h1>
                <div class="user-info">
                    <span><i class="fas fa-user"></i> Halo, <?php echo $_SESSION['user_name'] ?? 'Admin'; ?></span>
                    <a href="../logout.php" class="btn btn-danger btn-sm">
                        <i class="fas fa-sign-out-alt"></i> Logout
                    </a>
                </div>
            </div>

            <div class="content">
                <?php if ($error): ?>
                    <div class="alert alert-error"><?php echo $error; ?></div>
                <?php endif; ?>
                
                <?php if ($success): ?>
                    <div class="alert alert-success"><?php echo $success; ?></div>
                <?php endif; ?>
                
                <div class="form-container">
                    <h2><i class="fas fa-plus-circle"></i> Tambah Soal Praktik Baru</h2>
                    <form method="POST" action="" id="soalPraktikForm" enctype="multipart/form-data">
                        <!-- Bagian 1: Informasi Dasar -->
                        <div class="form-section">
                            <h3 class="section-title">Informasi Dasar Soal</h3>
                            
                            <div class="form-group">
    <label for="nomor_registrasi">1. Nomor Registrasi Soal *</label>
    <div class="nomor-registrasi-container">
        <input type="text" id="nomor_registrasi" name="nomor_registrasi" 
               value="<?php echo htmlspecialchars($auto_nomor_registrasi); ?>" 
               readonly
               class="nomor-registrasi-input">
        <div class="nomor-registrasi-info">
            <i class="fas fa-info-circle"></i>
            <div class="info-content">
                <span class="info-text">Nomor registrasi di-generate otomatis dan akan terus bertambah</span>
                <div class="format-info">
                    <strong>Format:</strong> <code>NN/FKG-UMS/BB/TTTT</code><br>
                    <small>NN = Nomor Urut (auto increment), BB = Bulan Saat Ini, TTTT = Tahun Saat Ini</small>
                    <div class="sequence-info">
                        <i class="fas fa-sort-numeric-up"></i>
                        <span>Urutan saat ini: <strong><?php 
                            $parts = explode('/', $auto_nomor_registrasi);
                            echo $parts[0]; 
                        ?></strong></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
                            
                            <div class="form-row">
                                <div class="form-group">
                                    <label for="tinjauan1">2. Tinjauan 1: Kompetensi Utama *</label>
                                    <input type="text" id="tinjauan1" name="tinjauan1" 
                                           value="<?php echo htmlspecialchars($_POST['tinjauan1'] ?? ''); ?>" required>
                                </div>
                                
                                <div class="form-group">
                                    <label for="tinjauan2">3. Tinjauan 2: Kelompok Penyakit/Kelainan</label>
                                    <input type="text" id="tinjauan2" name="tinjauan2" 
                                           value="<?php echo htmlspecialchars($_POST['tinjauan2'] ?? ''); ?>">
                                </div>
                            </div>
                            
                            <div class="form-row">
                                <div class="form-group">
                                    <label for="sub_tinjauan2">4. Sub Tinjauan 2: Penyakit/Kelainan</label>
                                    <input type="text" id="sub_tinjauan2" name="sub_tinjauan2" 
                                           value="<?php echo htmlspecialchars($_POST['sub_tinjauan2'] ?? ''); ?>">
                                </div>
                                
                                <div class="form-group">
                                    <label for="tinjauan3">5. Tinjauan 3: Ranah Keterampilan Klinis</label>
                                    <input type="text" id="tinjauan3" name="tinjauan3" 
                                           value="<?php echo htmlspecialchars($_POST['tinjauan3'] ?? ''); ?>">
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="tinjauan4">6. Tinjauan 4: Bidang Ilmu</label>
                                <input type="text" id="tinjauan4" name="tinjauan4" 
                                       value="<?php echo htmlspecialchars($_POST['tinjauan4'] ?? ''); ?>">
                            </div>
                        </div>

                        <!-- Bagian 2: Konten Soal -->
                        <div class="form-section">
                            <h3 class="section-title">Konten Soal Praktik</h3>
                            
                            <div class="form-group">
                                <label for="tujuan">7. Tujuan</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="tujuan" name="tujuan" class="rich-text"><?php echo htmlspecialchars($_POST['tujuan'] ?? ''); ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="skenario_klinik">8. Skenario Klinik *</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="skenario_klinik" name="skenario_klinik" class="rich-text" required><?php echo htmlspecialchars($_POST['skenario_klinik'] ?? ''); ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="tugas_kandidat">9. Tugas untuk Kandidat</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="tugas_kandidat" name="tugas_kandidat" class="rich-text"><?php echo htmlspecialchars($_POST['tugas_kandidat'] ?? ''); ?></textarea>
                                </div>
                            </div>
                        </div>

                        <!-- Bagian 3: Instruksi dan Perlengkapan -->
                        <div class="form-section">
                            <h3 class="section-title">Instruksi dan Perlengkapan</h3>
                            
                            <div class="form-group">
                                <label for="tugas_penguji">10. Tugas untuk Penguji</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="tugas_penguji" name="tugas_penguji" class="rich-text"><?php echo htmlspecialchars($_POST['tugas_penguji'] ?? ''); ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="instruksi_pasien">11. Instruksi Untuk Pasien Simulasi</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="instruksi_pasien" name="instruksi_pasien" class="rich-text"><?php echo htmlspecialchars($_POST['instruksi_pasien'] ?? ''); ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="peralatan">12. Peralatan yang dibutuhkan</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                        <button type="button" data-command="insertUnorderedList" title="Bullet List">• List</button>
                                        <button type="button" data-command="insertOrderedList" title="Numbered List">1. List</button>
                                    </div>
                                    <textarea id="peralatan" name="peralatan" class="rich-text"><?php echo htmlspecialchars($_POST['peralatan'] ?? ''); ?></textarea>
                                </div>
                            </div>
                        </div>

                        <!-- Bagian 4: Informasi Tambahan -->
                        <div class="form-section">
                            <h3 class="section-title">Informasi Tambahan</h3>
                            
                            <div class="form-group">
                                <label for="gambar_soal">13. Gambar Soal (URL)</label>
                                <input type="text" id="gambar_soal" name="gambar_soal" 
                                       value="<?php echo htmlspecialchars($_POST['gambar_soal'] ?? ''); ?>"
                                       placeholder="Masukkan URL gambar atau path file">
                                <small class="form-help">Contoh: https://example.com/gambar.jpg atau /assets/images/soal1.png</small>
                            </div>
                            
                            <div class="form-group">
                                <label for="department">14. Department *</label>
                                <select id="department" name="department" required>
                                    <option value="">-- Pilih Department --</option>
                                    <?php foreach ($departments as $dept): ?>
                                        <option value="<?php echo htmlspecialchars($dept); ?>" 
                                            <?php echo (isset($_POST['department']) && $_POST['department'] == $dept) ? 'selected' : ''; ?>>
                                            <?php echo htmlspecialchars($dept); ?>
                                        </option>
                                    <?php endforeach; ?>
                                </select>
                                <small class="form-help">Pilih department yang sesuai dengan kompetensi soal</small>
                            </div>
                            
                            <div class="form-group">
                                <label for="referensi">15. Referensi</label>
                                <div class="text-editor">
                                    <div class="toolbar">
                                        <button type="button" data-command="bold" title="Bold"><b>B</b></button>
                                        <button type="button" data-command="italic" title="Italic"><i>I</i></button>
                                        <button type="button" data-command="underline" title="Underline"><u>U</u></button>
                                    </div>
                                    <textarea id="referensi" name="referensi" class="rich-text"><?php echo htmlspecialchars($_POST['referensi'] ?? ''); ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="penulis">16. Penulis</label>
                                <input type="text" id="penulis" name="penulis" 
                                       value="<?php echo htmlspecialchars($_POST['penulis'] ?? ''); ?>">
                            </div>
                        </div>

                        <!-- Tombol Submit -->
                        <div class="form-actions">
                            <button type="submit" class="btn btn-primary btn-large">
                                <i class="fas fa-save"></i> 17. Simpan Soal Praktik
                            </button>
                            <button type="reset" class="btn btn-secondary">
                                <i class="fas fa-undo"></i> Reset Form
                            </button>
                        </div>
                    </form>
                </div>

                <!-- Daftar Soal Praktik yang Sudah Ada -->
                <div class="soal-list">
                    <h2><i class="fas fa-list"></i> Daftar Soal Praktik</h2>
                    <?php if (empty($soal_praktik)): ?>
                        <div class="empty-state">
                            <i class="fas fa-stethoscope"></i>
                            <h3>Belum ada soal praktik</h3>
                            <p>Silakan tambah soal praktik menggunakan form di atas</p>
                        </div>
                    <?php else: ?>
                        <table class="data-table">
                            <thead>
                                <tr>
                                    <th>No. Registrasi</th>
                                    <th>Skenario Klinik</th>
                                    <th>Kompetensi Utama</th>
                                    <th>Department</th>
                                    <th>Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($soal_praktik as $soal): ?>
                                    <tr>
                                        <td><?php echo htmlspecialchars($soal['nomor_registrasi']); ?></td>
                                        <td><?php echo strip_tags(substr($soal['skenario_klinik'], 0, 100)) . '...'; ?></td>
                                        <td><?php echo htmlspecialchars($soal['tinjauan1']); ?></td>
                                        <td><?php echo htmlspecialchars($soal['department'] ?? '-'); ?></td>
                                        <td>
                                            <a href="edit_soal_praktik.php?id=<?php echo $soal['id']; ?>" class="btn btn-edit">
                                                <i class="fas fa-edit"></i> Edit
                                            </a>
                                            <a href="hapus_soal_praktik.php?id=<?php echo $soal['id']; ?>" 
                                               class="btn btn-delete" 
                                               onclick="return confirm('Yakin hapus soal praktik ini?')">
                                                <i class="fas fa-trash"></i> Hapus
                                            </a>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
    
    <script src="../assets/js/bank_soal_praktik.js"></script>
</body>
</html>