[Superuser] Integrasi Pertama ke Database
This commit is contained in:
@@ -64,11 +64,12 @@ final class CurriculumWriter
|
||||
if ($current === null) {
|
||||
throw new PortalException('Kurikulum tidak ditemukan.');
|
||||
}
|
||||
$v = $this->values($prodi, $input, $id);
|
||||
// Periode berlaku ditetapkan saat dibuat dan tidak diubah lewat formulir.
|
||||
$v = $this->values($prodi, ['periode' => $current->idperiode] + $input, $id);
|
||||
|
||||
if ((int) $current->idprogdi !== $v['idprogdi'] || (int) $current->idprogram !== $v['idprogram'] || (int) $current->idperiode !== $v['idperiode']) {
|
||||
if ((int) $current->idprogdi !== $v['idprogdi'] || (int) $current->idprogram !== $v['idprogram']) {
|
||||
if (($used = $this->usedBy([$id])) !== null) {
|
||||
throw new PortalException("Program studi, sistem kuliah, dan periode berlaku tidak dapat diubah karena kurikulum sudah punya {$used}.");
|
||||
throw new PortalException("Program studi dan sistem kuliah tidak dapat diubah karena kurikulum sudah punya {$used}.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user