script to Forms

Import AI generated questions to Google Forms

As someone who frequently conducts surveys to gather insights and feedback from teachers, I found myself facing the tedious task of manually entering survey questions into Google Forms. I knew there had to be a more efficient way, so I turned to ChatGPT for help.

If you give it some parameters, ChatGPT is good at generating survey questions. I decided to see if I could take it one step further and train it to generate questions in a defined format. Once I got ChatGPT to give me the format I wanted, I asked it to name this the “Baslery” format so I could use it for future question generation.

"Baslery" format
“Baslery” format

To use this format in your own ChatGPT account, I have shared my chat so you can continue the conversation and generate your own questions that are pre-formatted for the next step.

With my question format in place, I worked on a script that imports survey questions from a Google Doc into Google Forms.

Script imports questions from Google Docs into Google Forms

The script takes advantage of my pre-formatted questions that I pasted into Google Docs and parses the data so it can be imported into Google Forms.

To use the script, follow these steps:

  1. Use this template to get your own copy of the Google Doc.
  2. Add your own questions to the doc (use my format)
  3. Click the Extensions -> App Scripts menu item.
  4. Click the Run button.
  5. Follow the steps to authorize the app starting with selecting your account.

After the script is run, you can find a link to the new Google Form in the Execution log or just go to Recent in Google Drive.

There are a couple of caveats when using this script:

  1. The script only works for multiple choice questions.
  2. Double-check your questions before running the script to make sure each one is formatted correctly.
  3. Watch out for True/False questions. ChatGPT likes to forget to list “true” and “false” as options.

Happy surveying!

    Cells to Slides

    Script copies data from Sheets to titles in Slides

    A few times each year, I need a Google Slides presentation where every student in a class has their name set as the title of each slide. This is usually done so we can share the presentation with the class, and each student can contribute to their respective slide.

    I always have the list of student names in Google Sheets, so why not automate the slide creation!

    After an exchange with ChatGPT, I settled on the following script to get the job done:

    To use the script, follow these steps:

    1. Use this template to get your own copy of the spreadsheet.
    2. Change the data in column A to your own or use the example class list.
      (Note: A1 is the header. It will not be copied to a slide.)
    3. Click the Extensions -> App Scripts menu item.
    4. Click the Run button.
    5. Follow the steps to authorize the app starting with selecting your account.

    After I made this script, I had an exciting realization! It became clear to me that its potential goes far beyond just class lists. This script can be utilized for ANY type of presentation!

    Random Name Picker created in Minutes!

    Last night I told ChatGPT, “I want to make a webpage that will pick a random name from a list.”

    In seconds, it delivered this to my phone:


    This morning I fed it the suggestions below until I got what I wanted:

    Is there a way for me to submit a list of names into the website and then it pick a random name?

    I’d like the selected name to be displayed larger and at the top of the page. Can you add some CSS to give the page more style?

    Instead of each name being separated by a comma, can this page be changed so the user submits the names with one name on each line?

    When the submit button is pressed, can the page first display a random half of the names quickly one right after another and then end on the final one?

    Can you double the selected name’s size?

    Is there a way that the submitted names could be saved so that the user still has the last set of names they submitted from a previous browsing session?

    If there are no names loaded in localStorage, can the page load with ten names to demonstrate the page? I’d like the ten names to be the first names of famous scientists.

    I’d like to change the button title to Select Name. Also, can you add instructions above the bottom that explain to the user that they can replace the names in the box with their own but that they need to put one name on each line?

    Can you add 10 more names to the defaultNames?

    Here is the final product for you to try.

    Stop using Google Forms for Everything

    This spring I was asked to fill out of few surveys to vote on certain changes in our community. All of the surveys were anonymous Google Forms and had simple multiple choice questions. I was only supposed to fill out each survey once but nothing prevented me from voting multiple times.

    So I created a little script that allowed me to stuff the ballot boxes with my preferred choices.

    Automated Google Form filling demonstration (modified from this example)

    Don’t worry. I didn’t cheat on any of the real surveys… but I could have.

    Google Forms offers an easy way to create surveys but it doesn’t have survey protection tools that minimize or prevent participants from taking the survey over and over again. This feature is only available if participants sign in and surrender their anonymity.

    Surveys provide an easy way to get information from an audience. However, if you really care about the information you are gathering, you need to consider questions like:

    • Is the survey set up to prevent users from responding multiple times?
    • Will the survey allow you to know if you have a representative sample?
    • How will the results be analyzed and shared?

    If you don’t consider questions like these, your audience may have the perception that you don’t care about the validity of the information being collected. The survey can be seen as an excuse building survey that is only used so you can have an excuse for why you made a decision.

    To ensure the integrity of your survey’s responses, you may need to use a service like Qualtrics or SurveyMonkey that has a more robust set of survey protection tools.

    Add QR codes to student login card at code.org

    UPDATE (2/1/2017): See the note at the bottom of this post.

    Here is a bookmarklet that will add QR codes to the student login cards for your code.org class.

    qrmycodeorg

    Below is a video explaining how to use this bookmarklet.

    UPDATE:
    I was recently informed by a couple teachers that the bookmarklet doesn’t work. After some investigation, I figured out why. As a security measure, new browser standards have been set that prevent many bookmarklets from working. This security measure is called a Content Security Policy or CSP. The bookmarklet will only work if you disable CSP for the page before running it.

    Steps in Chrome:

    1. Install the Disable content-security-policy Chrome extension
    2. Load the printable sign in cards page at code.org
    3. Click the disable content security policy icon to disable CSP
    4. Reload the page
    5. Use the bookmarklet as shown in the video above
    6. Click the disable content security policy icon to re-enable CSP

    The Internet built my daughter an app

    In May, my nine-year-old daughter suffered a stroke. The stroke weakened the left side of her body severely. However, with therapy she has managed to improve each week. Because of the stroke, she has a lot of tone in her arm. This causes her arm to pull up close to her body instead of naturally resting down and at her side. She has to make a conscience effort to put her arm down and we are frequently reminding her.

    One day I got an idea. Could we use sensors to measure when her arm is up and use a vibration to remind her to put her arm down? After a little digging online, I quickly learned that the Pebble smartwatch has an accelerometer that could be used to detect orientation.

    As a physics teacher, I understand accelerometers and I have a little bit of programing experience but I had zero experience with the Pebble watch. So I reached out to the community of Pebble enthusiasts and developers in the Pebble Forums. I explained my situation and asked if my idea was even possible.

    What happened next was truly remarkable. Within a day, I had a response explaining that my idea was possible. By the next day, another user made me a working prototype app. I learned how to install the app on a Pebble watch that my good friend loaned me. I made adjustments to the code using an online development tool called CloudPebble.

    Watch app triggers a vibration in this position
    Watch app triggers a vibration in this position

    Another user offered to merge the app into a watch face “so the watch doesn’t have to look like it’s only there for the stroke.” From here, things really took off. With my feedback, we added several other features such as a learning mode so the app could be used by others in similar situations.

    Info screen gives us feedback
    Info screen gives us feedback

    This experience has shown my daughter the true power of the Internet. She saw that it is so much more than a place to consume media. The Internet allows total strangers from all over the world to work together. She learned that people will volunteer their time and skill to create new things and help others.

    It is the best lesson about the Internet I could ever hope for her to learn.

    What most schools don’t teach

    Another group is continuing the coding to learn theme. The non-profit foundation Code.org is hoping to increase computer programming education across the world. They’ve created a video with an impressive cast (Bill Gates, Mark Zuckerberg, will.i.am, Chris Bosh…) but my favorite quote comes from Gabe Newell.

    The programmers of tomorrow are the wizards of the future. You know, you’re going look like you have magic powers compared to everybody else.

    Check out Code.org to get started immediately.

    Coding to Learn with Scratch

    Scratch is the perfect tool to help kids (ages 8 and up) learn how to write programs or code. But in a recent Ted Talk, Mitch Resnick expresses another good point- the importance of coding to learn.

    Resnick explains:

    As kids are creating projects like this, they’re learning to code, but even more importantly, they’re coding to learn. Because as they learn to code, it enables them to learn many other things, opens up many new opportunities for learning. Again, it’s useful to make an analogy to reading and writing. When you learn to read and write, it opens up opportunities for you to learn so many other things. When you learn to read, you can then read to learn. And it’s the same thing with coding. If you learn to code, you can code to learn. Now some of the things you can learn are sort of obvious. You learn more about how computers work. But that’s just where it starts. When you learn to code, it opens up for you to learn many other things.

    I highly recommend watching Resnick’s talk.

    He demonstrates how kid-friendly programing tools like Scratch are not just for teaching computers, math, science, or engineering. Coding to learn can apply to almost any subject.

    For example, consider teaching kids storytelling with the book Super Scratch Programming Adventure!

    Super Scratch Programming Adventure!
    Super Scratch Programming Adventure!

    Ruth Suehle at GeekMom writes:

    Super Scratch Programming Adventure! helps your budding developer learn to use Scratch with a comic book story. Each section begins with a continuing piece of a story that ends by giving the reader a problem to solve with Scratch.

    I got this book for my own kids and they were off in minutes. I think Super Scratch Programming Adventure! would be the perfect textbook to get your students off coding to learn.

    No child left without coding skills

    In this article, Andy Young writes:

    Programming is the act of giving computers instructions to perform. This is true whether the output is your word processor, central heating or aircraft control system. If you can’t code, you are forced to rely on those that can to ensure that you can benefit from the greatest tool at your disposal.

    I can’t agree more. Every kids should learn to code. Even if it’s just a little bit. Programming skills are empowering and they teach kids the importance of building models.

    The easiest way to get started is to teach your students how to build a simple web  page using HTML. It’s not really programming but it will get kids thinking about code.

    Learn HTML

     

    To dive into programming, check out these tools to get kids started. My personal favorite is Scratch. It is free, easy to use, and designed so even  young kids can understand programming without actually having to write out complex code. Below is an overview.

    Resembling Scratch, App Inventor is another easy to use programming tool for building apps on Android devices.

    App Inventor

    App Inventor was announced by Google but has recently been handed to MIT to manage. Watch for the “MIT App Inventor” this spring.

    Finally, maybe for the more experience coders, give VPython a look. It allows students to create 3D interactive models. Compared to Scratch, it looks a little intimidating. However, there are many sample programs and tutorials available to help you get started.

    Web site blocked? Code your way in.

    Tumblr APII love tumblr.com. It’s such an easy-to-use site for sharing things that you find online. So I was disappointed when my school’s web filter started blocking the site.

    I can see why our filter has tumblr on its blacklist; tumblr will let you post anything to their site. Students could use tumblr to chat or view inappropriate material.

    But we’re not talking about students; we’re talking about me- the teacher.

    Our schools roll clips like Did You Know Shift Happens and use terms like flat-world during staff meetings. Yet, they can’t come up with a process to filter teachers that is different from the one they use for students? In one breath it’s, “prepare our students for the 21st century” and in the next breath its, “just don’t do it on a school computer.”

    Andy Carvin at PBS’s learning.now put it best when he wrote:

    “…for educators who aren’t trusted to use their professional judgment, an important opportunity to teach their students about 21st century citizenship is being squandered.”

    However, ranting usually doesn’t get me anywhere (I often feel better though). This time I decided to take matters into my own hands.

    Using tumblr’s API and some php scripting I created my own page that can post to tumblr. Since my all the work is done from an approved site, my posts sneak right past the web filter.

    I know it’s a small victory but it felt good to gain back some control for a change. (By the way, here is the script if you’d like to use it on your own web site.)