• Stars
    star
    165
  • Rank 228,906 (Top 5 %)
  • Language
    PHP
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple quiz administration written in PHP with a MySQL backend. Uses Bootstrap 3 and Slim PHP micro framework

Simple-Quiz

Software License Build Status SensioLabsInsight

Simple-Quiz is a simple framework for creating quizzes for the web, created and maintained by Ben Hall.

PHP version > 5.4 is required

Quick start

Three quick start options are available:

What's included

Within the download you'll find the following directories and files:

/
β”œβ”€β”€ SimpleQuiz/
β”‚   β”œβ”€β”€ Utils/
β”‚   β”‚   β”œβ”€β”€ Base/
β”‚   β”‚   β”‚   β”œβ”€β”€ SampleConfig.php
β”‚   β”‚   β”‚   β”œβ”€β”€ Installer.php
β”‚   β”‚   β”‚   β”œβ”€β”€ IQuestion.php    
β”‚   β”‚   β”‚   β”œβ”€β”€ IQuiz.php
β”‚   β”‚   β”‚   β”œβ”€β”€ ISession.php
β”‚   β”‚   β”‚   β”œβ”€β”€ ISimple.php
β”‚   β”‚   β”‚   β”œβ”€β”€ User.php
β”‚   β”‚   β”‚   └── setup.php
β”‚   β”‚   β”œβ”€β”€ Exceptions/
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginException.php        
β”‚   β”‚   β”‚   β”œβ”€β”€ RegisterException.php 
β”‚   β”‚   β”œβ”€β”€ User/ 
β”‚   β”‚   β”‚   β”œβ”€β”€ AdminUser.php
β”‚   β”‚   β”‚   β”œβ”€β”€ EndUser.php
β”‚   β”‚   β”‚   β”œβ”€β”€ GuestUser.php                   
β”‚   β”‚   β”œβ”€β”€ LeaderBoard.php
β”‚   β”‚   β”œβ”€β”€ Quiz.php
β”‚   β”‚   β”œβ”€β”€ QuestionStorage.php    
β”‚   β”‚   β”œβ”€β”€ Session.php
β”‚   β”‚   └── Simple.php
β”‚   β”‚   └── RadioQuestion.php
β”‚   β”œβ”€β”€ Tests/
β”‚       β”œβ”€β”€ Base/      
β”‚       β”‚   β”œβ”€β”€ InstallerTest.php
β”‚       └── QuizTest.php
β”œβ”€β”€ public/ (**this is your document root**)
β”‚   β”œβ”€β”€ images/
β”‚   β”‚    β”œβ”€β”€ ajax-loader.gif
β”‚   β”‚    β”œβ”€β”€ sq.png   
β”‚   β”œβ”€β”€ res/
β”‚   β”‚    β”œβ”€β”€ bootstrap/
β”‚   β”‚    β”‚      β”œβ”€β”€ assets/ 
β”‚   β”‚    β”‚      β”œβ”€β”€ dist/  
β”‚   β”‚    β”œβ”€β”€ css/
β”‚   β”‚    β”‚      β”œβ”€β”€ quiz.css  
β”‚   β”‚    β”œβ”€β”€ js/
β”‚   β”‚    β”‚      β”œβ”€β”€ admin.js
β”‚   β”‚    β”‚      β”œβ”€β”€ form.js 
β”‚   β”‚    β”‚      β”œβ”€β”€ general.js 
β”‚   β”‚    β”‚      β”œβ”€β”€ login.js
β”‚   β”‚    β”‚      β”œβ”€β”€ start.js                  
β”‚   β”œβ”€β”€ .htaccess
β”‚   └── index.php
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ admin.php
β”‚   β”œβ”€β”€ public.php        
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ admin/
β”‚   β”‚    β”œβ”€β”€ editanswers.php
β”‚   β”‚    β”œβ”€β”€ footer.php
β”‚   β”‚    β”œβ”€β”€ header.php
β”‚   β”‚    β”œβ”€β”€ index.php
β”‚   β”‚    β”œβ”€β”€ login.php    
β”‚   β”‚    └── quiz.php
β”‚   β”œβ”€β”€ email/
β”‚   β”‚    β”œβ”€β”€ registerconfirm.html
β”‚   β”‚    └── registerconfirm.txt     
β”‚   β”œβ”€β”€ quiz/
β”‚   β”‚    β”œβ”€β”€ error.php    
β”‚   β”‚    β”œβ”€β”€ footer.php  
β”‚   β”‚    β”œβ”€β”€ header.php  
β”‚   β”‚    β”œβ”€β”€ quiz.php  
β”‚   β”‚    β”œβ”€β”€ results.php  
β”‚   β”‚    β”œβ”€β”€ test.php                      
β”‚   β”œβ”€β”€ category.php 
β”‚   β”œβ”€β”€ emailconfirmed.php
β”‚   β”œβ”€β”€ emailsent.php    
β”‚   β”œβ”€β”€ index.php
β”‚   β”œβ”€β”€ login.php
β”‚   └── requirements.php                     
β”œβ”€β”€ vendor/
β”œβ”€β”€ .gitignore  
β”œβ”€β”€ .travis.yml
β”œβ”€β”€ composer.json
β”œβ”€β”€ composer.lock
β”œβ”€β”€ LICENSE
β”œβ”€β”€ phpunit.xml
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
└── simple-quiz.sql

Installation

Get The Code.

  • If you are downloading from SourceForge, all project dependencies are bundled with the project. If, however, you are cloning from GitHub or downloading the release zip file, you must run 'composer install' to download all of the dependencies.
  • If you don't know what composer is, take a look here: Composer
  • Unpack the downloaded code zip archive.
  • Place the contents of the /public directory inside your document root.
  • All other directories should be placed outside of the document root and not accessible via a web browser (look at the above diagram to see the structure).
  • The mod_rewrite module (if using apache server) or URL Rewrite module (if using IIS) will need to be enabled in your server configuration.
  • Create a MySQL database called 'simple-quiz'
  • Import simple-quiz.sql into MySQL using a tool like phpmyadmin or using the MySQL 'source' command.
  • Change credentials in /SimpleQuiz/Utils/Base/SampleConfig.php.
  • Rename SampleConfig.php to Config.php
  • Default web admin user is [email protected] with password of 123456
  • Navigate to the web accessible folder in your browser.

Twitter Stuff

Authors

Ben Hall

Copyright and license

Copyright 2013 Ben Hall under the Apache 2.0 license.