[Superuser] Integrasi Pertama ke Database

This commit is contained in:
Ariyutta
2026-11-11 18:26:23 +07:00
parent eba6ab77b4
commit c12c634b4f
47 changed files with 2322 additions and 109 deletions
+4
View File
@@ -30,6 +30,10 @@ final class ClassWriter
public function create(array $prodi, array $input, string $actor, ?string $ip): int
{
$course = $this->ownedCourse($prodi, $input['mk'] ?? 0);
// Program studi di formulir hanya penyaring pilihan mata kuliah; harus sama dengan prodi kurikulum mata kuliah itu.
if (isset($input['prodi']) && (int) $input['prodi'] !== (int) $course->idprogdi) {
throw new PortalException('Mata kuliah harus dipilih dari program studi yang dipilih.');
}
$periode = (int) ($input['periode'] ?? 0);
if (! $this->db()->table('t_periodekuliah')->where('idperiode', $periode)->whereIn('perkuliahan', [1, 2])->exists()) {
throw new PortalException('Periode akademik harus dipilih dari daftar.');