What the flags record and what they do not
When a student opens a shared PDFQuiz test, the page listens for two things. The first is the page being hidden, which is what happens when the student switches to another tab, opens another app or minimises the browser. The second is a paste anywhere in the quiz. Each event adds one to that student's count. A burst of the same event within three seconds counts once, so a student who flicks between windows twice in a second shows one switch and not five.
Nothing is counted while you take your own quiz as the author, and nothing is counted after the student has submitted. The student is not blocked, warned or kicked out. That is a deliberate choice: a phone notification or a low battery popup can hide the page too, and a hard lockout would punish those students. The flag tells you where to look. It does not decide for you.
In the results you see the counts in three places. Each participant row shows something like "3 tab switches, 1 paste" or "None". Above the table, the dashboard says how many participants left the quiz tab or pasted text. The CSV of results has separate Tab switches and Paste events columns, so you can sort a class of 120 by flags in a spreadsheet in a few seconds. The quiz analytics tool page covers the rest of the dashboard, including the hardest questions and the score spread.