See our blog post on the ManyClasses website for the motivation for this project.
To use this script:
- Update
config.phpif you wish. Pay special attention to the$KEY_LENGTHvariable, which sets an upper bound on how many unique requests the consent script can handle. If$KEY_LENGTHis 3, then there are 900 unique keys --100thru999. Roughly half of the keys will be consent and half dissent, so the script will run about 400 times before it runs out of unique keys. We exclude keys where the value would have a leading 0 so that Canvas's number field validator runs properly. - Upload all four
.phpfiles onto a webserver. Ensure that the folder that contains the.phpfiles is writeable so that the sqlite database can be generated. - Run
setup.phpby going to the URL in your browser. With key lengths of 4 or more the script can take a while to run. It will print a message when it is complete. - Use
consent_buttons.phpto get consent values. You can embed this form in a Canvas quiz, for example.