Plickers is a website designed for obtaining feedback from pupils in a classroom environment. The basic process is as follows
- The teacher sets up multiple choice questions (typically with 4 answers) on the Plickers website to gauge whether or not pupils understand a certain concept.
- The teacher sets up a mobile device with the plickers app.
- Pupils are all given an individual QR code like thing in the shape of a square which they can hold up in any one of four orientations to answer the question presented to them on a classroom projector.
- The teacher then scans the room with the camera on the mobile device. The app recognises in which orientation each pupil is holding their QR code like thing and stores the data.
- The teacher can then use this information to plan their next teaching steps. For example they could chose to change the seating in the next lesson to put pupils who understand together with those that don't.
One of the main drawbacks that this website has is that it can't import questions from an outside source or export questions to an outside source. This makes it nigh on impossible for teams of teachers to share questions. To help with this I have written a Python script that can read questions from a CSV file and simulate the necessary mouse clicks to import them into the website. This allows teachers to collaborate by sharing their CSV files and importing each other's into their own Plickers accounts. To run the script you will need to follow these steps. The steps are written for a Ubuntu style operating system. If you are running Windows first follow the extra steps below and then return to this poiint.
- Download the repository from my GitHub page here. For windows users use the directory C:\cycwin64\home\"user_name"\plickers_import
- Setup a virtual environment for Python, activate it and install dependencies
- Put your Plickers username and password into the first two lines of the file login-details.txt Please make sure your password is not the same as for any other websites you use as it will be stored here in plain text which is not very secure.
- Write you questions into the CSV file in the example format given in the downloaded file.
- Column A is the text for the question.
- Column B should be an M for a multiple choice question and T for a True/False question
- Column C contains the correct answer A, B, C or D for multiple choice or T or F for a True/False question
- Columns D, E, F and G contain the answers for the questions
- Run the script
Extra steps for windows users
1. Dowload and install Cygwin During the install proceedure make sure to click on the word 'Default' next to Python. See the image below.
- Download and install Firefox.
- Download Gecko Drivers , unzip the file and put it in C:\cycwin64\home\"user_name"\plickers_import\Scripts
- Start Cygwin and run these commands
- Now follow the steps above
Explanation of the code
First make the relevent imports. We will be using the Python selenium libaray that can simulate mouse clicks on a webpage.
Next we initialise a driver instance to the Firefox browser. We add the WebDriverWait function as an attribute to the driver so it can be accessed more easily. This function is used to make the driver wait a certain amount of time (here 5 seconds) for an event to occur.
The lookup function takes two arguments: a driver instance and a query lookup (a string). It finds the sign in link on that page and clicks it.
The login function takes the driver as an input. Reads login details from a file and enters login details into the fields in the webpage.
The click_new_question function looks for an element in the html of the page with a class name 'btn', if it finds one it clicks it.
The add_tf_question function conssits mainly of css locations for the various aspects of the question dialogue. I found these by using the developer tools in my browser and ispect the element I was interested in.
We call the functions in the main section of the programme. The time.sleep() calls are there to ensure that the webpage has enough time to render before the programme carries on with the next function.