Menu RPS publik di landing + Koordinator Program Studi

- Menu "RPS" di bilah navigasi landing (tetap tampil di ponsel) ke /publik/rps:
  daftar RPS berstatus "selesai" tanpa login (cari + saring semester), halaman
  baca RPS lengkap, unduh .docx (PDF bila LibreOffice ada, ditembolok per versi).
  Draf & MK tanpa RPS dialihkan; form RPS dan halaman lain tetap wajib login.
- Tahun aktif didahulukan; bila belum ada, RPS selesai terbaru dari tahun lain.
- Nav/kepala/kaki publik dipisah ke partial bersama (landing & RPS publik).
- "Ketua Program Studi" menjadi "Koordinator Program Studi" di form RPS, .docx RPS
  (sel "Ka Prodi" template resmi), .docx portofolio, halaman publik, dan setup.
- Env KOORPRODI (bawaan: Eva Faja Ripanti, S.Kom., MMSI., Ph.D.) mengisi form RPS
  baru dan menjadi cadangan di dokumen bila kosong.
- Uji: RPS publik terbuka untuk anonim, draf dialihkan, /rps 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:28:59 +07:00
co-authored by Claude Opus 5.5
parent 602a9c98b9
commit a73a8af936
17 changed files with 566 additions and 40 deletions
+15
View File
@@ -63,6 +63,21 @@ ok = h.status_code == 200 and "dalam satu siklus mutu" in h.text and "Masuk deng
ok = ok and anon.get("/mk", follow_redirects=False).status_code == 303
ok = ok and "Buka aplikasi" in klien(kaprodi).get("/tentang").text and "dalam satu siklus mutu" not in klien(kaprodi).get("/").text
print("landing publik:", "OK" if ok else "GAGAL")
if not ok:
gagal += 1
# RPS publik: hanya RPS 'selesai' yang terbuka tanpa login; draf & MK tanpa RPS dialihkan
terbit = db.rps_terbit()
draf = next((m["kode"] for m in db.daftar_mk() if m["kode"] not in terbit), None)
ok = "/publik/rps" in anon.get("/").text
ok = ok and anon.get("/publik/rps").status_code == 200
for kode in terbit:
ok = ok and anon.get(f"/publik/rps/{kode}").status_code == 200
ok = ok and "wordprocessingml" in anon.get(f"/publik/rps/{kode}/unduh").headers.get("content-type", "")
if draf:
ok = ok and anon.get(f"/publik/rps/{draf}", follow_redirects=False).status_code == 303
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
print("POST /peran →", r.status_code, "| beranda wali memuat 'Mahasiswa Wali':", "Mahasiswa Wali" in c.get("/").text)