Giter VIP home page Giter VIP logo

joliquiz's Introduction

JoliQuiz

CodeFactor

Description

Joliquiz is an online quiz software, a PHP web application developed using the Symfony framework (version 6).

Screenshots

Workout page

Installation

1) Get all source files

git clone https://github.com/LaurentBouquet/joliquiz.git
cd joliquiz
composer install

2) Create database

In the commands below, replace aSecurePassword with a secure password.

Here are the steps to create the database, either with MySQL or with PostgreSQL.

MySQL

Check that you have the PHP MySQL driver installed with :

sudo apt install php-mysql

Enter these commands in a terminal prompt :

sudo mysql
CREATE USER 'joliquiz'@'localhost' IDENTIFIED BY 'aSecurePassword';
CREATE DATABASE joliquiz CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON joliquiz.* TO 'joliquiz'@'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://joliquiz:**aSecurePassword**@127.0.0.1:3306/joliquiz

Enter this commands in a terminal prompt :

php bin/console doctrine:database:create

PostgreSQL

First, start by checking that you have the PHP PostgreSQL driver installed with :

sudo apt install -y php-pgsql

Enter these commands in a terminal prompt :

sudo -i -u postgres
createuser --interactive
joliquiz
# -> yes
psql
ALTER USER joliquiz WITH password 'aSecurePassword';
ALTER USER joliquiz SET search_path = public;
\q
exit

Update the following config file located at 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

Uncomment and update the password in this line of the .env file : DATABASE_URL=pgsql://joliquiz:**aSecurePassword**@127.0.0.1:5432/joliquiz?charset=UTF-8

Copy then the .env file to .env.local

cp .env .env.local

Remove migrations files in migrations folder and enter the following command :

php bin/console make:migration

Then, enter the following command :

php bin/console doctrine:database:create

3) Init database and start the built-in server

Migrate and start the server with the following commands :

php bin/console doctrine:migrations:migrate
php bin/console doctrine:fixtures:load
php bin/console server:start

4) With your browser, open the URL where the server is listening

Open the following page : http://127.0.0.1:8000 and GO !

Workout page

Here are the defaults credentials for the following roles :

User

  • Username : user
  • Password : user

Teacher

  • Username : teacher
  • Password : teacher

Administrator

  • Username : admin
  • Password : admin

Superadministrator

  • Username : superadmin
  • Password : superadmin

Set time zone

You must set your time zone in the php.ini file:

date.timezone = Europe/Paris 

Contributing

Joliquiz is an open source project that welcomes pull requests and issues from anyone. Before opening pull requests, please read our short Contribution Guide.

joliquiz's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

joliquiz's Issues

[Core] Starting JoliQuiz Project

Here are the first planned tasks :

  • Choose a licence
  • Create a new 'Symfony 4' website-skeleton project
  • Create a GitHub repository
  • Create branchs (develop, feature, release, hotfix, support and assets) with 'Git flow'
  • Create next Milestone
  • Create issues and PR labels
  • Initiate the README
  • Push the 'Initial commit'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.