Project Summary
Piazza and Ed are online educational Q&A forums where students can post and answer questions, and course staff (e.g., professors, teaching assistants, etc.) can also answer questions, too.
Recently, most professors at my university switched from Piazza to Ed. Piazza was great because whenever a student would post a question, I would get a small push notification to my phone with a little preview of their posted question. Then, if I knew how to answer it, I could quickly type up a response within 5 minutes (literally!). If I didn't know how to answer the question, I'd just dismiss the push notification and let one of the other 30+ teaching assistants (TAs) handle it – many of them also had such notifications enabled.
Ed, however, doesn't have a mobile app – and therefore doesn't have push notifications. Because of this, my fellow TAs and I were barely answering student questions. It was just the few head TAs who would answer questions whenever they had time. I really longed for the Piazza post notifications, so I built the Ed Notifier Bot, which scrapes Ed and sends messages in Slack whenever a new question is posted. Slack (being a messaging app) then sends push notifications right to TAs' phones.
The end result: push notifications for Ed, quicker response times for students, and a more efficient and productive course staff.
Skills Learned & Used
- Python
- This project was pretty much all done in Python 3.
- Slack API
- I had not made a Slack bot before, so this project gave me a glimpse into the very complicated world of Slack bots. This bot is quite simple, but the possibilities are endless!
- HTTP Requests & Backend API Authentication
- For this project, I hade to make use of Ed's backend API, which I found by simply examining my browser's network traffic using its developer tools. I just needed an authentication token to access the API, which is why I built a Google Chrome extension to automatically send my local computer's current authentication token to the Ed-scraping server whenever I visit Ed. Tokens are valid for a week, so as long I visit Ed at least once a week, everything works!
- The methods I used to access Ed's API are much more broadly applicable to other websites, too! It is the process that was important, rather than its specific application, in this case.
- While this may be starting to sound a bit morally dubious, this scraper does the exact same thing as my web browser does whenever I load up the Ed website – it makes a call to the Ed backend API. This script just skips the web browser part, as there's no user for whom content should be rendered.
Acknowledgements
Thank you very, very much to the following people for their help and support on this project:
-
The awesome Duke CS201 staff
Thank you so much to all of the amazing CS201 staff members. From Arushi and Zack to Kate and Dr. Astrachan, everyone was enthusiastic and supportive about the project and very kindly allowed me to deploy it live in a Slack channel! Thank you, too, to the TAs who joined the channel – I'm glad that the notifications were as useful to you as they were to me!