The OpenClassrooms Quiz
Let's consider a real-life example of a feature that you probably know - the quiz in OpenClassrooms! Let's take a look, step by step, at this important part of every course.
The quiz has a number of questions, and you can see that sometimes there are single-choice answers, like in the screenshot above, and sometimes there are multiple-choice answers, as you can see below.
When the student clicks an answer, it is saved and the button turns blue.
There are a number of questions in the quiz, and each one must be answered to complete the quiz.
If you fail the quiz, you can retake it 24 hours later.
When you pass the quiz, you get this message:
This is how the quiz works from the student’s side. On the teacher's side, they can create a quiz, create questions, save the quiz and publish it.
The Art of Writing User Stories
Composing user stories is not an exact science. Two people may write them very differently, without either being wrong.
Even right now, with what you have learned in the last couple of lessons, you could get a blank piece of paper and try to write down the user stories for:
The Facebook Like feature.
Making a bid on an eBay listing.
A feature of your favorite product.
There is no shortcut for practice. If you stop reading now and spend 30 minutes writing down the user stories for any feature in any product, you will learn more than you ever will from reading.
Exploring Best Practices
For example, if a product needs a new search feature, you can look at other respected sites with the functionality and write down the user stories.
It might sound a bit crazy, because you’re not necessarily going to build the same user stories and product as your competitor. Instead, you simply want to understand the logic they used. The idea is to be aware of the logic, flow, and decisions they made.
The next time you have a specification to write, ask yourself who has done it well and use their product!
The OpenClassrooms Quiz: Creating a Full Set of User Stories
The following sections will examine how to create the user stories for the OpenClassrooms quiz, adopting the following process to generate them:
Write down the very high-level logic of a quiz.
Write down a brief description of how users will interact with the quiz chronologically.
Bullet point the main interactions chronologically.
Translate those bullets into user stories.
Step 1: List the High-Level Logic
This process demonstrates some general rules/logic of OpenClassrooms quizzes:
A teacher will create a quiz.
A student will take the quiz.
A quiz can have any number of questions (e.g., 3, 5, or 10).
Questions can have a single correct answer (single choice) or many correct answers (multi-choice).
When students submit their answers, they see a results page showing the correct answers, explanations, and their score.
A 70% score is required to pass a quiz.
If a student fails, they can retake the quiz in 24 hours.
The teacher can work on the quiz and publish it when ready.
Step 2: Describe User interaction
Take a minute to think about the two user roles (the teacher who creates the quiz and the student who takes the quiz). The main interactions chronologically would be:
First, the teacher creates a quiz.
The teacher adds questions and other details.
The teacher then publishes the quiz.
The registered student can see the quiz and answer the questions.
The student submits the quiz and they see the results.
The results implement a certain logic, for example showing pass/fail messages, letting the student repeat the quiz, etc.
Step 3: Create bullet points for the main interactions
This is similar to step 2 above, but in more detail. Let’s take a look:
Create a Quiz
To create a quiz, the teacher will:
Click on "create new quiz," which will open the "Create Quiz" page.
Add a question (the question, possible answers, correct answers, and explanation).
Save the quiz and return later to continue working on it (if necessary).
Publish it when it is ready.
Take the Quiz
The student will do the following in this order:
Click on a quiz.
Arrive on the quiz page.
Enter their answers and submit the quiz.
See the results page.
Create a Pass/Fail Logic
Now, list results and the impact of a pass/fail:
If a student has a score of at least 70%, then they pass the quiz.
Next, they see a results page instead of a quiz page.
If the student fails the quiz, they can retake it in 24 hours.
Step 4: Write the User Stories
Now lets create the user stories for the OpenClassroom quiz. Remember, user stories should be written in the following format:
Create a Quiz (Teacher)
As a teacher, I want to create a quiz page so that I can add questions and save them without publishing.
As a teacher, I want to specify the question, possible answers, correct answers, and provide explanations.
As a teacher, I want to see an error message if a question does not have correct answers so that I can easily see if I've forgotten to specify them.
As a teacher, I want to choose between questions that have a single correct answer and multiple correct answers in order to test my students' knowledge when there is more than one correct answer.
As a teacher, I want to publish the quiz only once it is fully created so that it only appears to students when it is ready.
Take a Quiz (Student)
As a student, I want to open the quiz page when I click on a quiz in a course that I have registered for so that I can see the questions I have to answer.
As a student, I want to choose answers and submit the quiz so that I can test my understanding.
As a student, I want to see my results after I submit so that I can verify whether my knowledge was good enough to pass.
As a student, I want to see explanations for all questions, including an indication of ideal answers beside every question so that I can learn from the questions I got wrong.
Hopefully, you followed the process and understood what I did. Of course, you need to practice to do a similar job. So let’s have a bit of practice, and feel free to explore your favorite product’s user stories right now!
Your Turn!
You've already seen how to write user stories from the teacher's and student's point of view. Now, try your hand at writing user stories for the pass/fail logic of the quiz. Here are some clues to get you started:
Students should see their results after submitting the quiz.
If the result is over 70%, then it's validated.
If not, they must retake it, or wait 24 hours if they fail twice.
When you’ve finished, take a look at my suggestion here to compare your user stories with the ones I came up with.
Let’s Recap!
User stories are steps towards increasing the value of your product. Consider who your users are, how they will use your product, and their common needs.
Look at other respected sites with the functionality you are interested in and write down the related user stories.
Use the four-step process (high-level logic, general user interaction and detailled bullet points, and lastly the user stories) to develop your user stories.
Now that we have explored a user story in detail, let’s head to the next chapter, where we will look at acceptance tests.