Tag Archives: teacherscoding

Computational Thinking and Spreadsheets, Teacher Edition (#TeachersCoding)

I ran a workshop last week giving some teachers ideas on how to use computational thinking to improve their workflow. I've written in the past about how spreadsheets can serve as a way to get students thinking like programmers, without the intimidation of a text-based development environment. I don't find teachers any different in this regard.

I spent the beginning of this workshop sharing a bit about my views on why teachers should develop their computational thinking skills. I then set them off to work through answering the following questions about each task in the video below:

  • What is the spreadsheet being programmed to do?
  • What commands are being used?
  • How would I use this in my own practice?

I'm reasonably sure that a majority of teachers have a spreadsheet somewhere that contains student data like the one in the video. My hope is that teachers that watch the video and see what I've done with this spreadsheet will have one of a few possible responses:

  • Wow, I do that by hand right now. Now I know there's an easier way that will save me time.
  • That isn't useful to me, but it does give me an idea of how to do some other task that involves iteration, sorting, or another task best suited for a computer.
  • I do that already. Is that computational thinking?

If I elicit any of these responses, and then get someone to then build a tool that is useful to him or her, I think I've done my job. Learning to code for its own sake isn't necessarily worth a teacher's valuable time. Outsourcing tasks that computers do best to a computer can free a teacher to have more time for those tasks that require the expertise, experience, and a personal touch that only a person can provide. If learning a bit of computational thinking can do that, doing so might be worth the time.

Please comment on the video or below to let me know what you think.

Getting Grade Data from PowerSchool Pro (#TeachersCoding)

Given that I use standards based grading with most of my classes, the grades I assign to students change quickly. I'm modifying those scores multiple times a day in some cases in my school's instance of PowerSchool Pro.

What the system currently lacks is an easy way to get that data out. For whatever reason, the only export format is PDF. This makes it difficult to get things into a spreadsheet.

After some hacking around in the console, I was able to put together a script that scrapes a class scoresheet page for the student names and assignment names and stores the result in a variable called exportData. This code is included below, and is also here in a gist. Paste the entire code into the console and run it. Then type in exportData and the scraped data will appear.


You can then copy and paste the resulting string (leaving out the quotes) into Excel, OpenOffice, or Google Sheets and the data will appear there, ready to be spreadsheet-ified.

The only place where this doesn't work perfectly is when there are more students than will fit on the page. As far as I could tell after poking around, the grade data is re-rendered to fit the page as scrolling occurs. I didn't work that hard to see if the data is stored somewhere else on the page, so someone with a bit more insight might be able to improve upon my work.

Here is the full code:

var nameElements = $('.student-name').toArray();
var assignmentElements = $('var').toArray();
var names = [];
var assignments = [];
var assignmentNumber;




names = names.slice(0,0.5*(names.length))

var rows = $( "tr[id*='std']" ).toArray()
var currentName = $(row).find('.student-name')[0].innerHTML;
var gradeElements = $(row).find('var');
gradeElements = gradeElements.slice(1,gradeElements.length).toArray();
grades = [];

var currGrade = (parseFloat(grade.innerHTML)!=NaN)?parseFloat(grade.innerHTML):'';




assignmentNumber = names[0][1].length;

assignmentString = 'Name \t';

for(var i = 0;i<2*assignmentNumber-1;i+=2){ assignmentString += assignments[i] + '\t ' } var gradeString = ''; names.forEach(function(name){ var currentString = ''; currentString += name[0]+ "\t " name[1].forEach(function(grade){ currentString += grade + "\t " }) gradeString += currentString + "\n " }) var exportData = assignmentString+"\n"+gradeString;

Generating Function Library Quizzes (#TeachersCoding)

I've required my IB classes in the past two years to be able to draw some standard functions from memory as part of our function families unit. Creating quizzes for this has been a hassle since I've manually had to build these using Word or LibreOffice. I greatly dislike formatting things using either software package.

I decided this week that creating these quizzes using HTML seemed like a perfect application of my developing React skills. Here's the result:


The order of the functions randomly generates on each page load, which makes it easy to generate new versions. I've been able to export these as PDF files and then send them right to the printer.

You can access the code here on CodePen:

See the Pen FunctionLibraryQuiz by Evan Weinberg (@emwdx) on CodePen.0

Feel free to use this or modify to fit your needs.

#TeachersCoding: Building an Image Downloader for WODB

If you read my blog regularly, you know how I feel about using technology to manage repetitive tasks. It's intimidating to learn to code without purpose. Seeing how code can be used in the context of making a teacher's job easier is a much more direct motivation for learning to do it yourself.

Here's my next installment in the TeachersCoding series. In four minutes, you get the basic steps and tools for putting together a Python program that will download images from Mary Bourassa's excellent Which One Doesn't Belong website . All that's missing is you going through the steps yourself:

This program doesn't download all of the images from the website - that's a task for you to figure out and do on your own. It doesn't take much. My goal is to have more teachers get hooked by the thrill of seeing code they create do something that is practical and adaptable to their own purposes. We need to grow our ranks.

Share any issues you find in the comments below. I'm excited to get this out there and see what you do with it.

Relevant links: