Update graduation_logic.py
Browse files- graduation_logic.py +4 -5
graduation_logic.py
CHANGED
|
@@ -56,7 +56,7 @@ def _predict_naive(current_semester: int, total_sks_passed: int, last_gpa: float
|
|
| 56 |
if required_sks_per_sem > MAX_SKS_REGULAR:
|
| 57 |
# KASUS: Mustahil reguler
|
| 58 |
return {
|
| 59 |
-
"status": "π΄
|
| 60 |
"color": "red",
|
| 61 |
"description": f"Target lulus semester 8 tidak memungkinkan. Anda butuh rata-rata {required_sks_per_sem:.1f} SKS yang perlu dipenuhi setiap semester selanjutnya, melebihi batas reguler yaitu 24 SKS.",
|
| 62 |
"stats": stats
|
|
@@ -65,7 +65,7 @@ def _predict_naive(current_semester: int, total_sks_passed: int, last_gpa: float
|
|
| 65 |
elif required_sks_per_sem <= SAFE_THRESHOLD:
|
| 66 |
# KASUS: Aman
|
| 67 |
return {
|
| 68 |
-
"status": "π’
|
| 69 |
"color": "green",
|
| 70 |
"description": f"Posisi aman. Beban ringan, sisa (~{required_sks_per_sem:.1f} SKS yang perlu dipenuhi tiap semester. Pertahankan performa tiap semester!",
|
| 71 |
"stats": stats
|
|
@@ -73,7 +73,7 @@ def _predict_naive(current_semester: int, total_sks_passed: int, last_gpa: float
|
|
| 73 |
|
| 74 |
elif required_sks_per_sem <= student_capacity:
|
| 75 |
# KASUS: Padat tapi Masih Mungkin
|
| 76 |
-
status_text = "π‘
|
| 77 |
return {
|
| 78 |
"status": status_text,
|
| 79 |
"color": "yellow",
|
|
@@ -84,7 +84,7 @@ def _predict_naive(current_semester: int, total_sks_passed: int, last_gpa: float
|
|
| 84 |
else:
|
| 85 |
# KASUS: Terhambat IPK
|
| 86 |
return {
|
| 87 |
-
"status": "π Rawan Terlambat
|
| 88 |
"color": "orange",
|
| 89 |
"description": f"Hati-hati! Anda butuh {required_sks_per_sem:.1f} SKS tiap semester agar lulus tepat waktu, tapi IPK saat ini membatasi jatah cuma {student_capacity} SKS.",
|
| 90 |
"stats": stats
|
|
@@ -135,7 +135,6 @@ def predict_graduation_status(
|
|
| 135 |
|
| 136 |
# D. Bandingkan dengan Sisa Waktu
|
| 137 |
if min_semesters_needed_structural > semesters_left:
|
| 138 |
-
# === OVERRIDE TERJADI DISINI ===
|
| 139 |
result["status"] = "π΄ Terlambat (Struktural)"
|
| 140 |
result["color"] = "red"
|
| 141 |
result["description"] = (
|
|
|
|
| 56 |
if required_sks_per_sem > MAX_SKS_REGULAR:
|
| 57 |
# KASUS: Mustahil reguler
|
| 58 |
return {
|
| 59 |
+
"status": "π΄ Terlambat",
|
| 60 |
"color": "red",
|
| 61 |
"description": f"Target lulus semester 8 tidak memungkinkan. Anda butuh rata-rata {required_sks_per_sem:.1f} SKS yang perlu dipenuhi setiap semester selanjutnya, melebihi batas reguler yaitu 24 SKS.",
|
| 62 |
"stats": stats
|
|
|
|
| 65 |
elif required_sks_per_sem <= SAFE_THRESHOLD:
|
| 66 |
# KASUS: Aman
|
| 67 |
return {
|
| 68 |
+
"status": "π’ Aman",
|
| 69 |
"color": "green",
|
| 70 |
"description": f"Posisi aman. Beban ringan, sisa (~{required_sks_per_sem:.1f} SKS yang perlu dipenuhi tiap semester. Pertahankan performa tiap semester!",
|
| 71 |
"stats": stats
|
|
|
|
| 73 |
|
| 74 |
elif required_sks_per_sem <= student_capacity:
|
| 75 |
# KASUS: Padat tapi Masih Mungkin
|
| 76 |
+
status_text = "π‘ Jadwal Relatif Padat"
|
| 77 |
return {
|
| 78 |
"status": status_text,
|
| 79 |
"color": "yellow",
|
|
|
|
| 84 |
else:
|
| 85 |
# KASUS: Terhambat IPK
|
| 86 |
return {
|
| 87 |
+
"status": "π Rawan Terlambat",
|
| 88 |
"color": "orange",
|
| 89 |
"description": f"Hati-hati! Anda butuh {required_sks_per_sem:.1f} SKS tiap semester agar lulus tepat waktu, tapi IPK saat ini membatasi jatah cuma {student_capacity} SKS.",
|
| 90 |
"stats": stats
|
|
|
|
| 135 |
|
| 136 |
# D. Bandingkan dengan Sisa Waktu
|
| 137 |
if min_semesters_needed_structural > semesters_left:
|
|
|
|
| 138 |
result["status"] = "π΄ Terlambat (Struktural)"
|
| 139 |
result["color"] = "red"
|
| 140 |
result["description"] = (
|