Browse Source

typos and structure pass

pull/766/head
Chris 3 years ago committed by Christopher Fremond
parent
commit
162d5f3892
  1. 37
      subjects/mister-quiz/README.md
  2. 20
      subjects/mister-quiz/audit/README.md

37
subjects/mister-quiz/README.md

@ -2,30 +2,31 @@
### Objectives
Have you ever watched "Who Wants to Be a Millionaire?" and wonder how would you do if it was you? Well you are not going to play it this time yet. But you can, after finishing this project.
Have you ever watched "Who Wants to Be a Millionaire?" and wonder how would you do if it was you? Well you are not going to play it this time yet. But after finishing this project, you will be able to.
You will have to continue to build a quiz game website that is already in development. The already made code is available [here](https://assets.01-edu.org/mister-quiz/mister_quiz.zip). There is missing some code that you will have to create in order to fullfil all the requests explained in the `Instructions` section.
The project is written in [PHP](https://www.php.net/) and it is using [Laravel](https://laravel.com/), one of the most (if not the most) known PHP web framework. So you have to install both PHP and Laravel on your machine. Get comfortable to use dollar signs.
The project is written in [PHP](https://www.php.net/) and it is using [Laravel](https://laravel.com/), one of the most (if not the most) known PHP web framework. So you have to install both PHP and Laravel on your machine. Get comfortable using dollar signs.
### Instructions
Firstly, users should be able to register and login. To register a user has to enter a username, an email, a password and a password confirmation. To login the user has to provide the email and the password. If the login credentials are not correct it should be visible an error message.
Firstly, users should be able to register and login. To register a user has to enter a username, an email, a password and a password confirmation. To login the user has to provide the email and the password. If the login credentials are not correct, an error message should appear.
In the Login page it must be possible to travel to the Register page and vice versa.
In the Login page, it must be possible to navigate to the Registration page, and vice versa.
The user must have in its attributes the amount of XP, determined by the number of questions he got right. Also the score for each category of questions should be stored in the format `x/y` where `x` are the correct answers and `y` are the total questions.
The user must have in its attributes the amount of XP, determined by the number of questions he or she answered right. Also the score for each category of questions should be stored in the format `x/y` where `x` are the correct answers and `y` are the total questions.
After logging in the user should be redirected to the home page. The home page should have at least three buttons present:
After logging in the user should be redirected to the homepage. The homepage should have at least three buttons present, four if they are
logged in:
- Login button / Profile button => if the user is not logged in the login button should be visible, otherwise the profile button must be visible.
- Leaderboard => shows a list of the best players.
- Start Quiz => button that when pressed starts a quiz.
- Logout => Is only shown if the user is logged in.
- The Login button / Profile button => if the user is not logged in, the login button should be visible, otherwise the profile button must be visible.
- The Leaderboard button => shows a list of the best players.
- The Start Quiz button => button that when pressed starts a quiz.
- The Logout button => Is only shown if the user is logged in.
#### Quiz
When clicking the `Start Quiz` button on the home page, if the user is not logged in, instead of starting the quiz the user should be redirected to the Login page. In case the user is already logged in, the website must present the questions and the available answers for each question. The player can then choose an answer to each question and at the bottom of all the questions submit the quiz and get his results.
When clicking the `Start Quiz` button on the homepage, if the user is not logged in, the user should be redirected to the Login page (instead of starting the quiz). In case the user is already logged in, the website must present the questions and the available answers for each question. The player can then choose an answer to each question and at the bottom of all the questions submit the quiz and get his results.
A question has:
@ -41,20 +42,20 @@ A question has:
There are some conditions that you should have in account:
- After starting the quiz, if the user refreshes the page the same questions should pop up.
- The same must happen if the user goes back to the home page and start the quiz again.
- The same must happen if the user goes back to the homepage and start the quiz again.
- All questions should have been answered before being able to submit the quiz.
- At least one question of each category is required.
After submitting the quiz, the user should be presented to a `Results` page. This page must show:
- How many questions the user got right and the number of total questions made
- How many questions the user got right in each category
- How many questions the user answered right and the number of total questions made
- How many questions the user answered right in each category
If a user gets a correct answer to a question his XP is increased by the XP of the question he got right. Also the score that the user has for the category of that question should be updated.
If a user gets a correct answer to a question, his XP is increased by the XP of the question he answered right. Also the score that the user has for the category of that question should be updated.
#### Profile
When the user visits his profile it must be visible:
When the user visits his profile the following must be visible:
- his username
- his email
@ -80,7 +81,7 @@ The leaderboard page should display a table containing the top 10 players organi
#### Laravel
If you already opened the project zip file provide, you must be overwhelmed with the amount of files and folders inside it. I know, it can be hard.
If you already opened the project zip file provided, you might have been surprised with the amount of files and folders inside it. We know, it can be overwhelmeing.
Here are the main folders and files you will mess around with:
@ -102,7 +103,7 @@ You may use some commands to, for example, create controllers, create migrations
In order to apply the migrations in the `database/migrations/` directory, you will need to create a database. Shocker.
One of the ways to accomplish that is to work with [`XAMPP`](https://www.apachefriends.org/index.html). XAMPP is the most popular PHP development environment and unites useful tools in order to make web development easier. Pretty much it uses Apache2 (an http web server host), MySQL (a database management service) and phpMyAdmin (a web MySQL administration app).
One of the ways to accomplish that is to work with [`XAMPP`](https://www.apachefriends.org/index.html). XAMPP is the most popular PHP development environment and unites useful tools in order to make web development easier. It pretty much uses Apache2 (an http web server host), MySQL (a database management service) and phpMyAdmin (a web MySQL administration app).
Once you have XAMPP and these three tools up and running, you can head over to [`localhost/phpmyadmin`](http://localhost/phpmyadmin/) and create a new database called mister_quiz. After that you apply the migrations and you are good to go on your quiz quest.

20
subjects/mister-quiz/audit/README.md

@ -1,12 +1,12 @@
#### Functional
###### Can you register a new user providing an `username`, an `email`, a `password` and a `password confirmation`?
###### Can you register a new user providing a `username`, an `email`, a `password` and a `password confirmation`?
###### Can you log in a user providing its `email` and `password`?
###### While not logged in, is there three buttons (`Login` button, `Leaderboard` button and `Start Quiz` button) in the main menu?
###### While not logged in, are there three buttons (`Login` button, `Leaderboard` button and `Start Quiz` button) in the main menu?
###### While logged in, is there four buttons (`Profile `button, `Leaderboard `button, `Start Quiz `button and `Logout `button) in the main menu?
###### While logged in, are there four buttons (`Profile `button, `Leaderboard `button, `Start Quiz `button and `Logout `button) in the main menu?
##### Start a quiz clicking on the `Start Quiz` button while not logged in.
@ -20,18 +20,18 @@
###### Were you unable to do submit the quiz?
###### Does the quiz contains at least one question of each category?
###### Does the quiz contain at least one question of each category?
##### After answering all the questions try to submit the quiz.
###### Were you redirect to a results page, where it is shown how many answers you got right, the number of total questions made and how many questions you answered right in each category?
###### Were you redirected to a results page, which shows how many answers were right, the number of total questions made and how many questions you answered right in each category?
##### Go to the `Profile` page.
##### Navigate to the `Profile` page.
###### Are there present the user username, email, xp, his correct rank (according to the README), the percentage of correct answers for each category, the number of correct answers for each category and the number of total questions answered for each category?
###### Are the following all present? : the user username, the email, the xp, the correct rank (according to the README), the percentage of correct answers for each category, the number of correct answers for each category and the number of total questions answered for each category?
##### Go to the `Leaderboard` page.
##### Navigate to the `Leaderboard` page.
###### Is there present a table consisting of the top 10 players oragnized by XP amount?
###### Is there a table consisting of the top 10 players organized by XP amount?
###### Does the table contain in each row the username of the player, XP amount of the player, total correct answers of the player?
###### Does the table contain in each row, the username of the player, the XP amount of the player, and the total correct answers of the player?

Loading…
Cancel
Save