A Google Sheets sidebar add-on for visualizing student response patterns from Pattern-Based Question (PBQ) checkbox questions in Google Forms.
After students submit responses, the sidebar reads the linked form, lets you mark the correct answer(s), and generates a column chart showing all answer-combination frequencies sorted by Hamming distance from the correct answer — most-wrong combinations on the left.
PBQCode.gs, Sidebar.html, and appsscript.json from this repoWhen switching tabs, click ↺ Refresh for this tab to reload the sidebar for the new tab’s form and columns.
This project uses clasp to sync between local files and the Apps Script project.
npm install -g @google/clasp
clasp login
Create .clasp.json in the project root (not committed — see .gitignore):
{
"scriptId": "<your-script-id>",
"rootDir": "."
}
Your script ID is in the Apps Script editor under Project Settings → Script ID.
clasp push # push local changes to Apps Script
clasp push --watch # auto-push on every file save
clasp pull # pull changes made in the Apps Script editor
| File | Description |
|---|---|
PBQCode.gs |
All server-side logic: column detection, FormApp option discovery, bitmask encoding, chart generation, PropertiesService tracking |
Sidebar.html |
Full sidebar UI — HTML, CSS, and client-side JS |
appsscript.json |
Apps Script manifest: OAuth scopes, Google Sheets Advanced API |
| Privacy Policy | Terms of Service |