Code Monkey home page Code Monkey logo

certificationy's Introduction

Certificationy

This is provides a complete system to build multiple choice question system. This is useful for any company that need to test an applicant, or to make a certification website/training tool.

Join the chat at https://gitter.im/certificationy/certificationy Build Status SensioLabsInsight

How to use it?

Inside any PHP application

As usual, use composer to install the library:

composer require "certificationy/certificationy"

Then, you need to load questions using a loader: for now only PhpArray and Yaml loaders are provided, but thanks to the Loader interface you can create your owns.

For instance, let's say you have created a Yaml file with some few questions:

# question.yaml
category: basics
questions:
    -
        question: '2 + 2 = ?'
        answers:
            - {value: 4,           correct: true}
            - {value: 3,           correct: false}
            - {value: 2,           correct: false}

Then you can do:

<?php
use Certificationy\Loaders\YamlLoader;

$loader = new YamlLoader(['path/to/question.yaml']);
$questions = $loader->load(1, []); // (nbQuestions, fromCategories)
$loader->categories(); // ['basics']

$set = Set::create($questions);

Then, for each question you can set user answers (as answers can be multiple):

<?php
 $set->setUserAnswers(0, [4]); // (questionIndex, [values])

At every moment, you can get the correct and wrong answers (non answered questions are wrong).

$set->getCorrectAnswers();
$set->getWrongAnswers();

CLI tool

A CLI tool is available under the following repository: http://www.github.com/certificationy/certificationy-cli.

Please, help us complete our official packs of questions!

You can submit PR with your own questions into the packs located under the Certificationy organization.

We provide packs for both PHP5 and Symfony certifications.

More we will have questions, the more powerful will be this tool!

certificationy's People

Contributors

20uf avatar ad3n avatar amine2z avatar cordoval avatar drcreazy avatar eduardtrayan avatar eko avatar gitter-badger avatar jmolivas avatar joelwurtz avatar lsv avatar lyrixx avatar mickaelandrieu avatar pkraeutli avatar rlataguerra avatar rvanlaarhoven avatar tabbi89 avatar theratg avatar timonf avatar vincentbee avatar vlaurier avatar xabbuh avatar xavismeh avatar xynnn avatar

Watchers

 avatar

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.