This tool automates the creation of peer evaluation Google Forms and Google Classroom assignments for group-based assessments. It is designed to simplify the process of generating evaluation forms, posting them as assignments in Google Classroom, and recording student responses in a Google Sheet. The tool features a straightforward web app interface, enabling users to set up and manage the process without prior coding knowledge.
The Peer Evaluation Automation Tool uses Google Apps Script to:
- Read student names and group assignments from a Google Sheet.
- Create tailored Google Forms for each group, supporting peer and self-evaluation.
- Post assignments in Google Classroom, linking to the forms and assigning them to group members.
- Save form responses (scores, justifications, feedback) directly into the Google Sheet.
- Offer an easy-to-use web app for configuration and management.
- Automated Form Creation: Builds unique Google Forms for each group with adjustable rating scales.
- Google Classroom Integration: Posts assignments in Google Classroom, linking forms to specific students.
- Spreadsheet Integration: Pulls student and group data from a Google Sheet and records evaluation results.
- Customizable Options: Adjust rating scales, assignment details, due dates, and include optional justification or feedback fields.
- Simple Web App: Provides a clear interface with previews and checks to ensure proper setup.
- Error Tracking: Records issues in a separate Google Sheet for easy troubleshooting.
- Trigger Management: Allows viewing and deleting form submission triggers within the web app.
- A Google Account with access to Google Sheets, Google Forms, Google Drive, and Google Classroom.
- A Google Sheet listing student names and their group assignments.
- A Google Classroom course with enrolled students whose names exactly match those in the Google Sheet.
- A Google Drive folder to store the generated forms.
- Create a new Google Sheet or use an existing one.
- Set up two columns:
- Student Names: Full names that match exactly with Google Classroom (e.g.,
A2:A17). Tip: Click the preview button in the WebApp to have a list of students in the specified Classroom. - Group Names: The group each student belongs to (e.g.,
B2:B17).
- Student Names: Full names that match exactly with Google Classroom (e.g.,
- Identify two settings for later:
- Evaluation Table Start Column: The column where evaluation headers will begin (e.g.,
F). - Form URLs Cell: The cell where form links will be listed (e.g.,
A19).
- Evaluation Table Start Column: The column where evaluation headers will begin (e.g.,
- Open your Google Sheet.
- Navigate to Extensions > Apps Script.

- In the Apps Script editor:
- Replace all the default code in
Code.gswith the contents ofCode.jsfrom this GitHub repository.

- Tip: Click the "Copy raw file" button to copy all the content of the file conveniently.

- Click the
+icon next to "Files," choose HTML, name itWebApp, and paste the contents ofWebApp.htmlfrom this repository.
- Replace all the default code in
- Update these constants in
Code.js:- WEBAPP_ERROR_LOG_SPREADSHEET_ID: Create a new Google Sheet or use an existing one for error logging, copy its ID from the URL (the ID is the text between "/d/" and "/edit", e.g.,
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit), and insert it here. - WEBAPP_ERROR_LOG_SHEET_NAME: Confirm a sheet named "Errors" exists in the error log spreadsheet (or adjust this constant to match your sheet name).
- XOR_KEY: Change
'YourSecretKeyForXOR'to a unique, random string (e.g.,MySecret123). Keep this private as it secures form data.
- Keep the single quote both at the start and end of the text. The text should be colored red, like in the screenshot above.
- WEBAPP_ERROR_LOG_SPREADSHEET_ID: Create a new Google Sheet or use an existing one for error logging, copy its ID from the URL (the ID is the text between "/d/" and "/edit", e.g.,
- Save by clicking on the save icon.
- In the Apps Script editor, click the
+icon next to "Services" on the left. - Select Google Classroom API and click Add.
- In the Apps Script editor, click Deploy > New deployment.
- Click on the gear icon and select Web App as the deployment type.
- Configure:
- Execute as: "Me (your_email@example.com)".
- Who has access: "Only myself" (or "Anyone within your organization" if others need access).
- Click Deploy.
- Grant permissions:
- Choose your Google account when prompted.
- If you see "Google hasn’t verified this app," click Advanced, then Go to [Your Project Name] (unsafe).
- Click Allow to permit access to Sheets, Forms, Drive, and Classroom.
- Copy the Web App URL shown after deployment.
- Paste the Web App URL into your browser. You can access the Web App URL in your Google Sheet's Apps Script under Deploy > Test deployments.
- Sign in with your Google account if asked.
Fill out these sections in the web app:
- Spreadsheet & Data Configuration:
- Sheet Name: The name of your Google Sheet (e.g., "Q4Project").
- Names Range: Cells with student names (e.g.,
A2:A17). - Group Names Range: Cells with group names (e.g.,
B2:B17). - Eval Table Start Column: Starting column for evaluation headers (e.g.,
F). - Cell for Form URLs: Cell for form links (e.g.,
A19). - Check boxes to add justification or feedback columns to the spreadsheet.
- Google Classroom Configuration:
- Exact Classroom Course Name: The exact name of your Google Classroom course.
- Classroom Topic Name: Topic for assignments (created if it doesn’t exist).
- Base Assignment Title: Base title for assignments (group name is added).
- Common Assignment Description: Description for all assignments.
- Due Date, Due Time, Your UTC Offset: Deadline details (e.g.,
+0800for your timezone). - Assignment Points: Points for the assignment (0 for ungraded).
- Schedule Date and Schedule Time (optional): When assignments are posted.
- Form Details:
- Drive Folder Name: Folder in Google Drive for forms.
- Base Form Title: Base title for forms (group name is added).
- Common Form Description: Description for all forms.
- Scale Lower Bound and Scale Upper Bound: Rating scale range (e.g., 1 to 5).
- Scale Lower Label and Scale Upper Label: Labels for the scale (e.g., "Poor" to "Excellent").
- Check Allow response editing if students can update their responses.
- Click Refresh Preview & Check Cells to review your settings.
- Look at the preview for:
- Sample student names and groups.
- Counts of students and unique groups.
- Status of the evaluation table and URL cell.
- Confirmation of the Drive folder and Classroom topic.
- Any name mismatches between the Google Sheet and Classroom (these must be fixed).
- Whether the due date and schedule are valid.
- Fix any errors or warnings shown in red or yellow.
- Optionally, check Delete all existing triggers before creating new ones to clear old triggers.
- Click Create Forms & Assignments.
- Wait a few minutes for the process to finish.
- Review the status message for success or errors.
- Check your Google Sheet to see form URLs in the specified cell (e.g.,
A19). - Verify in Google Classroom that assignments appear under the specified topic.
- Open each Google Form from the Drive folder.
- Go to Settings > Responses and set Collect email addresses to Verified. This links responses to student identities.
- Students complete the forms through Google Classroom assignments.
- Responses automatically populate the Google Sheet’s evaluation table with:
- Scores and justifications for each group member.
- An average score per student (calculated automatically).
- Optional feedback and submission timestamps.
- In the web app, click Refresh Triggers List to see active form triggers.
- Select any triggers to remove and click Delete Selected Triggers to clean up unused triggers.
- Deleting a trigger will stop populating the sheet's evaluation table for that form's responses.
The evaluation table in your Google Sheet (starting at the specified column, e.g., F) includes:
- Headers: Columns for each group member’s score and justification (e.g., "M1 Score", "M1 Just.").
- Avg Score: An automatically calculated average score for each student.
- Feedback (if enabled): General feedback from students.
- Last Submitted: Timestamp of the latest submission.
- Web App Errors: Review the preview section for error messages and correct issues like invalid cell ranges or name mismatches.
- No Spreadsheet Data: Confirm forms have "Collect email addresses" set to "Verified" and that
XOR_KEYinCode.jshasn’t changed since form creation. - Classroom Problems: Ensure the course name is exact and student names match between the Google Sheet and Classroom.
- Error Details: Check the error log spreadsheet (set in
WEBAPP_ERROR_LOG_SPREADSHEET_ID) for specific issues during processing or submission. - Permission Issues: If prompted, re-authorize the script by running a function (e.g.,
doGet) in the Apps Script editor.
- Name Matching: Student names in the Google Sheet must exactly match those in Google Classroom for proper assignment and response recording.
- XOR Key: Do not alter
XOR_KEYinCode.jsafter creating forms, as it will stop responses from being processed correctly. Keep it private. - Form Data: In a sheet, do not alter the names range, group names range, Eval table start column, or the Cell for Form URLs after creating forms, as these details are memorized on form creation. Create new forms when you need to alter them.
- Google Limits: The tool is suitable for typical class sizes, but may encounter Google API limits with very large groups. Check the error log if problems occur.
- Data Privacy: Follow your institution’s policies for handling student data.
- What happens when a student answers another group's form?
- Their response will not be recorded in the evaluation table. This event is logged in the errors sheet. That is why setting responses to "verified" in the form settings is important.
- What is a trigger?
- When a form is submitted, the trigger runs the script, which populates the Google Sheet with the new response data.
- What happens when a form trigger is deleted?
- If you delete a form trigger, the automatic connection breaks, and new responses from this form will not populate the Google Sheet.
- Can I put a row gap between names in the sheet?
- Yes, as long as the row gap is empty and that names and group names range in the Spreadsheet & Data Configuration cover all the target names.
To improve or fix the tool:
- Fork this repository.
- Create a branch (
git checkout -b feature/YourFeature). - Commit changes (
git commit -m 'Add YourFeature'). - Push to the branch (
git push origin feature/YourFeature). - Submit a pull request.
This project uses the GNU Affero General Public License. See the LICENSE file for details.
- Developed with Google Apps Script.
- Works with Google Sheets, Google Forms, Google Drive, and Google Classroom.
- Created to assist educators with peer evaluations.
For help, open an issue in this repository.





