amryami/assessments
Composer 安装命令:
composer require amryami/assessments
包简介
Reusable Assessments (Question Bank & Exams) package for Laravel projects.
README 文档
README
Reusable Assessments (question bank + exams) module packaged for Laravel 12 projects.
Requirements
- PHP 8.2+
- Laravel 12.x
spatie/laravel-package-tools(pulled in automatically)
Installation
Packagist / Composer (recommended)
- Require the package in your Laravel application:
composer require Amryami/assessments:^1.0.0-beta
- Publish the configuration file so you can point the package to your Category & User models, guards, and route prefixes:
php artisan vendor:publish --tag=assessments-config
- Run the package migrations (automatically loaded once the service provider boots):
php artisan migrate
- Seed the default permissions / demo data if desired:
php artisan db:seed --class="Amryami\\Assessments\\Database\\Seeders\\AssessmentsPermissionSeeder"
Routes, views, migrations, and config are auto-registered by the service provider. No manual service provider registration is required in Laravel 10+ thanks to package auto-discovery.
Monorepo / path repository development
When hacking inside this monorepo you can keep using a local path repository so the host application picks up changes instantly:
// composer.json (host application) "repositories": [ { "type": "path", "url": "packages/assessments", "options": { "symlink": true } } ]
Then require the dev build:
composer require Amryami/assessments:@dev --dev
This path workflow mirrors how GitHub Actions runs the package testbench and is handy before tagging a release for Packagist.
Artisan Commands
| Command | Purpose |
|---|---|
assessments:backfill-schema-hash |
Computes schema_hash for questions/exams in batches. |
assessments:finalize-expired |
Auto-submits and grades expired in-progress attempts. |
assessments:rebuild-answer-usage |
Rebuilds aggregate usage metrics for answers/answer sets. |
assessments:reports |
Generates per-exam reporting snapshots (table/CSV/JSON, optional filters). |
Configuration Highlights
assessments.enabled/assessments.admin_onlytoggle the module surface.assessments.activation.*controls the one-time exam activation link (public prefix, middleware stack, token length/expiry, and default redirect route).assessments.models.category/assessments.models.user(or envASSESSMENTS_MODEL_CATEGORY/USER) must be set to the host app's Eloquent classes if the defaults cannot be auto-discovered byAmryami\Assessments\Support\ModelResolver.assessments.middleware.*controls the guard/middleware stack for admin / candidate web + API surfaces.assessments.routes.*adjusts path + name prefixes for dashboard and candidate endpoints so they can live under an existing/dashboardor/apinamespace.assessments.assembly.grace_seconds,assessments.exposure_*, andassessments.propagation_stricttune the attempt lifecycle, exposure enforcement, and propagation safety checks.
See config/assessments.php (or the published copy) for full defaults and inline docs.
Activation Links
- Config keys:
assessments.activation.prefix,assessments.activation.middleware,assessments.activation.token_length,assessments.activation.expires_minutes,assessments.activation.redirect_route(all haveASSESSMENTS_ACTIVATION_*env mirrors). - Admin UI (exam create/edit) shows activation path, expiry, token, and a copyable URL. Leave token blank to regenerate; leave path blank to auto-fill from prefix + slug.
- Public route:
/assessments/activate/{exam}/{token}(prefix overridable). It checks token, expiry, and one-time use, marks the exam published, and redirects to the configured route (defaultassessments.candidate.exams.preview).
Development Notes
- Host application classes under
app/Assessmentsare thin wrappers that extend package controllers, services, and commands to preserve backwards compatibility while the module is extracted. - Package controllers now consume custom FormRequest classes (
Amryami\\Assessments\\Support\\FormRequest) which proxy through to any host base request when present (topics, exams, presets, answer sets UI/API, propagation, reviews, questions, candidate attempts), and API responses lean on dedicated resources (answer sets, attempt start, exam preview). - Blade templates for admin + candidate UIs now live under
assessments::admin/*andassessments::assessments/candidate/*; host views are pass-through includes for existing references. - Temporary class aliases are defined in
src/helpers.php; remove them once consumers switch fully to theAmryami\Assessments\namespace. - Package migrations and seeders live in
database/{migrations,seeders}under the package root. They are automatically loaded when running Artisan commands. - Progress and sprint planning live in
co-pilot_assistance/assesment_package/*.md.
Testing
composer test --working-dir=packages/assessments
The package uses Orchestra Testbench with the hr_test database (see phpunit.xml.dist). Update the DB credentials there if your local environment differs.
Release Process
We keep a small RELEASING.md alongside this README that documents how to:
- Split / package the
packages/assessmentssubtree for distribution. - Tag semantic versions and update
CHANGELOG.md. - Trigger Packagist to pull the new tag.
Following those steps ensures consumers installing via Composer always receive a tested, tagged build with up-to-date documentation.
Roadmap
The current sprint plan and backlog are tracked in:
co-pilot_assistance/assesment_package/phase1.mdco-pilot_assistance/assesment_package/pending.mdco-pilot_assistance/assesment_package/done.md
Refer there for detailed migration status and upcoming tasks (Testbench coverage, request/resource abstractions, dynamic workflow integration, etc.).
amryami/assessments 适用场景与选型建议
amryami/assessments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「laravel」 「questions」 「exams」 「assessments」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 amryami/assessments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amryami/assessments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 amryami/assessments 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Frequently Asked Questions (FAQ) plugin. With categories, on-the-fly search, customer helpfulness tracking and comments.
With Magento 2 FAQ Extension, you will not need to worry about creating useful and nice FAQ page for your ecommerce website. The extension will help you to set up nice informative & SEO-friendly magento 2 FAQ page. With faq page, your customers will find convenient, easily and quick to resolve commo
Add Frequently Asked Questions to your laravel admin project - https://github.com/bpocallaghan/laravel-admin-starter
TYPO3 Questions - FAQ by coding.ms: Frequently asked questions (FAQ) for TYPO3 with SEO-optimized output, prepared schema.org microdata, markdown support for answers, shop-product integration, category and keyword filters, backend question management, CSV export, and improved AI visibility (GEO). Su
Magento2 Product Question And Answer Free
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-25