Skip to content

feat(proctoring): add anti-cheating protections and proctoring violation tracking - #3230

Open
Nagaraj-62 wants to merge 1 commit into
frappe:developfrom
Nagaraj-62:feat-quiz-proctoring-anti-cheating
Open

Nagaraj-62 wants to merge 1 commit into
frappe:developfrom
Nagaraj-62:feat-quiz-proctoring-anti-cheating

Conversation

@Nagaraj-62

@Nagaraj-62 Nagaraj-62 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary of Changes

Adds anti-cheating protections and proctoring integrity monitoring for proctored quizzes in LMS.

1. Anti-Cheating & Integrity Guard

  • Clipboard & Context Menu Protection: Silently intercepts and blocks copy, cut, and paste events as well as the right-click context menu within proctored quizzes.
  • Restricted Keyboard Shortcuts: Blocks Developer Tools (F12, Ctrl+Shift+I, Ctrl+Shift+J, Ctrl+Shift+C, Cmd+Opt+I) and browser utility shortcuts (Ctrl+U, Ctrl+P, Ctrl+S).
  • Focus & Defocus Tracking: Detects window blur/defocus (e.g., opening secondary windows or browser AI sidebars) with a grace period before logging a focus_loss violation.
  • Camera Disconnect Tracking: Monitors webcam stream tracks and logs camera_disconnect violations if the camera track ends mid-attempt.
  • Context-Aware Proctoring: Ensures embedded quizzes (in lessons, in-video popups, author previews) remain completely exempt from proctoring checks.

2. Duplicate Submission Idempotency

  • Prevents re-submitting attempts that already reached the server.
  • Caps violation snapshot frames attached to submissions (MAX_VIOLATION_FRAMES = 2) to keep payloads light and prevent connection timeouts.

Tests

  • Added 78 unit tests across antiCheating.test.ts, proctoringMonitor.test.ts, and quizSubmissionRetry.test.ts.

@Nagaraj-62
Nagaraj-62 force-pushed the feat-quiz-proctoring-anti-cheating branch 3 times, most recently from bc0edb1 to 1e56dfa Compare November 17, 2026 05:39
@Nagaraj-62 Nagaraj-62 changed the title feat(proctoring): keep standalone exams in full-screen and log violations feat(proctoring): add anti-cheating protections and proctoring violation tracking Nov 17, 2026
@Nagaraj-62
Nagaraj-62 force-pushed the feat-quiz-proctoring-anti-cheating branch from 1e56dfa to 3367ecd Compare November 17, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant