GitHub Readme.md
SlamQuiz is an online quiz software, a PHP web application developed using the Symfony framework (version 4).
Thanks to Symfony
git clone https://github.com/LaurentBouquet/slamquiz.git
cd slamquiz
composer install
In the commands below, replace aSecurePassword with a secure password.
Here are the steps to create the database, either with MySQL or with PostreSQL.
Enter this commands in a terminal prompt :
sudo mysql
CREATE USER 'slamquiz'@'localhost' IDENTIFIED BY 'aSecurePassword';
CREATE DATABASE slamquiz CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON slamquiz.* TO 'slamquiz'@'localhost';
Update config/packages/doctrine.yaml :
doctrine:
dbal:
# configure these for your MySQL database server
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
# configure these for your PostgreSQL database server
# driver: 'pdo_pgsql'
# charset: utf8
Copy .env file to .env.local.
Uncomment and update the password in this line of .env.local file : DATABASE_URL=mysql://slamquiz:aSecurePassword@127.0.0.1:3306/slamquiz
Enter this commands in a terminal prompt :
# cd slamquiz
bin/console doctrine:migrations:latest
If an error occured "could not find driver", enter this command in a terminal prompt (and re-enter the command above) :
sudo apt install php-mysql
Enter this commands in a terminal prompt :
sudo -i -u postgres
createuser --interactive
slamquiz
# -> yes
psql
ALTER USER slamquiz WITH password 'aSecurePassword';
ALTER USER slamquiz SET search_path = public;
\q
exit
Update config/packages/doctrine.yaml :
doctrine:
dbal:
# configure these for your MySQL database server
# driver: 'pdo_mysql'
# server_version: '5.7'
# charset: utf8mb4
# default_table_options:
# charset: utf8mb4
# collate: utf8mb4_unicode_ci
# configure these for your PostgreSQL database server
driver: 'pdo_pgsql'
charset: utf8
Copy .env file to .env.local.
Uncomment and update the password in this line of .env.local file : DATABASE_URL=pgsql://slamquiz:aSecurePassword@127.0.0.1:5432/slamquiz
Enter this commands in a terminal prompt :
# cd slamquiz
php bin/console doctrine:database:create
If an error occured "could not find driver", enter this command in a terminal prompt (and re-enter the command above) :
sudo apt install php-pgsql
Enter this commands in a terminal prompt :
# cd slamquiz
php bin/console doctrine:migrations:migrate
php bin/console doctrine:fixtures:load
php bin/console server:run
For example, with your browser open this page : http://127.0.0.1:8000 and GO !
Here is initial credentials of the student user.
Here is initial credentials of the admin user.
Here is initial credentials of the super-admin user.
https://slamquiz.herokuapp.com/
Thanks to Heroku
SlamQuiz is an open source project that welcomes pull requests and issues from anyone. Before opening pull requests, please read our short Contribution Guide.