Monday, November 23, 2026

More scripting magic: Vocab quiz generator with Google Apps Script

One of my regular assessments is a vocab quiz, and all of my summative assessments are now delivered in locked Google Forms. When I started migrating paper assessments to Google Forms a number of years ago, I wanted to keep the structure I had on paper, which was a word bank; however, Google Forms doesn't have a word bank option. The closest I could get was to create a word bank with a drop-down list, so that's what I did. I created the list for one question, then duplicated that question and changed the correct answer however many times until I had all of the vocab words accounted for. As you may imagine, it took me at least an hour to create a new vocab quiz.

Last year I adopted a new online OER textbook for my Spanish 4 course, so I've been creating new assessments as I go, and I had forgotten how tedious it is to create my vocab quizzes. I've been using GetMarked to create assessments from my Quizlet sets, so I just decided to make them regular multiple choice questions with 4 answer choices, even though that isn't as accurate of a representation of students' vocab knowledge.

I was doing a little testing a few weeks ago to see if I could get GetMarked to generate a Google Form with a dropdown list with my full vocab list, and all of my attempts were unsuccessful. But then my trusty AI partner ChatGPT suggested using a Google Apps Script. As I've said previously, I don't know how to script, but I know how to troubleshoot, so I've implemented a few scripts and gotten them up and running the way I wanted to. So I created a Google Sheet, added ChatGPT's script to the spreadsheet's App Script Editor, and sure enough, it took the script about 2 minutes to create the full 66-word answer bank in every dropdown menu, complete with answer keys. 

The best part is that I only had to set up the script once. Now, whenever I need to create a new vocab quiz, I can paste my vocabulary list into the spreadsheet, select Generate Vocabulary Quiz from the custom Profe Tools menu, and paste in the URL of my Google Form. The script does the rest, including alphabetizing the answer choices, assigning the correct answers, and making each question worth one point.

And you certainly don't have to be a world language teacher to use this tool. It will work for any assessment that uses a word bank: scientific terminology, countries and capitals, historical figures, literary characters, etc.

You can grab the Google Sheet and Apps Script here; the instructions are included in a separate tab in the Google Sheet.


Wednesday, November 18, 2026

Automatically Sort Google Form Responses by Class and Student Name every time a Google Form is submitted

A free Google Sheets automation for teachers

I give all my tests in Google Forms, and most of my tests have 4-7 different Google forms to chunk content. This means that while I'm giving a test, it's a lot of work to see who has finished each section. I am always switching between Google Sheets using the Sort range function to see who has finished a that section of the test, and who still needs to finish. Yesterday I was wishing that it would sort itself as answers were submitted, and it turns out you can use an Apps Script for that!  Disclaimer: As I've said before, I don't know how to write scripts, so ChatGPT wrote this for me and I tested it before trying it on a live Google Sheet.

This free Google Apps Script automatically sorts your response spreadsheet by class section, last name, and first name whenever a student submits a form.

You can also sort responses manually whenever you want by using the custom "Student Sorting" menu.

Step 1: Create your Google Form

  1. Open Google Forms and create a new form.

  2. Add these three required questions:

  3. Add your assignment, quiz, or survey questions.

  • Last name — Short answer
  • First name — Short answer
  • Class section — Dropdown
  1. If appropriate, enable email collection under Settings.

  2. For a graded quiz, enable Make this a quiz under Settings and configure your answer keys.

Use the exact question titles shown above so the script can recognize them.

Step 2: Connect the form to your spreadsheet

  1. Open your Google Form.

  2. Select the Responses tab.

  3. Click the Google Sheets icon or select More (⋮) → Select destination for responses.

  4. Choose Select existing spreadsheet.

  5. Locate your copy of the Auto-Sorting Spreadsheet template (you can create your own copy here).

  6. Click Select.

Google Forms will create a new response tab in the selected spreadsheet. This is normal! The form does not automatically write into a preexisting worksheet just because that worksheet contains matching column headings.

Important: Use the new response tab created by Google Forms. The sorting script identifies columns by their headings, so their physical positions do not matter.

Step 3: Install the sorting script

  1. Open your linked response spreadsheet.

  2. Select Extensions → Apps Script.

  3. Replace any starter code with the script provided below.

  4. Click Save.

Google Apps Script — Auto-Sort Form Responses
/**
 * Google Forms Auto-Sorting Script
 *
 * Sorts the original Google Forms response tab by:
 * 1. Class section (A-Z), if present
 * 2. Last name (A-Z)
 * 3. First name (A-Z)
 *
 * All response data stays together.
 */

// Leave blank to sort the submitted/active sheet.
const RESPONSE_SHEET_NAME = "";

const HEADERS = {
  classSection: [
    "class section", "class", "clase", "section"
  ],
  lastName: [
    "last name", "lastname",
    "apellido", "apellidos", "apellidas"
  ],
  firstName: [
    "first name", "firstname",
    "nombre", "llamas", "te llamas"
  ]
};

// Add a manual sorting menu.
function onOpen() {
  SpreadsheetApp.getUi()
    .createMenu("Student Sorting")
    .addItem("Sort responses now", "sortResponses")
    .addToUi();
}

// Runs automatically after a form submission.
// Requires an installable spreadsheet trigger.
function sortOnFormSubmit(e) {
  const sheet = RESPONSE_SHEET_NAME
    ? e.source.getSheetByName(RESPONSE_SHEET_NAME)
    : e.range.getSheet();

  if (!sheet) {
    throw new Error("Response sheet not found.");
  }

  sortSheet_(sheet);
}

// Runs when "Sort responses now" is selected.
function sortResponses() {
  const ss = SpreadsheetApp.getActiveSpreadsheet();

  const sheet = RESPONSE_SHEET_NAME
    ? ss.getSheetByName(RESPONSE_SHEET_NAME)
    : ss.getActiveSheet();

  if (!sheet) {
    throw new Error("Response sheet not found.");
  }

  sortSheet_(sheet);
}

// Sort complete rows using column headings.
function sortSheet_(sheet) {
  const lastRow = sheet.getLastRow();
  const lastCol = sheet.getLastColumn();

  if (lastRow <= 2 || lastCol === 0) return;

  const headers = sheet
    .getRange(1, 1, 1, lastCol)
    .getDisplayValues()[0]
    .map(normalizeHeader_);

  function findColumn(aliases) {
    const normalized = aliases.map(normalizeHeader_);

    const index = headers.findIndex(
      h => normalized.includes(h)
    );

    return index === -1 ? null : index + 1;
  }

  const classCol = findColumn(HEADERS.classSection);
  const lastNameCol = findColumn(HEADERS.lastName);
  const firstNameCol = findColumn(HEADERS.firstName);

  if (!lastNameCol || !firstNameCol) {
    throw new Error(
      "Required columns not found: " +
      "Last name and First name."
    );
  }

  const sortColumns = [];

  if (classCol) {
    sortColumns.push({
      column: classCol,
      ascending: true
    });
  }

  sortColumns.push(
    { column: lastNameCol, ascending: true },
    { column: firstNameCol, ascending: true }
  );

  // Preserve the header row and sort all
  // response columns together.
  sheet
    .getRange(2, 1, lastRow - 1, lastCol)
    .sort(sortColumns);
}

// Normalize headings for flexible matching.
function normalizeHeader_(value) {
  return String(value)
    .trim()
    .toLowerCase()
    .normalize("NFD")
    .replace(/[\u0300-\u036f]/g, "")
    .replace(/\s+/g, " ");
}
Step 4: Enable automatic sorting

  1. In Apps Script, select the Triggers icon (alarm clock) in the left sidebar.

  2. Click Add Trigger.

  3. Select these settings:

Function to run: sortOnFormSubmit
Deployment: Head
Event source: From spreadsheet
Event type: On form submit
  1. Click Save.

  2. Complete Google's authorization prompts.

You only need to configure this trigger once per spreadsheet.

Step 5: Test the automation

  1. Submit a few test responses using your Google Form.

  2. Use different class sections and student names.

  3. Open your linked spreadsheet.

  4. Verify that the rows are sorted in this order:

    • Class section (A–Z)

    • Last name (A–Z)

    • First name (A–Z)

All other response information, including timestamps, email addresses, scores, and answers, stays with the correct student.

Automatic Google Forms Sorting

Organize student responses automatically by class section and name.

BEFORE: Responses in submission order (not real student names)

Last name First name Class section
García Ana Spanish 3
Smith Ben Spanish 2
López Carlos Spanish 2
Adams Diana Spanish 3
↓
Google Apps Script automatically sorts the responses
Class section → Last name → First name

AFTER: Responses organized automatically

Last name First name Class section
López Carlos Spanish 2
Smith Ben Spanish 2
Adams Diana Spanish 3
García Ana Spanish 3

✓ Entire response rows stay together, including timestamps, scores, email addresses, and answers.

Step 6: Sort manually whenever needed

Reload the spreadsheet after installing the script.

A new menu called Student Sorting will appear. Select Sort responses now to sort the active response tab.

This is useful after correcting student names, changing class sections, or importing older responses.

Tips

  • Keep the column headings consistent.

  • Do not manually sort individual columns. Always sort complete rows.

  • If your form does not collect email addresses or scores, the script still works.

  • For student privacy, do not publish actual student responses or make completed response spreadsheets publicly accessible.

  • Make a backup before applying the script to a spreadsheet containing important data.


Monday, November 2, 2026

How to Create Checkable Learning Targets in Canvas Using GitHub (for Free!)

I've been posting learning targets in Canvas for years, but I wanted students to be able to actually check things off as they mastered them. I also wanted the checklists to remember what students had checked so they could come back later and see their progress.

I actually had a solution for this already. I was using a freemium product that allowed me to create interactive checklists and embed them in Canvas. It worked well enough, until I ran out of freebies. Continuing to use it for all my courses was going to be prohibitively expensive.

And I was not about to start paying a ridiculous amount of money for checkboxes.

So I started looking for another solution and ended up creating my own GitHub-hosted checklist that I can embed directly into Canvas pages.

I say "creating," but this was very much an AI-assisted project. I knew what I wanted it to do, and I worked through the implementation with ChatGPT. I am not a programmer, and I have no particular desire to become one.

Which brings me to the other reason I'm writing this post: I don't actually remember all the steps we took to make it work. 😆

And because I didn't know how to set it up in the first place and don't remember exactly how we did it, I had ChatGPT write this post using my actual code, Canvas embed, and instructions about what I wanted included. So if anything in this tutorial sounds suspiciously organized and coherent, that's probably why.

This is both a tutorial for anyone else who wants checkable learning targets in Canvas and documentation for myself, because six months from now I'll inevitably want to change something and have absolutely no recollection of how I set it up.

The best part? I can use the same system for all four of my Spanish courses, and I don't have to create a separate webpage for every unit.

What it looks like

Screenshot of an interactive learning-target checklist embedded in Canvas, showing Spanish 1 unit objectives with checkboxes students can select to track their progress. The checklist includes a reset button and saves selections in the student's browser.
Checkable learning targets embedded in Canvas!

Each learning target has a checkbox next to it. Students check off the targets they feel they can accomplish without using notes, and their selections are saved in their browser.

There's also a reset button in case they want to start over.

I use the heading Sin usar apuntes, puedo… / Without using notes, I can… because I want students to think about what they can actually do independently, rather than what they can accomplish while looking at their notes.

These are self-assessment checklists, not graded assignments. I can't see which boxes individual students have checked, and the checkboxes aren't connected to the Canvas gradebook.

How it works

The checklist is a webpage hosted on GitHub Pages, which is a free service that allows you to publish webpages from a GitHub repository.

The webpage contains the learning targets for my different courses, semesters, weeks, and units. When I embed it in Canvas, I use a URL that tells the webpage which set of learning targets to display.

For example, here's the URL for my Spanish 1, semester 1, unit 1 checklist:

https://asaalfeld-afk.github.io/checklists/?course=S1&sem=1&week=U1

The three pieces at the end tell the webpage what to display:

  • course=S1 means Spanish 1.

  • sem=1 means semester 1.

  • week=U1 means unit 1.

Despite the name week, I can use it for numbered weeks or entire units.

If I want the checklist for Spanish 4, semester 1, unit 2, I just change those values:

https://asaalfeld-afk.github.io/checklists/?course=S4&sem=1&week=U2

Same webpage, different learning targets.

This is a big deal for me because I'm always looking for ways to reduce the amount of repetitive maintenance my courses require.

Step 1: Get the code

I've made my checklist code available on GitHub:

Checkable Learning Targets — GitHub Repository

If you've never used GitHub before, don't panic. You do not need to be a programmer to use this.

You will need a free GitHub account.

Once you're signed in, open my repository and click Fork in the upper-right corner. This creates your own copy of the repository, which you can edit without changing mine.

You can keep the repository name checklists or choose something else.

Make sure your repository is public if you plan to use GitHub Pages with a free account.

Step 2: Publish your checklist using GitHub Pages

Once you've created your copy:

  1. Open your new repository.

  2. Click Settings.

  3. Select Pages from the left-hand menu.

  4. Under Build and deployment, choose Deploy from a branch.

  5. Select the main branch and the / (root) folder.

  6. Click Save.

GitHub will publish your webpage. It may take a few minutes before the link starts working.

Your URL will generally look like this:

https://YOUR-USERNAME.github.io/checklists/

Replace YOUR-USERNAME with your GitHub username. If you gave your repository a different name, use that name instead of checklists.

Open the link to make sure your webpage is working.

You may initially see an error about an invalid course, semester, or week. That's expected if you haven't added any information to the URL yet.

Step 3: Customize your learning targets

Now comes the part that requires a little editing.

In your GitHub repository, open the file named index.html.

Click the pencil icon to edit the file.

Near the beginning of the JavaScript section, you'll see this comment:

EDIT OBJECTIVES HERE

Below that is a section beginning with:

const TARGETS = {

This is where the learning targets are stored.

Here's a simplified example of the structure:

const TARGETS = {
  S1: {
    name: "Spanish 1",
    semesters: {
      1: {
        weeks: {
          U1: [
            "introduce myself in Spanish",
            "greet others and say goodbye appropriately",
            "exchange simple personal information in Spanish"
          ]
        }
      }
    }
  }
};

In this example:

  • S1 identifies the course.

  • name is the course name displayed on the checklist.

  • 1 identifies the semester.

  • U1 identifies the unit.

  • The sentences inside quotation marks are the learning targets.

You can replace my learning targets with your own and add additional courses, weeks, or units using the same structure.

A few important things: Keep the quotation marks around each learning target, separate the items with commas, and don't accidentally delete the brackets or braces. JavaScript is considerably less forgiving about punctuation than I am.

Also, don't delete the rest of the code! Below the learning targets, there's a section labeled DO NOT EDIT BELOW. That's the part that actually makes the checkboxes work.

When you've finished editing, click Commit changes to save your work.

GitHub Pages will update the published webpage automatically, although the changes may take a little time to appear.

An easier option: Let AI customize the code for you

If looking at all that code makes your eyes glaze over, there's another option: have AI do the editing for you.

That's essentially how I created mine. I knew what I wanted, but I didn't know how to write the code to make it happen.

You can do the same thing!

  1. Open the index.html file in my GitHub repository.

  2. Click Raw and copy the entire code.

  3. Open ChatGPT or another AI assistant and paste the code into the conversation. If it's too long to paste, save it as an HTML file and upload it.

  4. Give the AI your own learning targets, organized by course, semester, and week or unit.

  5. Ask it to replace my learning targets with yours while keeping the checklist functionality intact.

  6. Have it return the complete updated HTML file, not just the section that changed.

  7. Copy the updated code into your own GitHub repository's index.html file and commit the changes.

Here's a prompt you can use:

I'm a teacher creating interactive learning-target checklists to embed in Canvas. I'm providing the HTML and JavaScript code for an existing working checklist, along with my own learning targets.

Replace the existing learning targets with mine, organized by course, semester, and week or unit. Keep the checkboxes, browser-based saving, reset button, responsive layout, and accessibility features working exactly as they do now.

Do not change the underlying functionality unless it's necessary to accommodate my learning targets. Return the complete updated index.html file so I can copy and paste it into GitHub.

Explain anything I need to change in the Canvas embed URLs.

One suggestion: Have the AI make changes one step at a time, and test the results before making additional changes. I've found that AI is very good at helping me create things I couldn't code myself, but it is also perfectly capable of breaking something that was already working. 😆

And keep a copy of your last working version! GitHub maintains a history of changes, so you can return to an earlier version if something goes wrong.

You don't need to learn JavaScript to use this system. You just need to know what you want it to do, provide your learning targets, and check that the finished product works.

Step 4: Embed the checklist in Canvas

This is actually the easy part.

Open the Canvas page where you want your checklist to appear and switch to the HTML editor.

Paste the following code:

<iframe
  title="Spanish 1 · Semester 1 · Unit 1 Learning Targets"
  src="https://YOUR-USERNAME.github.io/checklists/?course=S1&amp;sem=1&amp;week=U1"
  width="100%"
  height="560"
  style="border: 0; border-radius: 16px;"
  loading="lazy">
</iframe>

You'll need to change the GitHub username and, if necessary, the repository name.

You'll also want to change the course, semester, and week or unit values to match the learning targets you want to display.

The title attribute describes the embedded content for accessibility, so make sure it accurately identifies the checklist.

The width="100%" setting allows the checklist to adjust to the width of the Canvas page, while height="560" controls how tall the embedded area is. You may need to increase the height for longer checklists.

Save your Canvas page, and your checklist should appear right there in Canvas.

[Insert screenshot of the checklist in Canvas]

Step 5: Reuse it!

Once you have the system set up, you don't have to repeat the GitHub setup for every new checklist.

You just add the new learning targets to your index.html file and change the URL parameters in Canvas to display the appropriate list.

You can also use the same checklist in multiple Canvas pages.

And if you discover a typo in one of your learning targets (not that I would know anything about that), you can correct it in GitHub instead of editing every Canvas page where that checklist appears.

This is exactly the kind of thing I mean when I talk about making instructional materials more sustainable.

A few things to know

The checkboxes are saved in the student's browser, not in Canvas. The code uses something called localStorage to remember which boxes have been checked.

This means students can generally return to a checklist and see their previous selections if they're using the same browser and device and their browser allows the storage to persist.

However, their selections won't automatically follow them to another computer or browser. They may also disappear if browser data is cleared or storage is blocked.

The checkboxes are not evidence of mastery. Students are reporting what they believe they can do. I still use other assessments to determine whether they've actually mastered the material.

Changing the order of the targets can affect saved checkmarks. The code remembers selections by their position in the list. If you rearrange or replace targets after students have started using a checklist, their saved selections may no longer correspond to the intended targets.

This isn't a Canvas assignment. There's no grade, no submission, and no way for me to monitor students' selections individually.

And that's fine, because that's not what I wanted it for.

Was it worth the trouble?

For me, yes.

I went from using a freemium product that was going to cost more than I was willing to pay to having a free, customizable system that I control.

I already had learning targets for my courses, so the biggest challenge was figuring out how to make them interactive without creating another enormous maintenance project for myself.

Now I have one place to maintain the checklists, and I can use them throughout my Canvas courses. I can update the targets without having to rebuild the Canvas pages, and I don't have to worry about running out of free checklists or paying a subscription fee.

Will every student use the checkboxes exactly as intended? Probably not. But the students who want to monitor their progress have a simple way to do it, and I don't have to grade anything.

And now, if I need to remember how I set everything up, I can just come back and read my own blog post. 😆

Get the code on GitHub

Want a customized version without the setup? I can create a checkable learning-target system using your own course objectives, ready to embed in Canvas. Contact me for pricing.

Monday, October 19, 2026

Free Canvas resources that combine accessibility and sustainability!

I started scheduling posts for my Instagram travel account because otherwise I never remember to post, and I might start doing that here, too, because I've been working on a lot of things and then never sharing them. 

I gave a conference presentation this past weekend for my state's language association entitled Building Systems for Sustainability (you can check it out here if you're interested).  I chose that topic because the last two years have been overwhelming for me, despite coming up on 30 years teaching (I started in 1999) and having a lot of materials developed. Last year in particular was so exhausting that it pushed me to explore new tools to try to make it easier to stay caught up. In the interest of actually publishing this post, I'm going to keep this short and try to do a series of posts talking about some of the different things I've been working on.

For today, let's talk about the Canvas homepage. At a workshop a few years ago, I saw one with buttons and thought that I'd like to make a Canvas homepage with buttons because it would be easier for my students to navigate. So I googled to figure out how to do that, found an online button generator, and generated 30ish buttons to link to each module in Canvas (10 evergreen modules and 20 weekly modules). 

In the spring semester, I realized my problem: I put dates on all of my module buttons, so I would need to generate new buttons and re-link them to all of the Canvas modules (20 images x 4 classes) every semester forever or get rid of the dates on the module buttons. I didn't care for either of those options. The first one would have taken way too long and used time that I didn't have, and the second one would have made my course harder to navigate. After my epiphany with the accordion menus (see my previous post), I realized I could probably do the same thing with buttons. So I took the HTML from my existing homepage and a screenshot, gave them to ChatGPT, and asked it to generate a code-based page that used HTML buttons instead of image buttons. Once again, it took a few rounds to get what I wanted, but here's the before and after:


Canvas homepage with image files used for buttons
Before


Canvas homepage with code-based buttons
After


Admittedly, the image-based buttons had fancier features, like gradient coloring, that I couldn't easily reproduce with HTML. But the wonderful thing about my simpler buttons is that I can edit the module dates directly on the homepage instead of creating 20 new buttons every semester and re-linking them to my weekly modules. Better yet, I can copy the code, paste it into ChatGPT, provide the calendar for the semester, and have it update the dates for me.

I originally wanted colored buttons, but I had trouble finding colors I liked that provided enough contrast for the text to pass the accessibility checker. My solution was to use colored outlines around plain white buttons with black text. I still get the colors I want without sacrificing readability.

Does it look as nice as the fancy Canva graphics that you can buy on TPT? Clearly not. But it has some serious advantages: 

  • I can edit right in the homepage without creating and uploading new images.
  • It takes about 20 minutes to update dates on all of the module buttons if I type them out, and about 5 minutes if I give ChatGPT the code and dates and have it do it for me.
  • For accessibility, this is a game-changer. Since the only image on my page is the banner, I don't have to spend tons of time tagging graphics as decorative or adding alt text. 
  • I was using an invisible table to organize my image-based buttons, which can create accessibility problems for screen-reader users. The code-based formatting is responsive so if a screen is larger, there will be 3 buttons in one row, but if the screen is small it will reduce to one button per row. In addition to being accessible to screen readers, this is a huge advantage for everyone who uses my Canvas course because with my table-based layout, the text on the module buttons became so small that it was illegible on a a smaller screen because it always had the homepage laid out in a table grid.

As with my accordion menus, I've shared this homepage in Canvas Commons, as well as a Christmas-themed version. You can find it by clicking here or searching for me (Anita Saalfeld) in Canvas Commons. My goal is to continue to share my materials on a semi-regular basis, but since my latest hobby is apparently picking up new roles that require more executive function, we'll see how that goes. 😆