fix: fill thesis grade only in last semester and fix finish() redirect - #114
Merged
Conversation
Targets the thesis/skripsi row in the last semester, only while that row is still ungraded (no backfill when the last-semester thesis already has a grade). Also fixes Graduation::finish() declared ': string' while returning a RedirectResponse (TypeError on submit) and lifts the 60s PHP time limit for the long synchronous batch submission.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two blocking defects in the PISN graduation wizard's submission path plus the thesis-grade fill target:
finish()fatal TypeError on submit —Graduation::finish()was declared: stringbut returns aRedirectResponse, throwingTypeError: Return value must be of type stringthe moment the wizard is actually submitted to Neo Feeder. Changed the return type toCodeIgniter\HTTP\RedirectResponse.finish()time limit exceeded — the full submission iterates the whole batch with a synchronous Neo Feeder call chain per student (InsertMahasiswaLulusDO + academic edits + thesis grade), which could exceed PHP's default 60 s limit on large batches. Addedset_time_limit(0)at the top offinish().Thesis grade fill targeted the wrong semester (ENH-010 regression) — when a student had several thesis/skripsi rows across semesters (e.g. retakes), card 3 tagged every missing-grade row "(akan diisi)" and
finish()could push the Excel grade into an older row. Now only the thesis/skripsi in the last semester (id_smtlargest) is targeted, and only while that row is still ungraded; if the last-semester thesis already has a grade, no value is filled and no older row is backfilled.Fixes
#113
Checklist
php -lclean on changed filesphp-cs-fixer fix --dry-run— 0 filesNotes
docs/ARCHITECTURE.md/docs/STRUCTURE.mdleft unstaged (out of scope).