Have you ever used Canvas for manage a class? If so, what about creating a “formula question?” It can be pretty tough to input the formula, and if you make a mistake, you start all over!!
As an instructor, I solve most of my problems in Excel, lots of linked cells, then I create my exam from the spreadsheet solutions. So, I thought it would be interesting to make my own question maker using Anvil and Google Sheets.
I needed something in the cloud, I have no web page skills, but I’m a Python programmer.
Here is how it works: I wrote an algorithm that tracks a set of cells in Google sheets back to its inputs. This is called precedent/dependency tracking. I put the code in an Anvil server module. Then I call the function from the Anvil front end which communicated with Google Sheets, tracking and creating the equation. It works!! And, it was easy because I wrote the whole thing in Python.
This is how I tested it…first, I took an equation for normal stress in a cantilever beam: (don’t worry about the equations)
I put the equations into the Google Sheet as shown:
Then I ran the Anvil program which returned the overall formula, based on the Sheet.
Now, looking again at the google sheet, you can see the “red” cell answer matches the “blue” cell answer. You can also see contents of the “red” cell which is the formula that was created.
So, it works, Python is a great language for this kind of analysis and Anvil made the front end easy. Now I’ll copy the equation to Canvas and try it. More to come as I progress…
My goal is to link the front end directly to the Canvas API
Cheers!