[Superuser] Integrasi Pertama ke Database
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user