PHPackages                             escolalms/topic-type-gift - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. escolalms/topic-type-gift

ActivePackage

escolalms/topic-type-gift
=========================

Escola Headles LMS Topic Type GIFT

0.0.25(11mo ago)05.9k↓30%2MITPHPPHP &gt;=7.4CI passing

Since Mar 20Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/EscolaLMS/Topic-Type-GIFT)[ Packagist](https://packagist.org/packages/escolalms/topic-type-gift)[ RSS](/packages/escolalms-topic-type-gift/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (26)Used By (2)

Topic Type GIFT
===============

[](#topic-type-gift)

[![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Topic-Type-GIFT/)[![codecov](https://camo.githubusercontent.com/f4d054b5d8f27db2c899db86214d1dd41a50e6e25a2f3659a0658641846c9d20/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f546f7069632d547970652d474946542f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4e52414e34523841475a)](https://codecov.io/gh/EscolaLMS/Topic-Type-GIFT)[![phpunit](https://github.com/EscolaLMS/Topic-Type-GIFT/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Topic-Type-GIFT/actions/workflows/test.yml)[![downloads](https://camo.githubusercontent.com/c5f94516a8c86d1c6daf6307e360ef3dc7a6b46a08b51bc474dcc6e8673f75f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6573636f6c616c6d732f746f7069632d747970652d67696674)](https://packagist.org/packages/escolalms/topic-type-gift)[![downloads](https://camo.githubusercontent.com/f37804cf467e481e2e387b0653957c699f59b0027cfa1ccbd3c2dea6c454e3cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573636f6c616c6d732f746f7069632d747970652d67696674)](https://packagist.org/packages/escolalms/topic-type-gift)[![downloads](https://camo.githubusercontent.com/c5df11c8009c42b2c80671b08bb557e9f06e55baee58069a3cf9a5f3b8ab4823/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573636f6c616c6d732f746f7069632d747970652d67696674)](https://packagist.org/packages/escolalms/topic-type-gift)[![Maintainability](https://camo.githubusercontent.com/a7a11bc808d5fc966372dd6a3df45e9e09ea7d864c9d376b55f0abbc15bbda30/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f30633965323539336662333065323034386639352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/EscolaLMS/Topic-Type-GIFT/maintainability)

What does it do
---------------

[](#what-does-it-do)

This package is another [TopicType](https://github.com/EscolaLMS/topic-types). It is used to make knowledge tests. If you want to learn more about this format then see [Moodle GIFT format](https://docs.moodle.org/402/en/GIFT_format)

This package supports the following types of questions:

- multiple choice
- multiple choice with multiple right answers
- true-false
- short answers
- matching
- numerical question
- essay
- description

Each question is stored in the database as a string. In the tests you can see examples of questions of different types. See [examples](https://github.com/EscolaLMS/Topic-Type-GIFT/blob/main/tests/GiftQuestionTesting.php)

The quiz can have a set maximum number of attempts for the user to solve the test and a maximum time for each attempt. If the user doesn't complete the attempt then it is closed automatically after the time set by the variable `Config::get('escolalms_gift_quiz.max_quiz_time');`The user will see the results when the attempt is finished.

The answer to an essay type question is not automatically graded. The teacher should do it.

Installing
----------

[](#installing)

- `composer require escolalms/topic-type-gift`
- `php artisan migrate`
- `php artisan db:seed --class="EscolaLms\TopicTypeGift\Database\Seeders\TopicTypeGiftPermissionSeeder"`

Endpoints
---------

[](#endpoints)

The endpoints are defined in [![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Topic-Type-GIFT/)

Database
--------

[](#database)

See the database schema snippet for a better understanding of how it is made.

 ```
classDiagram
direction BT
class topic_gift_attempt_answers {
   bigint topic_gift_quiz_attempt_id
   bigint topic_gift_question_id
   json answer
   varchar feedback
   double precision score
   bigint id
}
class topic_gift_questions {
   bigint topic_gift_quiz_id
   text value
   varchar type
   integer score
   integer order
   integer category_id
   bigint id
}
class topic_gift_quiz_attempts {
   timestamp started_at
   timestamp end_at
   bigint user_id
   bigint topic_gift_quiz_id
   bigint id
}
class topic_gift_quizzes {
   text value
   integer max_attempts
   integer max_execution_time
   bigint id
}

topic_gift_attempt_answers  -->  topic_gift_questions : topic_gift_question_id.id
topic_gift_attempt_answers  -->  topic_gift_quiz_attempts : topic_gift_quiz_attempt_id.id
topic_gift_questions  -->  topic_gift_quizzes : topic_gift_quiz_id.id
topic_gift_quiz_attempts  -->  topic_gift_quizzes : topic_gift_quiz_id.id

```

      Loading Student flow
------------

[](#student-flow)

See diagram of how student flow works.

 ```
graph TD
A[Start] --> B[Is attempt active?]
B -- Yes --> E
B -- No --> C[Is attempt limit exceeded?]
C -- Yes --> K
C -- No --> D[Create new attempt]
D --> E[Return questions]
E -- Sequential saving --> F[End attempt]
E -- All-at-once saving --> G[Attempt closes automatically]
F --> H
G --> H[Show results]
H --> K[End]
```

      Loading Tests
-----

[](#tests)

Run `./vendor/bin/phpunit` to run tests. Test details [![codecov](https://camo.githubusercontent.com/f4d054b5d8f27db2c899db86214d1dd41a50e6e25a2f3659a0658641846c9d20/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f546f7069632d547970652d474946542f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4e52414e34523841475a)](https://codecov.io/gh/EscolaLMS/Topic-Type-GIFT)

Events
------

[](#events)

- `QuizAttemptStartedEvent` - This event is dispatched when the user starts a new attempt to solve the test.
- `QuizAttemptFinishedEvent` - This event is dispatched when the user has finished solving the test.

Listeners
---------

[](#listeners)

This package does not listen for any events.

Permissions
-----------

[](#permissions)

Permissions are defined in [seeder](https://github.com/EscolaLMS/Topic-Type-GIFT/blob/main/database/seeders/TopicTypeGiftPermissionSeeder.php).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance57

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~127 days

Total

25

Last Release

337d ago

PHP version history (2 changes)0.0.1PHP ^7.4|^8.0|^8.1

0.0.22PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c857f3115c790c573d0617d7e9ba4011269ef7b9dfdb003dc4388846a62b14f7?d=identicon)[qunabu](/maintainers/qunabu)

---

Top Contributors

[![mako321](https://avatars.githubusercontent.com/u/59456825?v=4)](https://github.com/mako321 "mako321 (32 commits)")[![dicani0](https://avatars.githubusercontent.com/u/58490533?v=4)](https://github.com/dicani0 "dicani0 (4 commits)")[![daVitekPL](https://avatars.githubusercontent.com/u/58150098?v=4)](https://github.com/daVitekPL "daVitekPL (2 commits)")[![dyfero](https://avatars.githubusercontent.com/u/59400506?v=4)](https://github.com/dyfero "dyfero (2 commits)")[![qunabu](https://avatars.githubusercontent.com/u/214608?v=4)](https://github.com/qunabu "qunabu (2 commits)")[![ArtKob](https://avatars.githubusercontent.com/u/108077902?v=4)](https://github.com/ArtKob "ArtKob (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/escolalms-topic-type-gift/health.svg)

```
[![Health](https://phpackages.com/badges/escolalms-topic-type-gift/health.svg)](https://phpackages.com/packages/escolalms-topic-type-gift)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[escolalms/headless-h5p

Headless H5P Laravel REST API

2732.6k8](/packages/escolalms-headless-h5p)[ronasit/laravel-helpers

Provided helpers function and some helper class.

1475.7k13](/packages/ronasit-laravel-helpers)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
