|||

A Shortcut for Creating Random Groups

Gaming diceGaming dice

Just before the academic year began in late August, I found myself looking through the Shortcuts application to see whether I had any shortcuts I needed to update for the new term. I found that I was missing one: a shortcut for creating random groups of students for small group work.

I didn’t need to start from scratch; I’d created a version of the shortcut earlier in the year, and had even submitted it for Automation April over at MacStories. I was pleased that I’d figured out how to get it working with groups having an unequal number of participants — that took a while! Still, I wasn’t entirely satisfied with it, because it spit out a messy, hard-to-read JSON dictionary. I was after something cleaner.

What I ended up with was a shortcut that calls another shortcut. Since my previous shortcut worked, I kept it as it was, then called it inside a shortcut that could clean up the mess. Here’s what the results now look like after running the shortcut on an iPhone:

That’s much nicer to look at than JSON.

Here’s the original shortcut that creates the groups. I’ve added comments throughout so you can see what’s going on. As noted, this shortcut produces messy-looking JSON.

To clean things up, I had to add each dictionary item to a list, then sort that list. Here’s the link to the shortcut that does that: Create random groups (shared). Again, I’ve added comments to explain the process.

Note that both shortcuts require that Sindre Sorhus’s Actions app be installed on the device where they’re run. Actions is available for macOS, iOS, and iPadOS, so the shortcuts can be run on whatever device is most convenient.

Lead photo by Erica Li on Unsplash

Up next Data Design and Shortcuts
Latest posts A Shortcut for Creating Random Groups Data Design and Shortcuts Duplicating Files and Folders With Shortcuts Python Scripts for Duplicating Files and Folders A Shortcut for Randomly Calling on Students The Bento Method With Things and Obisidian Importing a WordPress Xml File WordPress Export Some Thoughts on Austin Kleon’s Show Your Work! Adding Google Fonts to a Ghost Theme A Course Planning Template An Unexpected Use for a Raspberry Pi One Year Ago… Sabbatical Diary: Thinking About Grades Paperless Handwritten Feedback Filenames and LaTeX and Pandoc, Oh My! Collecting Student Work With Google Forms