Files changed (2)
+wufoo_quizzes is meant to allow people a quick, easy, and slightly dirty way to make Wufoo surveys become graded quizzes. It is written in Python.
+DISCLAIMER: This is a pretty light weight solution that is not suitable for extremely high traffic forms, but it might give you a starting point. You can also email me with requests or issues. I'll do all I can to help.
+First, you'll need a Wufoo account and a survey to use. The example I have tested this module with is about <a href="http://whitetailsoftware.wufoo.com/forms/wwii-history-quiz/">WWII history</a>. Each quiz you use with this module will need a Name and Email field. Go make your Wufoo quiz. I'll wait.
+Now you need to prep a place to run the quiz grader from. Let's make a virtualenv for that. <a href="http://davidfischer.name/2010/04/why-you-should-be-using-pip-and-virtualenv/">Why, you ask? You are using pip, right?</a>
+If you don't have <a href="http://www.arthurkoziel.com/2008/10/22/working-virtualenv/">virtualenv</a>:
+This prepares a python environment that does not connect to your local root site-packages for dependencies and installs two of the three dependencies for this project into it. Now, <a href="http://code.whitetailsoftware.com/wufoo-quizzes/downloads">download the code for wufoo_quizzes</a> if you have not already. Unzip that in your choice location. Finally, we download our last dependency, <a href="https://github.com/wufoo/pyfoo">pyfoo</a> which allows us to talk to the Wufoo API from python. Unzip that and place pyfoo.py and the scripts folder into the same directory that you contains quizgrader.py from wufoo_quizzes.
+Edit the answers.txt file in wufoo_quizzes to contain the name of your quiz followed on each line by a question: answer format.
+Make sure the question and answer text exactly matches what is on your Wufoo form. I copied and pasted mine directly after completing the form.
+You will also need to configure settings by creating a file named 'locals.py' in the same directory as 'quizgrader.py' from wufoo_quizzes. You can copy and paste what you'll need from quizgrader.py or the example setup below:
+success_message_text_alt = "This is an text only alternative message for those users pass the quiz"
+The templates setting tells quizgrader.py where to find the template files that are included in the template directory. You can move those around if you like, but I had to give the directory of wufoo_quizzes and the templates directory to make sure django could find the templates.
+admin_email is the email address that will receive the results from the grading in a CSV with the subject line of admin_email_subject.
+success_message_text_alt allows you to specify a text only message for user emails that pass the quiz. The default template for success is an HTML email which may not work in all email clients.
+send_user_emails and send_admin_email lets you specify if you want the system to send emails at all. All results are printed to stdout if not.
+Run the grader, receive emails, change your life! (Make sure you activate the virtualenv as above first.)
+If you'd like to get results only from the last week we can make some small changes to quizgrader.py to make that happen. Uncomment the if statement where you see (2 locations):
+#if datetime.datetime.strptime(entry[date_created.ID], "%Y-%m-%d %H:%M:%S") > (datetime.datetime.now() + relativedelta(weeks=-1)):