<?php require __DIR__ . '/../../layouts/header.php'; ?>
<div class="d-flex justify-content-between align-items-center mb-4"><h1 class="fw-bold mb-0"><?= e(trans('submission_checks')) ?></h1><a href="<?= e(base_path('admin')) ?>" class="btn ec-btn btn-outline-secondary rounded-3"><?= e(trans('back')) ?></a></div>
<div class="ec-card  "><div class="table-responsive">
<table class="table ec-table align-middle mb-0">
<thead class="table-light"><tr><th>#</th><th><?= e(trans('submission_no')) ?></th><th><?= e(trans('submission_title')) ?></th><th><?= e(trans('plagiarism_score')) ?></th><th><?= e(trans('format_check_status')) ?></th><th><?= e(trans('actions')) ?></th></tr></thead>
<tbody>
<?php foreach ($submissions as $s): ?>
<?php
$row = null;
foreach ($rows as $r) { if ((int) $r['submission_id'] === (int) $s['id']) { $row = $r; break; } }
?>
<tr>
<td><?= e((string) $s['id']) ?></td>
<td><?= e((string) $s['submission_no']) ?></td>
<td><?= e((string) $s['title']) ?></td>
<td><?= e((string) ($row['plagiarism_score'] ?? '')) ?></td>
<td><?= e((string) ($row['format_check_status'] ?? 'pending')) ?></td>
<td><a href="<?= e(base_path('admin/submission-checks/edit?submission_id=' . (int) $s['id'])) ?>" class="btn ec-btn btn-sm btn-outline-primary rounded-3"><?= e(trans('edit')) ?></a></td>
</tr>
<?php endforeach; ?>
</tbody></table>
</div></div>
<?php require __DIR__ . '/../../layouts/footer.php'; ?>
