Wern Ancheta

Adventures in Web Development.

Introduction to Shotgun

| Comments

One of my pain points as a teacher is checking student activities. That includes seat works, assignments and quizzes. Checking takes a lot of time. In one of my classes, it took me 4 hours to check 48 papers which has 50 items. The thing I hate is that its repetitive like doing factory work. That is why I started creating Shotgun, a quiz maker app. The idea is to create a quiz using it and then have students access the quiz at a specific time. Once the student has submitted the quiz, the score is automatically computed.

Shotgun allows for creating of classes. This allows the teacher to add the name of the class, some details and a textarea where the student details can be entered.

create a new class

Once a class has been created, it is then listed in the classes page.


From there, the update link can be clicked to access the page for updating the class. This is where the class details can be updated. Students that are no longer entering the class can also be dropped so they’re no longer included in the list.


Next is the creation of new quizzes. Currently, only 3 types of quizzes can be created: identification, multiple choice and true/false. True/false still take a bit of effort though. As it uses the same functionality for multiple choice. Which means that true and false has to be added as a choice.


Once the quiz is created, it is listed in the quizzes page.


A quiz can be scheduled by going to the scheduling page. This is where the quiz, class, the start time and end time can be added. The students can only take the quiz between the time specified.

schedule quiz

While the time added in the quiz is not the same as the current time, the teacher can still update the details of the quiz such as the class who is going to take it, the quiz to be taken and also the start time and end time.

scheduled quizzes

When it’s time to take the quiz. The teacher then asks the students to access the quiz page on the browser. The teacher gives the quiz code and the students enter it together with their ID number.

start quiz

If the current time is between the start time and end time, the actual quiz is rendered. Every quiz can only be taken once by a student, so once it has been taken, the student cannot take it again. And while taking the quiz, the student cannot open a new tab or open any other window in the computer. The quiz will be automatically submitted when this is done. This is done through JavaScript so if JavaScript is disabled in the browser, the quiz won’t be rendered at all.

take quiz

Once the quiz is done, the teacher can then view the scores of the students.

take quiz

Or export it to a spreadsheet.

take quiz

From there, the teacher can just copy the scores and paste it to their own class record spreadsheet.


This is all well and good but there are still some hard problems that needs solving. First is the fact that the identification type of questions that you can create are rigid. There should only be a few acceptable answers. And since I’m primarily teaching web development. There is a need for questions that asks students to code something. If you’re a programmer you know that there can be many ways to solve a specific problem. There are many ways which you can code something. And it’s close to impossible to consider all of those when adding an acceptable answer to a quiz item. One possible solution is to use the output of the code as the answer. So for example, if you ask the student to write a function that would return the sum of 2 numbers that were supplied as the arguments. So in the back-end, you add the following function:

var sum = function(num1, num2){
    return num1 + num2;

Then you also add the arguments to be used. And then those arguments will be used to execute the function that you added. Then the program will check if it has the same result as the function that was coded by the student. If it does then the answer is considered correct. The only problem is that I still have no idea how to code that kind of thing. It’s basically telling a program to execute a program that is stored in the string of text. The solution for now is to stick with multiple choice type of question.

Another problem is letter casing. Answers can be typed in many ways: ALL CAPS, Capitalized, or all lower case. I’m still yet to figure out what’s the best way to do this. Because some questions might require answers to be in a specific letter case and some don’t. The only solution I can think of right now is to have an option in the quiz item that allows for specifying if the letter casing should match what was included in the answer list or not. If not then have the program convert the answers (answers by students, answers included by teacher) to lower case and then compare. If yes then compare the answers as it is.

Future Plans

Here are my future plans for this project.

  • Add signup, forgot password and logout.
  • Add functionality for deleting answers and choices.
  • Random order for quiz items for every student. This will make it hard for students to copy answers from their classmates.
  • Support for code based answers (as mentioned in the problems section).

That’s it! If you want to use this project or contribute to it, you can download it on Github.