[Operator] Kelengkapan Menu Evaluasi Perkuliahan

This commit is contained in:
Ariyutta
2026-11-18 15:01:57 +07:00
parent a8735df0bd
commit 4b096db543
16 changed files with 476 additions and 125 deletions
@@ -260,7 +260,7 @@ class DosenReportsTest extends TestCase
$this->assertNull(collect($result->rows)->firstWhere('kode', 'MK603')['hari']);
$this->assertSame(['Periode: 2020/2021 Ganjil', 'Jumlah: 5 baris jadwal'], $result->summary);
$siti = $this->report('repp_jadwalajar', ['periode' => 368, 'dosen' => 'siti']);
$siti = $this->report('repp_jadwalajar', ['periode' => 368, 'q' => 'siti']);
$this->assertEqualsCanonicalizing(['MK601', 'MK603'], $this->column($siti, 'kode'));
}
@@ -331,8 +331,8 @@ class DosenReportsTest extends TestCase
$this->assertEqualsCanonicalizing([self::JOKO, self::SITI], $nips(['kurikulum' => 70]));
$this->assertEqualsCanonicalizing([self::JOKO, self::SITI], $nips(['program' => 1]));
$this->assertSame(['lina'], $nips(['kelas' => 'Kelas 604']));
$this->assertSame(['lina'], $nips(['pegawai' => 'LINA']));
$this->assertSame(['lina'], $nips(['q' => 'Kelas 604']));
$this->assertSame(['lina'], $nips(['q' => 'LINA']));
// Prodi 22 bukan milik akun ini; prodi akun kosong tidak punya data.
$this->assertSame([], $this->report('repp_rekapmengajar', ['periode' => 368, 'prodi' => 22], $this->context([21]))->rows);
@@ -634,7 +634,7 @@ class DosenReportsTest extends TestCase
public function test_distribusi_pengajar_cakupan(): void
{
$this->assertSame([], $this->report('repp_distribusipengajar', ['periode' => 368], $this->context([]))->rows);
$this->assertSame(1, array_sum($this->column($this->report('repp_distribusipengajar', ['periode' => 368, 'unit' => 21, 'dosen' => 'lina']), 'dosen')));
$this->assertSame(1, array_sum($this->column($this->report('repp_distribusipengajar', ['periode' => 368, 'unit' => 21, 'q' => 'lina']), 'dosen')));
$this->assertSame(1, array_sum($this->column($this->report('repp_distribusipengajar', ['periode' => 368, 'unit' => 22], $this->context([22])), 'dosen')));
// Prodi 22 tidak dimiliki akun: hanya dosen prodi 21 yang terhitung.
$this->assertSame(3, array_sum($this->column($this->report('repp_distribusipengajar', ['periode' => 368], $this->context([21])), 'dosen')));
@@ -654,10 +654,32 @@ class DosenReportsTest extends TestCase
$this->assertNull($result->note);
}
public function test_grup_cetak_absensi_dosen_memakai_kotak_cari_dan_excel(): void
{
$hint = 'Cari NIP, NIDN, atau nama dosen';
$hintKelas = 'Cari dosen (NIP, NIDN, nama), mata kuliah, atau kelas';
$expected = ['repp_jadwalajar' => $hint, 'repp_jadwalmengajar' => $hint, 'repp_distribusipengajar' => $hint, 'repp_rekapmengajar' => $hintKelas, 'repp_rekapabsendosen' => $hintKelas];
foreach ($expected as $slug => $text) {
$definition = $this->reports->definition($slug, $this->context());
$this->assertTrue($definition['search'], $slug);
$this->assertSame($text, $definition['searchHint'], $slug);
$this->assertSame('xlsx', $definition['export'], $slug);
$this->assertSame([], array_intersect(array_column($definition['params'], 'name'), ['dosen', 'kelas', 'pegawai']), $slug);
}
// Jadwal Mengajar dan Rekap Jadwal Mengajar: dosen (siti), kelas lewat kotak cari.
$this->assertEqualsCanonicalizing(['MK601', 'MK603'], $this->column($this->report('repp_jadwalmengajar', ['periode' => 368, 'q' => 'siti']), 'kode'));
$this->assertSame([], $this->report('repp_jadwalmengajar', ['periode' => 368, 'q' => 'zzzz'])->rows);
$this->assertSame([self::SITI], $this->column($this->report('repp_rekapmengajar', ['periode' => 368, 'prodi' => 21, 'q' => 'Kelas 603']), 'nip'));
}
public function test_rekap_presensi_dosen_filter_dan_cakupan(): void
{
$this->assertCount(2, $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21, 'kelas' => 'MK601'])->rows);
$this->assertCount(1, $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21, 'dosen' => 'siti', 'kelas' => 'MK601'])->rows);
$this->assertCount(2, $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21, 'q' => 'MK601'])->rows);
// Dosen (siti) mengampu MK601 dan MK603; kelas dan dosen sama-sama lewat kotak cari (q).
$this->assertEqualsCanonicalizing(['MK601', 'MK603'], $this->column($this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21, 'q' => 'siti']), 'kode'));
$this->assertSame([], $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21, 'q' => 'zzzz'])->rows);
$this->assertSame([], $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 22], $this->context([21]))->rows);
$this->assertSame([], $this->report('repp_rekapabsendosen', ['periode' => 368, 'prodi' => 21], $this->context([]))->rows);