Menu Kurikulum publik di landing (data whitelist, tanpa desain internal)

- /publik/kurikulum tanpa login, menu "Kurikulum" di samping "RPS" (tampil juga di ponsel):
  ringkasan angka, visi/misi/tujuan, profil lulusan, rumusan CPL per aspek, peta
  keselarasan statis PL -> CPL (hanya jumlah MK per CPL), struktur MK per semester +
  daftar MK pilihan, nama bahan kajian, catatan hak cipta + tanggal pengesahan.
- Data dibangun dari whitelist field: CPMK, Sub-CPMK, skor maks, teknik penilaian,
  indikator CPL, dan matriks pemetaan tidak pernah dikirim ke halaman publik.
- Env KURIKULUM_SK (opsional): nomor SK penetapan di catatan kepemilikan.
- Uji: halaman terbuka untuk anonim, tidak memuat kode CPMK/Sub-CPMK, indikator CPL,
  atau label teknik penilaian; /kurikulum internal tetap wajib login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Power BI Dev
2026-11-06 14:57:42 +07:00
co-authored by Claude Opus 5.5
parent a73a8af936
commit 7013ebd541
6 changed files with 358 additions and 0 deletions
+21
View File
@@ -78,6 +78,27 @@ if draf:
ok = ok and anon.get(f"/publik/rps/{draf}/unduh", follow_redirects=False).status_code == 303
ok = ok and anon.get(f"/rps/{MK}", follow_redirects=False).status_code == 303 # form RPS tetap wajib login
print(f"RPS publik ({len(terbit)} terbit):", "OK" if ok else "GAGAL")
if not ok:
gagal += 1
# Kurikulum publik: terbuka tanpa login, TIDAK memuat desain internal (whitelist)
import re as _re
h = anon.get("/publik/kurikulum")
d_kur = db.ambil_versi(db.versi_berlaku_id())["isi"]
bocor = []
if _re.search(r"CPMK\d", h.text):
bocor.append("kode CPMK")
if _re.search(r"Sub-\d{3}-\d", h.text):
bocor.append("kode Sub-CPMK")
for cp in d_kur["cpl"].values():
ind = (cp.get("indikator") or "").strip()
if ind and ind[:60] in h.text:
bocor.append(f"indikator {cp['kode']}"); break
for label in (d_kur.get("teknik") or {}).values():
if label in h.text:
bocor.append(f"teknik '{label}'"); break
ok = h.status_code == 200 and "/publik/kurikulum" in anon.get("/").text and not bocor
ok = ok and all(k in h.text for k in d_kur["cpl"]) and anon.get("/kurikulum", follow_redirects=False).status_code == 303
print("kurikulum publik:", "OK" if ok else f"GAGAL {h.status_code} bocor={bocor}")
if not ok:
gagal += 1
print("POST /peran →", r.status_code, "| beranda wali memuat 'Mahasiswa Wali':", "Mahasiswa Wali" in c.get("/").text)