Apply grading PR review feedback: PII, locking, trigger cleanup, perf, docs#5
Draft
Copilot wants to merge 2 commits into
Draft
Apply grading PR review feedback: PII, locking, trigger cleanup, perf, docs#5Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Open
Co-authored-by: LLOKAI <172426821+LLOKAI@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add grade-sync and auto-grading functionality for quizzes
Apply grading PR review feedback: PII, locking, trigger cleanup, perf, docs
Feb 19, 2026
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.
Addresses all review comments from the grading PR (#4). Changes span correctness, privacy, performance, and documentation.
Privacy
AUTO_GRADE_STATEkeyed bysubmission.userIdinstead of respondent email — avoids persisting PII in Script Properties accessible to all editors.userIdis available early.Correctness & Reliability
LockService.getScriptLock()wraps the state read-modify-write inhandleAutoGradeFormSubmit— prevents concurrent trigger executions from racing and corrupting "first attempt" tracking..find()(first match) to.filter()+ last element — ensures the most recently created "Form Responses" tab is used when multiple tabs exist.Trigger Quota
ensureAutoGradeTriggerForFormnow deletes orphanedhandleAutoGradeFormSubmittriggers whose form IDs are no longer inAUTO_GRADE_TARGETS, preventing accumulation against Apps Script trigger quotas.Performance
getLatestResponseScoresByEmailreads only the header row first to locate Email/Score columns, then fetches just those two columns — avoids loading the entire sheet into memory for large response sets.Docs
Questions.sheet-format.md: updated MCQ/MSQ → MCQ-only for answer image URL feature, consistent with MSQ removal.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.