Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/certificationy/certificationy
The core library to create tests and certifications
https://github.com/certificationy/certificationy
exam library multiple-choice php symfony
Last synced: 3 months ago
JSON representation
The core library to create tests and certifications
- Host: GitHub
- URL: https://github.com/certificationy/certificationy
- Owner: certificationy
- License: mit
- Created: 2014-06-14T12:00:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T23:24:18.000Z (over 3 years ago)
- Last Synced: 2024-10-13T23:05:15.149Z (4 months ago)
- Topics: exam, library, multiple-choice, php, symfony
- Language: PHP
- Homepage:
- Size: 396 KB
- Stars: 473
- Watchers: 47
- Forks: 87
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/certificationy/certificationy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![SensioLabsInsight](https://insight.symfony.com/projects/cd3b6bc1-632e-491a-abfc-43edc390e1cc/mini.png)](https://symfony.sensiolabs.com/projects/cd3b6bc1-632e-491a-abfc-43edc390e1cc)## How to use it?
### Inside any PHP application
As usual, use composer to install the library:
```bash
composer require "certificationy/certificationy"
```Then, you need to load questions using a loader: for now only [PhpArray](Loaders/PhpArrayLoader.php) and [Yaml](Loaders/YamlLoader.php) loaders
are provided, but thanks to the [Loader interface](Interfaces/LoaderInterface.php) you can create your owns.For instance, let's say you have created a Yaml file with some few questions:
```yaml
# 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
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).
```php
$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 to complete our official packs of questions!
You can submit PR with your own questions into the packs located under the [Certificationy organization](https://github.com/certificationy).
We provide packs for both [PHP5](https://github.com/certificationy/php-pack) and [Symfony](https://github.com/certificationy/symfony-pack) certifications.
More we will have questions, the more powerful will be this tool!