[Operator] Registrasi Akademik
This commit is contained in:
@@ -67,6 +67,7 @@ final class AkademikReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_krsmahasiswa' => [
|
||||
'export' => 'xlsx',
|
||||
'params' => [
|
||||
$this->periodParam($prodi, true), $this->prodiParam($context), $this->angkatanParam($prodi), $this->studentParam(),
|
||||
],
|
||||
@@ -98,6 +99,7 @@ final class AkademikReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_krsmhs' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Mahasiswa berstatus aktif pada semester terpilih. KRS Diajukan = ada mata kuliah yang menunggu persetujuan.',
|
||||
'params' => [
|
||||
$this->periodParam($prodi, true), $this->prodiParam($context), $this->angkatanParam($prodi), $this->programParam($prodi),
|
||||
@@ -105,14 +107,17 @@ final class AkademikReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_rekapkrs' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Rekap KRS mahasiswa berstatus aktif pada semester terpilih.',
|
||||
'params' => [$this->periodParam($prodi, true), $this->prodiParam($context)],
|
||||
],
|
||||
'repp_distribusikrsmhs' => [
|
||||
'note' => 'Sebaran jumlah SKS KRS (tidak termasuk yang dibatalkan) mahasiswa berstatus aktif.',
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Sebaran total SKS KRS (tidak termasuk yang dibatalkan) mahasiswa berstatus aktif: tiap baris menunjukkan berapa mahasiswa yang total SKS-nya sama, dan persentasenya dari seluruh mahasiswa aktif.',
|
||||
'params' => [$this->periodParam($prodi, true), $this->prodiParam($context), $this->angkatanParam($prodi)],
|
||||
],
|
||||
'repp_mkmengulang' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Mata kuliah yang sudah pernah diambil mahasiswa pada semester sebelumnya (mata kuliah kurikulum yang sama).',
|
||||
'params' => [$this->periodParam($prodi, true), $this->prodiParam($context)],
|
||||
],
|
||||
@@ -607,7 +612,7 @@ final class AkademikReports implements ReportSource
|
||||
|
||||
private function krsDistribution(array $params, ReportContext $context): ReportResult
|
||||
{
|
||||
$columns = [$this->col('sks', 'Jumlah SKS KRS', true), $this->col('jumlah', 'Jumlah Mahasiswa', true), $this->col('persen', 'Persentase (%)', true)];
|
||||
$columns = [$this->col('sks', 'Total SKS di KRS (per mahasiswa)', true), $this->col('jumlah', 'Jumlah Mahasiswa dengan SKS Itu', true), $this->col('persen', 'Persentase (%)', true)];
|
||||
$scope = $this->scope($params, $context);
|
||||
$periode = $this->int($params, 'periode');
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ final class MahasiswaReports implements ReportSource
|
||||
|
||||
return match ($slug) {
|
||||
'repp_daftarmhs' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Konsentrasi, kelas/kelompok, dan gelombang tidak ada di data mahasiswa DB lama sehingga tidak disediakan.',
|
||||
'params' => [$this->select('prodi', 'Program Studi', $prodi, true, $one), $masuk(true), $status(), $program(), $jalur()],
|
||||
],
|
||||
@@ -104,6 +105,7 @@ final class MahasiswaReports implements ReportSource
|
||||
'params' => [$this->select('prodi', 'Program Studi', $prodi), $angkatan()],
|
||||
],
|
||||
'repp_masastudi' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Batas masa studi = lama studi maksimum jenjang (t_jenjangprogdi.mstudimax) x 2 semester. Semester cuti tidak dihitung.',
|
||||
'params' => [
|
||||
$this->select('periode', 'Periode Akademik', $this->periods(), true, $this->defaultPeriod($context->prodi)),
|
||||
@@ -114,6 +116,7 @@ final class MahasiswaReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_statussemester' => [
|
||||
'export' => 'xlsx',
|
||||
'params' => [
|
||||
$this->select('periode', 'Periode Akademik', $this->periods(), true, $this->defaultPeriod($context->prodi)),
|
||||
$this->select('prodi', 'Program Studi', $prodi, true, $one),
|
||||
@@ -125,10 +128,12 @@ final class MahasiswaReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_rekapbiodata' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Home base dan jenis pegawai tidak berlaku untuk mahasiswa. Kata sandi tidak ditampilkan.',
|
||||
'params' => [$this->select('prodi', 'Program Studi', $prodi), $masuk(true), $program(), $status()],
|
||||
],
|
||||
'repp_rekapmhsprodi' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Gelombang tidak tercatat di data mahasiswa. Status memakai status mahasiswa saat ini.',
|
||||
'params' => [
|
||||
$this->select('prodi', 'Program Studi', ['semua' => 'Semua program studi'] + $prodi, true, 'semua'),
|
||||
@@ -138,6 +143,7 @@ final class MahasiswaReports implements ReportSource
|
||||
],
|
||||
],
|
||||
'repp_statusmhs' => [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Status akademik per semester pada t_histori_mahasiswa. Mahasiswa yang sudah lulus hanya tercatat Lulus pada periode kelulusannya.',
|
||||
'params' => [
|
||||
$this->select('prodi', 'Program Studi', $prodi),
|
||||
@@ -693,6 +699,7 @@ final class MahasiswaReports implements ReportSource
|
||||
$keys = array_keys($years);
|
||||
|
||||
return [
|
||||
'export' => 'xlsx',
|
||||
'note' => 'Periode akademik tidak dipakai: status adalah status mahasiswa saat ini (t_mahasiswa).',
|
||||
'params' => [
|
||||
$this->select('prodi', 'Program Studi', $prodi),
|
||||
|
||||
@@ -248,6 +248,38 @@ class LegacyLaporanTest extends TestCase
|
||||
$this->assertSame(['NIP', 'Dosen Wali', 'Home Base', 'Mahasiswa Bimbingan Aktif'], array_slice($waliRows[0], 0, 4));
|
||||
$this->assertSame(4, count(array_filter($waliRows[0], fn ($cell) => $cell !== null)));
|
||||
|
||||
// Daftar Mahasiswa: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_daftarmhs'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$mhs = DB::connection('untan')->table('t_mahasiswa')->whereNotNull('idangkatan')->whereNotNull('idprogdi')->first(['idprogdi', 'idangkatan']);
|
||||
$daftar = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_daftarmhs', 'prodi' => $mhs->idprogdi, 'masuk' => $mhs->idangkatan]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_daftarmhs-\d{8}-\d{6}\.xlsx/', $daftar->headers->get('Content-Disposition'));
|
||||
@unlink($daftar->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Seluruh grup Cetak Daftar Registrasi Mahasiswa: unduhan Excel, bukan CSV.
|
||||
foreach (['repp_masastudi', 'repp_statussemester', 'repp_statusmhs5thn', 'repp_statusmhs', 'repp_rekapmhsprodi', 'repp_rekapbiodata'] as $slug) {
|
||||
$this->get(route('operator.halaman', $slug))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
}
|
||||
|
||||
// KRS, Status KRS Mhs, dan Rekap KRS: unduhan Excel, bukan CSV.
|
||||
foreach (['repp_krsmahasiswa', 'repp_krsmhs', 'repp_rekapkrs'] as $slug) {
|
||||
$this->get(route('operator.halaman', $slug))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$krs = $this->get(route('operator.laporan.unduh', ['slug' => $slug, 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename='.$slug.'-\d{8}-\d{6}\.xlsx/', $krs->headers->get('Content-Disposition'));
|
||||
@unlink($krs->baseResponse->getFile()->getPathname());
|
||||
}
|
||||
|
||||
// Distribusi KRS Mahasiswa: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_distribusikrsmhs'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$sebaran = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_distribusikrsmhs', 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_distribusikrsmhs-\d{8}-\d{6}\.xlsx/', $sebaran->headers->get('Content-Disposition'));
|
||||
@unlink($sebaran->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Mata Kuliah Mengulang: unduhan Excel, bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_mkmengulang'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$ulang = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_mkmengulang', 'periode' => DB::connection('untan')->table('t_periodekuliah')->value('idperiode')]))->assertOk();
|
||||
$this->assertMatchesRegularExpression('/attachment; filename=repp_mkmengulang-\d{8}-\d{6}\.xlsx/', $ulang->headers->get('Content-Disposition'));
|
||||
@unlink($ulang->baseResponse->getFile()->getPathname());
|
||||
|
||||
// Dosen Pembimbing: unduhan Excel (berkas .xlsx dengan nama repp_dpa), bukan CSV.
|
||||
$this->get(route('operator.halaman', 'repp_dpa'))->assertOk()->assertSee('Unduh (Excel)')->assertDontSee('Unduh (CSV)');
|
||||
$dpa = $this->get(route('operator.laporan.unduh', ['slug' => 'repp_dpa', 'bimbingan' => 'pa']))->assertOk();
|
||||
|
||||
Reference in New Issue
Block a user