Asesmen: foto mahasiswa & Mode Fokus (satu mahasiswa per layar) + draf nilai
- Foto mahasiswa dimuat langsung oleh browser dari SIAKAD (FOTO_MHS_URL, bawaan
satu.untan.ac.id/.../fotomhs/thumb/{nim}.jpg); tidak disalin ke server, hanya untuk
mahasiswa yang boleh dilihat, tidak tercetak di dokumen. Tanpa foto → inisial.
FOTO_MHS_URL kosong mematikan fitur.
- Mode Fokus di halaman asesmen: foto besar, Enter = simpan & lanjut, tombol nilai
cepat, sebelumnya/lewati/berikutnya, cari nama/NIM, urutan acak; menulis ke input
tabel yang sama (satu tombol Simpan, akses kelas tetap). Ditonjolkan untuk
Presentasi, Tes Lisan, Observasi.
- Draf nilai asesmen di perangkat (localStorage) + tawaran pulihkan; dihapus saat simpan.
- Foto kecil juga di halaman Input Nilai.
- Uji: foto hanya kelas yang diampu, NIM tak wajar, fitur dapat dimatikan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f106291caf
commit
2782739b56
+15
-1
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Aplikasi Penyusunan RPS & Portofolio — Prodi Informatika UNTAN."""
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
from datetime import datetime
|
||||
from urllib.parse import quote_plus
|
||||
from urllib.parse import quote, quote_plus
|
||||
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, RedirectResponse, Response
|
||||
@@ -34,6 +35,19 @@ def aset(path: str) -> str:
|
||||
templates.env.globals["aset"] = aset
|
||||
|
||||
|
||||
# Foto mahasiswa: dimuat LANGSUNG oleh browser pengguna dari SIAKAD (tidak disalin ke server).
|
||||
# Kosongkan FOTO_MHS_URL untuk mematikan. Foto tak tersedia → avatar inisial (static/foto_mhs.js).
|
||||
FOTO_MHS_URL = os.environ.get("FOTO_MHS_URL", "https://satu.untan.ac.id/uploads/untan/fotomhs/thumb/{npm}.jpg")
|
||||
|
||||
|
||||
def foto_mhs(npm: str) -> str:
|
||||
npm = (npm or "").strip()
|
||||
return FOTO_MHS_URL.format(npm=quote(npm)) if FOTO_MHS_URL and re.fullmatch(r"[A-Za-z0-9]+", npm) else ""
|
||||
|
||||
|
||||
templates.env.globals["foto_mhs"] = foto_mhs
|
||||
|
||||
|
||||
def fmt_ambang(x) -> str:
|
||||
"""Ambang untuk tampilan: 70 → '70', 50.1 → '50,1' (tanpa pembulatan ke bilangan bulat)."""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user